brightness property
override
The brightness override for Cupertino descendants.
Defaults to null. If a non-null Brightness is specified, the value will take precedence over the ambient MediaQueryData.platformBrightness, when determining the brightness of descendant Cupertino widgets.
If coming from a Material Theme and unspecified, brightness will be derived from the Material ThemeData's brightness.
See also:
-
MaterialBasedCupertinoThemeData, a CupertinoThemeData that defers brightness to its Material Theme parent if it's unspecified.
-
CupertinoTheme.brightnessOf, a method used to retrieve the overall Brightness from a BuildContext, for Cupertino widgets.
Implementation
@override
Brightness get brightness => _cupertinoOverrideTheme.brightness ?? _materialTheme.brightness;