fromEntity static method
Implementation
static Future<DynamicWidgetModel?> fromEntity(
String documentID, DynamicWidgetEntity? entity) async {
if (entity == null) return null;
return DynamicWidgetModel(
documentID: documentID,
appId: entity.appId ?? '',
description: entity.description,
content: entity.content,
background: await BackgroundModel.fromEntity(entity.background),
conditions: await StorageConditionsModel.fromEntity(entity.conditions),
);
}