of static method
- BuildContext context
Returns the closest InputDecorationThemeData instance given the build context.
If there is no enclosing InputDecorationTheme widget, then ThemeData.inputDecorationTheme is used.
Typical usage is as follows:
InputDecorationThemeData theme = InputDecorationTheme.of(context);
Implementation
static InputDecorationThemeData of(BuildContext context) {
final InputDecorationTheme? inputDecorationTheme = context
.dependOnInheritedWidgetOfExactType<InputDecorationTheme>();
return inputDecorationTheme?.data ?? Theme.of(context).inputDecorationTheme;
}