of static method
- BuildContext context
The closest instance of this class that encloses the given context.
If there is no enclosing BadgeTheme widget, then ThemeData.badgeTheme is used.
Typical usage is as follows:
BadgeThemeData theme = BadgeTheme.of(context);
Implementation
static BadgeThemeData of(BuildContext context) {
final BadgeTheme? badgeTheme = context.dependOnInheritedWidgetOfExactType<BadgeTheme>();
return badgeTheme?.data ?? Theme.of(context).badgeTheme;
}