PageModel.fromMap constructor

PageModel.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory PageModel.fromMap(Map<String, dynamic> map) {
  return PageModel(
    total: map['total'],
    size: map['size'],
    current: map['current'],
    pages: map['pages'],
    orders: map['orders'] == null ? [] : List<OrderItemModel>.from(map['orders'].map((x) => OrderItemModel.fromMap(x))),
    records: List.from(map['records'].map((x) => x)),
  );
}