mapEventToState method

Stream<State> mapEventToState(
  1. Event 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<State> mapEventToState(Event event);