asSteamStatusEvent method Null safety

  1. @deprecated
StreamStatusEvent asSteamStatusEvent()

returns a StreamStatusEvent object or an Exception if BaseEvent type can't be resolved.

Implementation

@deprecated
StreamStatusEvent asSteamStatusEvent() {
  if (updateType != 'StreamStatus') {
    throw exception;
  }
  return StreamStatusEvent.fromJson(rawEvent);
}