System<State, Event> class

Available Extensions

Constructors

System.create({required State initialState})
Create a System with initial state.
System.pure(Run<State, Event> _run)
Create a System with underlying run function.

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

add({Reduce<State, Event>? reduce, Effect<State, Event>? effect}) System<State, Event>
Adds reduce or effect into the system.
copy(CopyRun<State, Event> copy) System<State, Event>
Create a new system based on current one.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run({Reduce<State, Event>? reduce, Effect<State, Event>? effect}) Disposer
Run the system.
runWithContext<Context>({required Context createContext(), required Disposer run(Context context, Run<State, Event> run, Reduce<State, Event>? nextReduce, Effect<State, Event>? nextEffect, Interceptor<Event>? nextInterceptor), void dispose(Context context)?}) System<State, Event>
Create a new system which can redefine how to run the system with a custom context.
toString() String
A string representation of this object.
inherited
withContext<Context>({required Context createContext(), Reduce<State, Event>? reduce, ContextEffect<Context, State, Event>? effect, void dispose(Context context)?}) System<State, Event>
Adds reduce or effect into the system with a custom context.

Operators

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