fromEntity static method
Implementation
static Future<ProductDisplayModel?> fromEntity(
String documentID, ProductDisplayEntity? entity) async {
if (entity == null) return null;
return ProductDisplayModel(
documentID: documentID,
appId: entity.appId ?? '',
description: entity.description,
itemDetailBackground:
await BackgroundModel.fromEntity(entity.itemDetailBackground),
addToBasketText: entity.addToBasketText,
buyAction: await ActionModel.fromEntity(entity.buyAction),
background: await BackgroundModel.fromEntity(entity.background),
conditions: await StorageConditionsModel.fromEntity(entity.conditions),
);
}