Drip<DState> class
abstract
This is the main class of the Drip package
This class implements the _BaseDrip
and is used to create a new Drip
The Drip is used to manage the state of the application
Constructors
-
Drip(DState initialState, {List<
BaseInterceptor< interceptors = const []})DState> >
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isClosed → bool
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → DState
-
Return the current state
no setterinherited
-
stateStream
→ Stream<
DState> -
no setter
Methods
-
close(
) → void -
Close the _stateController and _eventController
Use this method when you want to close the drip
inherited
-
dispatch(
DripEvent< DState> event) → void - This method is used to change the state of the Drip dispatching a new DripEvent or DripAction
-
leak(
DState newState) → void - This method is used to change the state of the Drip Is important to use this method inside of drip and not outside
-
mutableStateOf(
DripEvent event, DState state) → Stream< DState> - This method is used to change the state of the Drip This method is called when a new event is dispatched with new DripEvent
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onError(
Object err, StackTrace? stackTrace) → void - Method is called when an error is thrown
-
onEvent(
DripEvent< DState> event) → void - Method is called when a new event is dispatched
-
onState(
DState state) → void - Method is called when the state is changed
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited