mapEventToState method

  1. @override
Stream<StageSessionData> mapEventToState(
  1. StageEvent event

Must be implemented when a class extends bloc. Takes the incoming event as the argument. mapEventToState is called whenever an event is added. mapEventToState must convert that event into a new state and return the new state in the form of a Stream<State>.


Stream<StageSessionData> mapEventToState(
  StageEvent event,
) async* {
  if (event is StageUpdateEvent) {
    // newstate
    final allround = state.copy();
    yield allround;