of static method

FilledButtonThemeData of(
  1. 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);


static FilledButtonThemeData of(BuildContext context) {
  final FilledButtonTheme? buttonTheme = context.dependOnInheritedWidgetOfExactType<FilledButtonTheme>();
  return buttonTheme?.data ?? Theme.of(context).filledButtonTheme;