fromEntity method Null safety

dynamic fromEntity(
  1. AppModel app,
  2. OpenDialogEntity entity
)
override

Implementation

static Future<ActionModel> fromEntity(
    AppModel app, OpenDialogEntity entity) async {
  if (entity.appID == null) {
    throw Exception('entity OpenDialog.appID is null');
  }
  if (entity.dialogID == null) {
    throw Exception('entity OpenDialog.dialogID is null');
  }
  return OpenDialog(app,
      conditions: await DisplayConditionsModel.fromEntity(entity.conditions),
      dialogID: entity.dialogID!);
}