UiToggleState class
Granular state for UI toggles (AI chat panel, notification drawer, AI button visibility/position).
Part of the AppState decomposition introduced in 4.4.x. Prefer this over
AppState for new code touching the AI chat panel or notification drawer.
- Inheritance
-
- Object
- ChangeNotifier
- UiToggleState
Constructors
Properties
- aiButtonPosition → AiButtonPosition
-
Where the AI button is anchored (header vs floating).
no setter
- aiChatOpen ↔ bool
-
Whether the AI chat panel is currently open.
getter/setter pair
- fromNotification ↔ bool
-
Whether the end drawer was triggered by an incoming notification.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showAiButton → bool
-
Whether the floating AI button should be displayed.
no setter
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
changeEndDrawer(
bool value) → void - Mirror of AppState.changeEndDrawer for compatibility.
-
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.
override
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
toggleAiChat(
) → void - Toggle the AI chat panel open/closed.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited