fromMap static method

CartItemEntity? fromMap(
  1. Object? o, {
  2. Map<String, String>? newDocumentIds,
})

Implementation

static CartItemEntity? fromMap(Object? o,
    {Map<String, String>? newDocumentIds}) {
  if (o == null) return null;
  var map = o as Map<String, dynamic>;

  return CartItemEntity(
    amount: int.tryParse(map['amount'].toString()),
    appId: map['appId'],
    productId: map['productId'],
  );
}