FlowController class abstract
A base controller class that provides state management functionality.
Example:
class CounterController extends FlowController {
var count = 0;
void increment() {
count++;
update(); // Triggers UI update
}
}
- Inheritance
-
- Object
- ChangeNotifier
- ListNotifier
- FlowController
- Mixed-in types
- Implementers
Constructors
Properties
- 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
Methods
-
addListener(
VoidCallback listener) → VoidCallback -
Register a closure to be called when the object changes.
inherited
-
addListenerId(
Object? id, VoidCallback listener) → void -
Adds a listener with optional group id
inherited
-
close(
) → void -
Call this method to trigger onClose lifecycle event
inherited
-
dispose(
) → void -
Discards any resources used by the object.
inherited
-
init(
) → void -
Call this method to trigger onInit lifecycle event
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notify(
{Object? id}) → void -
Notifies all listeners or specific group
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
onClose(
) → void -
Called when the controller is about to be disposed
inherited
-
onInit(
) → void -
Called immediately after the controller is created and before it starts being used
inherited
-
onReady(
) → void -
Called after onInit when the controller and its state are ready
inherited
-
onStart(
) → void -
Called when the controller is ready to start its work
inherited
-
ready(
) → void -
Call this method to trigger onReady lifecycle event
inherited
-
refresh(
) → void -
Refresh all listeners
inherited
-
refreshGroup(
Object id) → void -
Refresh specific group
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
removeListenerId(
Object? id, VoidCallback listener) → void -
Removes a listener from group
inherited
-
start(
) → void -
Call this method to trigger onStart lifecycle event
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
[List< Object> ? ids, bool condition = true]) → void - Notifies listeners to update the UI.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited