fromEntityPlus static method

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

Implementation

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

  return DividerModel(
    documentID: documentID,
    appId: entity.appId ?? '',
    description: entity.description,
    color: await RgbModel.fromEntityPlus(entity.color, appId: appId),
    height: entity.height,
    thickness: entity.thickness,
    indent: entity.indent,
    endIndent: entity.endIndent,
    conditions: await StorageConditionsModel.fromEntityPlus(entity.conditions,
        appId: appId),
  );
}