CLDestination class

Destinazione di navigazione neutra: nessuna dipendenza da router/Modular. L'app converte il proprio albero route in List<CLDestination> (adapter).

Annotations

Constructors

CLDestination({required String key, required String label, IconData? icon, Widget? iconBuilder(Color color, double size)?, List<CLDestination> children = const [], int priority = 0, bool isVisible = true, bool isSectionHeader = false, Color? tint})
const

Properties

children → List<CLDestination>
Figli → gruppo espandibile in sidebar/drawer. Vuoto = foglia.
final
hasChildren → bool
no setter
hashCode → int
The hash code for this object.
no setterinherited
icon → IconData?
Icona come IconData (es. Lucide, Material). Resa con Icon(icon).
final
iconBuilder → Widget? Function(Color color, double size)?
Builder icona avanzato, per icone che NON sono IconData (es. HugeIcon, SVG). Riceve colore+dimensione e ritorna il widget icona; ha precedenza su icon. L'adapter app lo usa per delegare a route.buildIcon.
final
isLeaf → bool
no setter
isSectionHeader → bool
Label di sezione (non tappabile): rende un'intestazione collassabile con i children come voci sotto. Equivale a onlyShowLabel. Nota: una sezione senza figli ha sia hasChildren sia isLeaf false (categoria a sé, non una foglia).
final
isVisible → bool
final
key → String
Id univoco e stabile (tipicamente il path assoluto o il route name). Usato per selezione (selectedKey) e callback onSelect.
final
label → String
final
priority → int
Bottom bar: valore più alto = scelto prima tra le voci principali.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tint → Color?
Tinta opzionale del modulo. Consumata dall'adapter app (es. admin mappa ModuleRoute.color → tint per i moduli colorati).
final

Methods

buildIcon(Color color, double size) → Widget?
Costruisce l'icona col colore/size dati: iconBuilder se presente, altrimenti Icon(icon), altrimenti null.
containsKey(String? k) → bool
True se key corrisponde a questa destinazione o a un suo discendente. Usato per evidenziare/espandere gruppi quando un figlio è attivo.
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