fromEntityPlus static method
Implementation
static Future<ActionModel?> fromEntityPlus(ActionEntity? entity,
{String? appId}) async {
if (entity == null) return null;
var mapper = Apis.apis().getActionModelApi().getMapper(entity.actionType);
if (mapper != null) {
var appRepo = appRepository();
if (appRepo != null) {
var app = await appRepo.get(entity.appID);
if (app != null) {
return mapper.fromEntityPlus(app, entity);
} else {
var appId = entity.appID;
throw Exception(
"ActionModel.fromEntityPlus App with id $appId not found");
}
}
}
return null;
}