fromEntityPlus static method

Future<DynamicWidgetModel?> fromEntityPlus(
  1. String documentID,
  2. DynamicWidgetEntity? entity, {
  3. String? appId,
})

Implementation

static Future<DynamicWidgetModel?> fromEntityPlus(
    String documentID, DynamicWidgetEntity? entity,
    {String? appId}) async {
  if (entity == null) return null;

  return DynamicWidgetModel(
    documentID: documentID,
    appId: entity.appId ?? '',
    description: entity.description,
    content: entity.content,
    background:
        await BackgroundModel.fromEntityPlus(entity.background, appId: appId),
    conditions: await StorageConditionsModel.fromEntityPlus(entity.conditions,
        appId: appId),
  );
}