safeOf static method

PlayerThemeData safeOf(
  1. BuildContext context
)

Implementation

static PlayerThemeData safeOf(BuildContext context) {
  final theme = context.dependOnInheritedWidgetOfExactType<PlayerTheme>()?.playerTheme;
  final defaults = PlayerThemeData.defaultTheme(context);
  return theme?.fillWithDefaults(defaults) ?? defaults;
}