asSceneItemEvent method Null safety

  1. @Deprecated('will be reomved')
SceneItemEvent asSceneItemEvent()
@Deprecated('will be reomved')

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

Implementation

@Deprecated('will be reomved')
SceneItemEvent asSceneItemEvent() {
  switch (updateType) {
    case 'SceneItemAdded':
    case 'SceneItemRemoved':
    case 'SceneItemSelected':
    case 'SceneItemDeselected':
      return SceneItemEvent.fromJson(rawEvent, updateType);
  }

  throw exception;
}