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

This commit is contained in:
Taha Tesser 2022-02-14 19:00:22 +02:00 committed by GitHub
parent 10a25d65db
commit 7c1baeaea8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View File

@ -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>();

View File

@ -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>();

View File

@ -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>();

View File

@ -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>();

View File

@ -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>();

View File

@ -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>();