toMap static method

Map<String, dynamic> toMap(
  1. CartModel model
)

Implementation

static Map<String, dynamic> toMap(CartModel model) {
  return {
    'id': model.id,
    'userId': model.userId,
    'date': model.date.toIso8601String(),
    'products': model.products.map(CartProductMapper.toMap).toList(),
  };
}