mapEventToState method
@Deprecated - Use on
Must be implemented when a class extends Bloc
.
mapEventToState is called whenever an event
is added
and is responsible for converting that event
into a new state.
mapEventToState can yield
zero, one, or multiple states for an event.
Implementation
@override
Stream<MediaDevicesState> mapEventToState(
MediaDevicesEvent event,
) async* {
if (event is MediaDeviceLoadDevices) {
yield* _mapLoadDevicesToState(event);
} else if (event is MediaDeviceSelectAudioInput) {
yield* _mapSelectAudioInputToState(event);
} else if (event is MediaDeviceSelectAudioOutput) {
yield* _mapSelectAudioOutputToState(event);
} else if (event is MediaDeviceSelectVideoInput) {
yield* _mapSelectVideoInputToState(event);
}
}