InMemoryThemePersistence class

A lightweight, in-memory implementation of ThemePersistence useful for testing and ephemeral session state.

Implemented types

Constructors

InMemoryThemePersistence({ChromaThemeMode? initialMode, ChromaPalette? initialPalette, ChromaSeeds? initialSeeds})

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

loadPalette() → Future<ChromaPalette?>
Load the saved palette.
override
loadSeeds() → Future<ChromaSeeds?>
Load the saved custom seeds.
override
loadThemeMode() → Future<ChromaThemeMode?>
Load the saved theme mode.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
savePalette(ChromaPalette palette) → Future<void>
Save the current palette.
override
saveSeeds(ChromaSeeds? seeds) → Future<void>
Save the custom seeds. If seeds is null, it should clear the saved seeds.
override
saveThemeMode(ChromaThemeMode mode) → Future<void>
Save the current theme mode.
override
toString() → String
A string representation of this object.
inherited

Operators

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