toEntity method

  1. @override
ShopFrontEntity toEntity({
  1. String? appId,
})
override

Implementation

@override
ShopFrontEntity toEntity({String? appId}) {
  return ShopFrontEntity(
    appId: appId,
    title: (title != null) ? title : null,
    description: (description != null) ? description : null,
    shopId: (shop != null) ? shop!.documentID : null,
    size: (size != null) ? size : null,
    cardElevation: (cardElevation != null) ? cardElevation : null,
    cardAxisSpacing: (cardAxisSpacing != null) ? cardAxisSpacing : null,
    itemCardBackground: (itemCardBackground != null)
        ? itemCardBackground!.toEntity(appId: appId)
        : null,
    addToCartColor: (addToCartColor != null)
        ? addToCartColor!.toEntity(appId: appId)
        : null,
    scrollDirection:
        (scrollDirection != null) ? scrollDirection!.index : null,
    buyAction: (buyAction != null) ? buyAction!.toEntity(appId: appId) : null,
    openProductAction: (openProductAction != null)
        ? openProductAction!.toEntity(appId: appId)
        : null,
    padding: (padding != null) ? padding!.toEntity(appId: appId) : null,
    conditions:
        (conditions != null) ? conditions!.toEntity(appId: appId) : null,
  );
}