themeForBrightness method

(ThemeData?, CupertinoThemeData?) themeForBrightness(
  1. Brightness brightness
)

Returns the pair of ThemeData and CupertinoThemeData corresponding to the value of brightness.

Implementation

(ThemeData?, CupertinoThemeData?) themeForBrightness(Brightness brightness) {
  if (brightness == Brightness.light) {
    return (materialLight, cupertinoLight);
  }
  return (materialDark, cupertinoDark);
}