of static method
- @Deprecated("'PushButton' no longer uses singular colors and therefore cannot " "be themed using a 'PushButtonTheme'.")
- BuildContext context
The closest instance of this class that encloses the given context.
If there is no enclosing PushButtonTheme widget, then MacosThemeData.pushButtonTheme is used.
Typical usage is as follows:
PushButtonTheme theme = PushButtonTheme.of(context);
Implementation
@Deprecated(
"'PushButton' no longer uses singular colors and therefore cannot "
"be themed using a 'PushButtonTheme'.")
static PushButtonThemeData of(BuildContext context) {
final PushButtonTheme? buttonTheme =
context.dependOnInheritedWidgetOfExactType<PushButtonTheme>();
return buttonTheme?.data ?? MacosTheme.of(context).pushButtonTheme;
}