Unverified Commit 7c1baeae authored by Taha Tesser's avatar Taha Tesser Committed by GitHub

Fix `fooTheme.of(context);` usage docs (#98402)

parent 10a25d65
...@@ -144,7 +144,7 @@ class DrawerTheme extends InheritedTheme { ...@@ -144,7 +144,7 @@ class DrawerTheme extends InheritedTheme {
/// Typical usage is as follows: /// Typical usage is as follows:
/// ///
/// ```dart /// ```dart
/// DrawerTheme theme = DrawerTheme.of(context); /// DrawerThemeData theme = DrawerTheme.of(context);
/// ``` /// ```
static DrawerThemeData of(BuildContext context) { static DrawerThemeData of(BuildContext context) {
final DrawerTheme? drawerTheme = context.dependOnInheritedWidgetOfExactType<DrawerTheme>(); final DrawerTheme? drawerTheme = context.dependOnInheritedWidgetOfExactType<DrawerTheme>();
......
...@@ -107,7 +107,7 @@ class ElevatedButtonTheme extends InheritedTheme { ...@@ -107,7 +107,7 @@ class ElevatedButtonTheme extends InheritedTheme {
/// Typical usage is as follows: /// Typical usage is as follows:
/// ///
/// ```dart /// ```dart
/// ElevatedButtonTheme theme = ElevatedButtonTheme.of(context); /// ElevatedButtonThemeData theme = ElevatedButtonTheme.of(context);
/// ``` /// ```
static ElevatedButtonThemeData of(BuildContext context) { static ElevatedButtonThemeData of(BuildContext context) {
final ElevatedButtonTheme? buttonTheme = context.dependOnInheritedWidgetOfExactType<ElevatedButtonTheme>(); final ElevatedButtonTheme? buttonTheme = context.dependOnInheritedWidgetOfExactType<ElevatedButtonTheme>();
......
...@@ -211,7 +211,7 @@ class NavigationBarTheme extends InheritedTheme { ...@@ -211,7 +211,7 @@ class NavigationBarTheme extends InheritedTheme {
/// Typical usage is as follows: /// Typical usage is as follows:
/// ///
/// ```dart /// ```dart
/// NavigationBarTheme theme = NavigationBarTheme.of(context); /// NavigationBarThemeData theme = NavigationBarTheme.of(context);
/// ``` /// ```
static NavigationBarThemeData of(BuildContext context) { static NavigationBarThemeData of(BuildContext context) {
final NavigationBarTheme? navigationBarTheme = context.dependOnInheritedWidgetOfExactType<NavigationBarTheme>(); final NavigationBarTheme? navigationBarTheme = context.dependOnInheritedWidgetOfExactType<NavigationBarTheme>();
......
...@@ -219,7 +219,7 @@ class NavigationRailTheme extends InheritedTheme { ...@@ -219,7 +219,7 @@ class NavigationRailTheme extends InheritedTheme {
/// Typical usage is as follows: /// Typical usage is as follows:
/// ///
/// ```dart /// ```dart
/// NavigationRailTheme theme = NavigationRailTheme.of(context); /// NavigationRailThemeData theme = NavigationRailTheme.of(context);
/// ``` /// ```
static NavigationRailThemeData of(BuildContext context) { static NavigationRailThemeData of(BuildContext context) {
final NavigationRailTheme? navigationRailTheme = context.dependOnInheritedWidgetOfExactType<NavigationRailTheme>(); final NavigationRailTheme? navigationRailTheme = context.dependOnInheritedWidgetOfExactType<NavigationRailTheme>();
......
...@@ -107,7 +107,7 @@ class OutlinedButtonTheme extends InheritedTheme { ...@@ -107,7 +107,7 @@ class OutlinedButtonTheme extends InheritedTheme {
/// Typical usage is as follows: /// Typical usage is as follows:
/// ///
/// ```dart /// ```dart
/// OutlinedButtonTheme theme = OutlinedButtonTheme.of(context); /// OutlinedButtonThemeData theme = OutlinedButtonTheme.of(context);
/// ``` /// ```
static OutlinedButtonThemeData of(BuildContext context) { static OutlinedButtonThemeData of(BuildContext context) {
final OutlinedButtonTheme? buttonTheme = context.dependOnInheritedWidgetOfExactType<OutlinedButtonTheme>(); final OutlinedButtonTheme? buttonTheme = context.dependOnInheritedWidgetOfExactType<OutlinedButtonTheme>();
......
...@@ -107,7 +107,7 @@ class TextButtonTheme extends InheritedTheme { ...@@ -107,7 +107,7 @@ class TextButtonTheme extends InheritedTheme {
/// Typical usage is as follows: /// Typical usage is as follows:
/// ///
/// ```dart /// ```dart
/// TextButtonTheme theme = TextButtonTheme.of(context); /// TextButtonThemeData theme = TextButtonTheme.of(context);
/// ``` /// ```
static TextButtonThemeData of(BuildContext context) { static TextButtonThemeData of(BuildContext context) {
final TextButtonTheme? buttonTheme = context.dependOnInheritedWidgetOfExactType<TextButtonTheme>(); final TextButtonTheme? buttonTheme = context.dependOnInheritedWidgetOfExactType<TextButtonTheme>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment