asSteamStatusEvent method Null safety

  1. @Deprecated('will be reomved')
StreamStatusEvent asSteamStatusEvent()
@Deprecated('will be reomved')

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

Implementation

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