fromEntity static method

Future<CartItemModel?> fromEntity(
  1. String documentID,
  2. CartItemEntity? entity
)

Implementation

static Future<CartItemModel?> fromEntity(
    String documentID, CartItemEntity? entity) async {
  if (entity == null) return null;
  return CartItemModel(
    documentID: documentID,
    amount: entity.amount,
    appId: entity.appId ?? '',
  );
}