SplashTheme.auto constructor

SplashTheme.auto(
  1. BuildContext context
)

Returns light or dark theme based on the device's current brightness.

Implementation

factory SplashTheme.auto(BuildContext context) {
  final brightness = MediaQuery.of(context).platformBrightness;
  return brightness == Brightness.dark
      ? SplashTheme.dark()
      : SplashTheme.light();
}