KataglyphisAppShellRuntime class

The shell-owned state an app needs in order to fill in an AppAttributes.

Every field here is state the shell alone owns: the rail animation it drives from the width breakpoints, the two layout flags it derives from them, and the four handle* callbacks that call setState on the shell. Handing them over as one value is what lets the app keep constructing AppAttributes itself - it may pass a subclass, or extra fields the shell knows nothing about - without having to own an AnimationController.

Apps that need nothing special call buildAppAttributes.

Annotations

Constructors

KataglyphisAppShellRuntime({required CurvedAnimation railAnimation, required bool showMediumSizeLayout, required bool showLargeSizeLayout, required int currentLanguageIndex, required bool useLightMode, required ColorSeed colorSelected, required void handleBrightnessChange(bool useLightMode), required void handleLanguageSelect(int index), required void handleColorSelect(int index)})
const

Properties

colorSelected ColorSeed
The seed colour the theme is built from.
final
currentLanguageIndex int
Index into the app's supported locales, moved by handleLanguageSelect.
final
handleBrightnessChange → void Function(bool useLightMode)
Switches the shell between ThemeMode.light and ThemeMode.dark.
final
handleColorSelect → void Function(int index)
Selects ColorSeed values[value]; the shell rebuilds both themes.
final
handleLanguageSelect → void Function(int index)
Selects the locale at index; the shell rebuilds with it.
final
hashCode int
The hash code for this object.
no setterinherited
railAnimation CurvedAnimation
Drives the navigation rail's reveal; owned by the shell's controller.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showLargeSizeLayout bool
True above largeWidthBreakpoint.
final
showMediumSizeLayout bool
True between mediumWidthBreakpoint and largeWidthBreakpoint.
final
useLightMode bool
Resolved from the shell's ThemeMode and the platform brightness.
final

Methods

buildAppAttributes({required FooterConfig footerConfig, required HomeConfig homeConfig, required AppSettings appSettings, required UserSettings userSettings, required ScreenConfigurations screenConfigurations}) AppAttributes
Fills the shell-owned half of an AppAttributes; the app supplies the half that comes out of its own settings.
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