next<State, Effect> function
- @experimental
- State? state,
- List<
Effect> effects = const [],
A helper function for constructing a Next result.
This function simplifies the process of returning the next state and side effects.
Instead of writing return (null, const []);
, you can use: return next();
state
: The next state, ornull
to indicate no state change.effects
: A list of side effects to execute. Defaults to an empty list.
Implementation
@experimental
@pragma('vm:prefer-inline')
(State?, List<Effect>) next<State, Effect>({
State? state,
List<Effect> effects = const [],
}) =>
(state, effects);