Fix fooTheme.of(context);
usage docs (#98402)
This commit is contained in:
parent
10a25d65db
commit
7c1baeaea8
@ -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 {
|
|||||||
/// 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 {
|
|||||||
/// 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 {
|
|||||||
/// 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 {
|
|||||||
/// 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 {
|
|||||||
/// 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>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user