toEntity method

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

Implementation

@override
ProductEntity toEntity({String? appId}) {
  return ProductEntity(
    appId: appId,
    title: (title != null) ? title : null,
    about: (about != null) ? about : null,
    price: (price != null) ? price : null,
    weight: (weight != null) ? weight : null,
    shopId: (shop != null) ? shop!.documentID : null,
    images: (images != null)
        ? images!.map((item) => item.toEntity(appId: appId)).toList()
        : null,
    posSize: (posSize != null) ? posSize!.toEntity(appId: appId) : null,
  );
}