fromEntity static method

Future<SimpleTextModel?> fromEntity(
  1. String documentID,
  2. SimpleTextEntity? entity
)

Implementation

static Future<SimpleTextModel?> fromEntity(
    String documentID, SimpleTextEntity? entity) 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.fromEntity(entity.conditions),
    textAlign: toSimpleTextAlign(entity.textAlign),
  );
}