fromEntity static method

Future<ShopModel?> fromEntity(
  1. String documentID,
  2. ShopEntity? entity
)

Implementation

static Future<ShopModel?> fromEntity(
    String documentID, ShopEntity? entity) async {
  if (entity == null) return null;
  return ShopModel(
    documentID: documentID,
    appId: entity.appId ?? '',
    description: entity.description,
    shortDescription: entity.shortDescription,
    currency: entity.currency,
    conditions: await StorageConditionsModel.fromEntity(entity.conditions),
  );
}