of static method

Retrieves the FilledButtonThemeData from the closest ancestor FilledButtonTheme.

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;
}