fromEntityPlus static method

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

Implementation

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

  return SimpleTextModel(
    documentID: documentID,
    appId: entity.appId ?? '',
    description: entity.description,
    title: entity.title,
    text: entity.text,
    conditions: await StorageConditionsModel.fromEntityPlus(entity.conditions,
        appId: appId),
    textAlign: toSimpleTextAlign(entity.textAlign),
  );
}