CalseeThemeController class
The endless feed of generated themes behind a CalseeScope: which theme is showing, and moving to the next or exact previous one.
Themes are seeded and bit-exact: the same feed state shows the same
themes on every device. Save toJson (from CalseeScope.onChanged) and
pass it back as savedState to keep the user's place across launches.
- Inheritance
-
- Object
- ChangeNotifier
- CalseeThemeController
Constructors
-
CalseeThemeController({Iterable<
ThemeFamily> ? families, Object? savedState, int? seed, bool accessible = false, ThemeIntent? intent}) -
A feed limited to
families(all families when null or empty), restored fromsavedStatewhen given, otherwise starting atseed(a random one when null).
Properties
- accessible ↔ bool
-
Whether only themes passing the stricter contrast checks are shown.
getter/setter pair
- canGoBack → bool
-
Whether previous has a theme to return to.
no setter
- entry → FeedEntry
-
The feed position of spec (for favourites or sharing).
no setter
-
families
↔ List<
ThemeFamily> -
The families new themes come from.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- intent ↔ ThemeIntent?
-
The intent new themes are steered by; null for the ordinary feed.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spec → ThemeSpec
-
The theme showing now.
no setter
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
dispose(
) → void -
Discards any resources used by the object.
inherited
-
jumpTo(
FeedEntry entry) → void -
Shows
entry(a saved favourite, a share code, the theme of the day); previous then returns to where the user was. -
next(
) → void - Shows the next theme (a new one, or forward again after previous).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
previous(
) → void - Shows the exact previous theme.
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
toJson(
) → Object -
The feed state, JSON-encodable, for
savedState. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited