of static method

ArnaThemeData of(
  1. BuildContext context
)

Retrieves the ArnaThemeData from the closest ancestor ArnaTheme widget, or a default ArnaThemeData if no ArnaTheme ancestor exists.

Resolves all the colors defined in that ArnaThemeData against the given BuildContext on a best-effort basis.

Implementation

static ArnaThemeData of(BuildContext context) {
  final _InheritedArnaTheme? inheritedTheme = context.dependOnInheritedWidgetOfExactType<_InheritedArnaTheme>();
  return inheritedTheme?.theme.data ?? ArnaThemeData.light();
}