fromEntity static method

Future<DividerModel?> fromEntity(
  1. String documentID,
  2. DividerEntity? entity
)

Implementation

static Future<DividerModel?> fromEntity(
    String documentID, DividerEntity? entity) async {
  if (entity == null) return null;
  return DividerModel(
    documentID: documentID,
    appId: entity.appId ?? '',
    description: entity.description,
    color: await RgbModel.fromEntity(entity.color),
    height: entity.height,
    thickness: entity.thickness,
    indent: entity.indent,
    endIndent: entity.endIndent,
    conditions: await StorageConditionsModel.fromEntity(entity.conditions),
  );
}