ModuleThemeProvider class
Provider che gestisce il cambio palette in base alla suite corrente.
Deprecato: Specifico per il progetto Skillera. Per nuovi progetti usa CLThemeProvider che accetta qualsiasi istanza di CLTheme.
Due concetti separati:
- currentModule: la suite della pagina attiva (controlla CLTheme.primary)
- selectedModule: la suite selezionata nel top bar (controlla la sidebar)
Quando l'utente clicca un tab nel top bar, cambia solo selectedModule (la sidebar si aggiorna). Quando naviga effettivamente in una pagina, updateFromRoute aggiorna currentModule e il tema cambia.
- Inheritance
-
- Object
- ChangeNotifier
- ModuleThemeProvider
- Annotations
-
- @Deprecated('Specifico per Skillera. Usa CLThemeProvider con temi custom.')
Constructors
Properties
- currentModule → SkilleraModule
-
La suite della pagina attiva — controlla CLTheme.primary, bottoni, link.
no setter
- darkPrimary → Color
-
no setter
- darkSecondary → Color
-
no setter
- darkTheme → CLTheme
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- lightPrimary → Color
-
no setter
- lightSecondary → Color
-
no setter
- lightTheme → CLTheme
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedModule → SkilleraModule
-
La suite selezionata nel top bar — controlla la sidebar e il tab attivo.
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.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
selectModule(
SkilleraModule module) → void - Chiamato dal top bar: cambia solo la sidebar, non il tema.
-
toString(
) → String -
A string representation of this object.
inherited
-
updateFromModule(
SkilleraModule newModule) → void -
updateFromRoute(
String path) → void - Chiamato ad ogni cambio route: aggiorna il tema E allinea la sidebar.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
palettes
→ const Map<
SkilleraModule, ModulePalette>