maybeOf static method

YaruThemeData? maybeOf(
  1. BuildContext context
)

An optional data from the closest YaruTheme instance that encloses the given context or null if there is no such ancestor.

Implementation

static YaruThemeData? maybeOf(BuildContext context) {
  final theme =
      context.dependOnInheritedWidgetOfExactType<_YaruInheritedTheme>();
  return theme?.data;
}