Cart.fromJson constructor

Cart.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Cart.fromJson(Map<String, dynamic> json) {
  var cart = _$CartFromJson(json);
  cart.allItems.sort((li, ri) => li.compareTo(ri));
  return cart;
}