of static method

OutlinedButtonThemeData of(
  1. BuildContext context
)

The closest instance of this class that encloses the given context.

If there is no enclosing OutlinedButtonTheme widget, then ThemeData.outlinedButtonTheme is used.

Typical usage is as follows:

OutlinedButtonThemeData theme = OutlinedButtonTheme.of(context);

Implementation

static OutlinedButtonThemeData of(BuildContext context) {
  final OutlinedButtonTheme? buttonTheme = context.dependOnInheritedWidgetOfExactType<OutlinedButtonTheme>();
  return buttonTheme?.data ?? Theme.of(context).outlinedButtonTheme;
}