asRecordingStateEvent method Null safety

  1. @Deprecated('will be reomved')
RecordingStateEvent asRecordingStateEvent()
@Deprecated('will be reomved')

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

Implementation

@Deprecated('will be reomved')
RecordingStateEvent asRecordingStateEvent() {
  switch (updateType) {
    case 'RecordingStarting':
    case 'RecordingStarted':
    case 'RecordingStopping':
    case 'RecordingStopped':
    case 'RecordingPaused':
    case 'RecordingResumed':
      return RecordingStateEvent.fromJson(rawEvent, updateType);
  }

  throw exception;
}