of static method
- BuildContext context
Retrieves the ElevatedButtonThemeData from the closest ancestor ElevatedButtonTheme.
If there is no enclosing ElevatedButtonTheme widget, then ThemeData.elevatedButtonTheme is used.
Typical usage is as follows:
ElevatedButtonThemeData theme = ElevatedButtonTheme.of(context);
Implementation
static ElevatedButtonThemeData of(BuildContext context) {
final ElevatedButtonTheme? buttonTheme = context
.dependOnInheritedWidgetOfExactType<ElevatedButtonTheme>();
return buttonTheme?.data ?? Theme.of(context).elevatedButtonTheme;
}