VyuhTheme class final

The app's themes, given once to PlatformWidgetBuilder.theme.

The framework uses it everywhere it draws its own UI: the loading screen before the app starts, the startup failure screen, the default app root, loaders, error views and placeholders. Apps that build their own root in appBuilder should pass the same values to their MaterialApp.

runApp(
  platformWidgetBuilder: PlatformWidgetBuilder.system.copyWith(
    theme: VyuhTheme(light: MyDesign.light, dark: MyDesign.dark),
  ),
  features: () => [...],
);
Annotations

Constructors

VyuhTheme({required ThemeData light, ThemeData? dark, ThemeMode mode = ThemeMode.system})
const
VyuhTheme.fromSeed(Color seed, {ThemeMode mode = ThemeMode.system})
Material 3 light and dark themes generated from one seed color.
factory

Properties

dark → ThemeData?
The dark theme.
final
hashCode → int
The hash code for this object.
no setterinherited
light → ThemeData
The light theme. Also used when dark is not given.
final
mode → ThemeMode
Which theme to use. Defaults to following the platform.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({ThemeData? light, ThemeData? dark, ThemeMode? mode}) → VyuhTheme
A copy with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

system → VyuhTheme
The framework default: Material 3 from a neutral indigo seed.
final