asSteamStateEvent method Null safety
returns a StreamStateEvent object or an Exception if BaseEvent type can't be resolved.
Implementation
@deprecated
StreamStateEvent asSteamStateEvent() {
switch (updateType) {
case 'StreamStarting':
case 'StreamStarted':
case 'StreamStopping':
case 'StreamStopped':
return StreamStateEvent.fromJson(rawEvent, updateType);
}
throw exception;
}