From 7c1baeaea8496526a544136f14df7e25316bf4fc Mon Sep 17 00:00:00 2001 From: Taha Tesser Date: Mon, 14 Feb 2022 19:00:22 +0200 Subject: [PATCH] Fix `fooTheme.of(context);` usage docs (#98402) --- packages/flutter/lib/src/material/drawer_theme.dart | 2 +- packages/flutter/lib/src/material/elevated_button_theme.dart | 2 +- packages/flutter/lib/src/material/navigation_bar_theme.dart | 2 +- packages/flutter/lib/src/material/navigation_rail_theme.dart | 2 +- packages/flutter/lib/src/material/outlined_button_theme.dart | 2 +- packages/flutter/lib/src/material/text_button_theme.dart | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/flutter/lib/src/material/drawer_theme.dart b/packages/flutter/lib/src/material/drawer_theme.dart index fb87279195..dcc0ff72d8 100644 --- a/packages/flutter/lib/src/material/drawer_theme.dart +++ b/packages/flutter/lib/src/material/drawer_theme.dart @@ -144,7 +144,7 @@ class DrawerTheme extends InheritedTheme { /// Typical usage is as follows: /// /// ```dart - /// DrawerTheme theme = DrawerTheme.of(context); + /// DrawerThemeData theme = DrawerTheme.of(context); /// ``` static DrawerThemeData of(BuildContext context) { final DrawerTheme? drawerTheme = context.dependOnInheritedWidgetOfExactType(); diff --git a/packages/flutter/lib/src/material/elevated_button_theme.dart b/packages/flutter/lib/src/material/elevated_button_theme.dart index 78b4f0037b..91faa6434c 100644 --- a/packages/flutter/lib/src/material/elevated_button_theme.dart +++ b/packages/flutter/lib/src/material/elevated_button_theme.dart @@ -107,7 +107,7 @@ class ElevatedButtonTheme extends InheritedTheme { /// Typical usage is as follows: /// /// ```dart - /// ElevatedButtonTheme theme = ElevatedButtonTheme.of(context); + /// ElevatedButtonThemeData theme = ElevatedButtonTheme.of(context); /// ``` static ElevatedButtonThemeData of(BuildContext context) { final ElevatedButtonTheme? buttonTheme = context.dependOnInheritedWidgetOfExactType(); diff --git a/packages/flutter/lib/src/material/navigation_bar_theme.dart b/packages/flutter/lib/src/material/navigation_bar_theme.dart index 9f0d35299b..f3f0223cb5 100644 --- a/packages/flutter/lib/src/material/navigation_bar_theme.dart +++ b/packages/flutter/lib/src/material/navigation_bar_theme.dart @@ -211,7 +211,7 @@ class NavigationBarTheme extends InheritedTheme { /// Typical usage is as follows: /// /// ```dart - /// NavigationBarTheme theme = NavigationBarTheme.of(context); + /// NavigationBarThemeData theme = NavigationBarTheme.of(context); /// ``` static NavigationBarThemeData of(BuildContext context) { final NavigationBarTheme? navigationBarTheme = context.dependOnInheritedWidgetOfExactType(); diff --git a/packages/flutter/lib/src/material/navigation_rail_theme.dart b/packages/flutter/lib/src/material/navigation_rail_theme.dart index addc33ac5f..2e45da68e9 100644 --- a/packages/flutter/lib/src/material/navigation_rail_theme.dart +++ b/packages/flutter/lib/src/material/navigation_rail_theme.dart @@ -219,7 +219,7 @@ class NavigationRailTheme extends InheritedTheme { /// Typical usage is as follows: /// /// ```dart - /// NavigationRailTheme theme = NavigationRailTheme.of(context); + /// NavigationRailThemeData theme = NavigationRailTheme.of(context); /// ``` static NavigationRailThemeData of(BuildContext context) { final NavigationRailTheme? navigationRailTheme = context.dependOnInheritedWidgetOfExactType(); diff --git a/packages/flutter/lib/src/material/outlined_button_theme.dart b/packages/flutter/lib/src/material/outlined_button_theme.dart index 688af02db3..14ebcdae13 100644 --- a/packages/flutter/lib/src/material/outlined_button_theme.dart +++ b/packages/flutter/lib/src/material/outlined_button_theme.dart @@ -107,7 +107,7 @@ class OutlinedButtonTheme extends InheritedTheme { /// Typical usage is as follows: /// /// ```dart - /// OutlinedButtonTheme theme = OutlinedButtonTheme.of(context); + /// OutlinedButtonThemeData theme = OutlinedButtonTheme.of(context); /// ``` static OutlinedButtonThemeData of(BuildContext context) { final OutlinedButtonTheme? buttonTheme = context.dependOnInheritedWidgetOfExactType(); diff --git a/packages/flutter/lib/src/material/text_button_theme.dart b/packages/flutter/lib/src/material/text_button_theme.dart index 98368f58b5..c4071a119f 100644 --- a/packages/flutter/lib/src/material/text_button_theme.dart +++ b/packages/flutter/lib/src/material/text_button_theme.dart @@ -107,7 +107,7 @@ class TextButtonTheme extends InheritedTheme { /// Typical usage is as follows: /// /// ```dart - /// TextButtonTheme theme = TextButtonTheme.of(context); + /// TextButtonThemeData theme = TextButtonTheme.of(context); /// ``` static TextButtonThemeData of(BuildContext context) { final TextButtonTheme? buttonTheme = context.dependOnInheritedWidgetOfExactType();