fromMap static method
Implementation
static CartModel fromMap(Map<String, dynamic> map) {
return CartModel(
id: map['id'],
userId: map['userId'],
date: DateTime.parse(map['date']),
products: (map['products'] as List)
.map((p) => CartProductMapper.fromMap(p))
.toList(),
);
}