of static method

DaviThemeData of(
  1. BuildContext context
)

The data from the closest DaviTheme instance that encloses the given context.

Implementation

static DaviThemeData of(BuildContext context) {
  final _InheritedTheme? inheritedTheme =
      context.dependOnInheritedWidgetOfExactType<_InheritedTheme>();
  final DaviThemeData data = inheritedTheme?.theme.data ?? _defaultTheme;
  return data;
}