public static CupertinoThemeData of(BuildContext context) { _InheritedCupertinoTheme inheritedTheme = context.dependOnInheritedWidgetOfExactType <_InheritedCupertinoTheme>(); var result = (inheritedTheme?.theme?.data ?? new CupertinoThemeData()).resolveFrom(context, nullOk: true); return(result); }
public static CupertinoThemeData of(BuildContext context) { _InheritedCupertinoTheme inheritedTheme = (_InheritedCupertinoTheme)context.inheritFromWidgetOfExactType(typeof(_InheritedCupertinoTheme)); return(inheritedTheme?.theme?.data ?? new CupertinoThemeData()); }
public static Brightness?brightnessOf(BuildContext context, bool nullOk = false) { _InheritedCupertinoTheme inheritedTheme = context.dependOnInheritedWidgetOfExactType <_InheritedCupertinoTheme>(); return((inheritedTheme?.theme?.data?.brightness) ?? MediaQuery.of(context, nullOk: nullOk)?.platformBrightness); }