OkitoController class

OkitoController is the head of okito state management.

To use this, you should extend or mix your controller class.

OkitoController gives you two important functions, update and setState which helps you to re-build your builders.

Example

class CounterController extends OkitoController {
 int count = 0;

 void increment() => setState(() => count++);

 void decrement() {
   count--;
   update();
 }
}

CounterController counterController = CounterController();

Implementers

Constructors

OkitoController()
The constructor of OkitoController, luckily it is constant!
const

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

dispose() → void
dispose method is called when your OkitoBuilder is removed from the widget tree.
inherited
initState() → void
initState methods is called when your OkitoBuilder is mounted to the widget tree.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onInject() → void
onInject method is called only when you inject it with Okito.inject()
inherited
setState(VoidCallback callback) → void
setState method notifies all the builders to re-build the state after the callback ends.
setStateAsync(FutureVoidCallback callback) Future<void>
setStateAsync method notifies all the builders to re-build the state after the callback ends.
toString() String
A string representation of this object.
inherited
update() → void
update method notifies all the builders to re-build the state.

Operators

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