maybeOf static method
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;
}