of static method
- BuildContext context
The closest instance of this class that encloses the given context.
If there is no enclosing FilledButtonTheme widget, then ThemeData.filledButtonTheme is used.
Typical usage is as follows:
FilledButtonThemeData theme = FilledButtonTheme.of(context);
Implementation
static FilledButtonThemeData of(BuildContext context) {
final FilledButtonTheme? buttonTheme = context.dependOnInheritedWidgetOfExactType<FilledButtonTheme>();
return buttonTheme?.data ?? Theme.of(context).filledButtonTheme;
}