During development, use this error observer if you want all errors to be
shown to the user in a dialog, not only UserExceptions. In more detail:
This will wrap all errors into UserExceptions, and put them all into the
error queue. Note that errors which are NOT originally UserExceptions will
still be thrown, while UserExceptions will still be swallowed. [...]
The Event class can be used as a Redux state with flutter_redux , usually to change the
internal state of a stateful widget. When creating the ViewModel with the StoreConnector,
the event is "consumed" only once, and is then automatically considered "spent". [...]
An Event from multiple sub-events.
When consuming this event, if the first sub-event is not spent, it will be consumed,
and the second will not. If the first sub-event is spent, the second one will be consumed. [...]
Connects a Logger to the Redux Store.
Every action that is dispatched will be logged to the Logger, along with the new State
that was created as a result of the action reaching your Store's reducer. [...]
A MappedEvent is useful when your event value must be transformed by
some function that, usually, needs the store state. You must provide the
event and a map-function. The map-function must be able to deal with
the spent state (null or false, accordingly). [...]
During tests, use this error observer if you want all errors to be thrown,
and not swallowed, including UserExceptions. You should probably use this
in all tests that you don't expect to throw any errors, including
A function that will be run when the StoreConnector is removed from the Widget Tree.
It is run in the State.dispose method.
This can be useful for dispatching actions that remove stale data from your State tree.
A function that will be run when the StoreConnector is initialized (using
the State.initState method). This can be useful for dispatching actions
that fetch data for your Widget when it is first displayed.
A function that will be run after the Widget is built the first time.
This function is passed the initial Model created by the converter function.
This can be useful for starting certain animations, such as showing
Snackbars, after the Widget is built the first time.
A function that will be run on state change, before the build method.
This function is passed the Model, and if distinct is true,
it will only be called if the Model changes.
This is useful for making calls to other classes, such as a
Navigator or TabController, in response to state changes.
It can also be used to trigger an action based on the previous state.
A test of whether or not your converter or vm function should run in
response to a State change. For advanced use only.
Some changes to the State of your application will mean your converter
or vm function can't produce a useful Model. In these cases, such as when
performing exit animations on data that has been removed from your Store,
it can be best to ignore the State change while your animation completes.
To ignore a change, provide a function that returns true or false. If the
returned value is false, the change will be ignored.
If you ignore a change, and the framework needs to rebuild the Widget, the
builder function will be called with the latest Model produced
by your converter or vm functions.