Action.single constructor

Action.single(
  1. Store store,
  2. dynamic type, {
  3. void onDone()?,
  4. List<Mutation>? onError(
    1. Object error
    )?,
  5. List<ActionId> waitFor = const [],
})

Quickly creates and executes a single mutatiton

Implementation

factory Action.single(Store store, dynamic type,
    {void Function()? onDone,
    List<Mutation>? Function(Object error)? onError,
    List<ActionId> waitFor = const []}) {
  return Action(() async* {
    yield Mutation(store, type);
  }, onDone: onDone, onError: onError, waitFor: waitFor);
}