Bloobit<TState> class abstract

This faciliates separation of Business Logic and Presentation. You must extend it. Pass the setState function in by calling attach, or use BloobitPropagator to do it for you. The Bloobit will call the setState function when setState is called.

Constructors

Bloobit(TState initialState, {void onSetState(TState)?})
Creates a Bloobit with the initial state.

Properties

hashCode int
The hash code for this object.
no setterinherited
initialState → TState
This is the state of the Bloobit on construction
final
onSetState → void Function(TState)
When state changes, the Bloobit calls this. Use this to feed state changes to a Stream
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state → TState
This is the current state of the Bloobit
no setter

Methods

attach(void setState(VoidCallback fn)) → void
Pass in the setState function from your state here
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setState(TState state) → void
This calls the setState() function and updates the state in the setState() callback
toString() String
A string representation of this object.
inherited

Operators

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