class OrderListObj{ List orderList; bool hasNextPage; OrderListObj({this.hasNextPage,this.orderList}); factory OrderListObj.fromJson(Map json){ List list = json['items'] as List; List tempOrderList = list.map((i)=>OrderList.fromJson(i)).toList(); return OrderListObj( hasNextPage:json['hasNextPage'], orderList: tempOrderList ); } } class OrderList{ int id; int orderNo; String createTime; String startAddress; String endAddress; String itemName; int itemNo; String sendPhone; String sendAddress; String getPhone; String getAddress; OrderList({ this.id, this.orderNo, this.createTime, this.startAddress, this.endAddress, this.itemName, this.itemNo, this.sendPhone, this.sendAddress, this.getPhone, this.getAddress }); factory OrderList.fromJson(Map json){ return OrderList( id:json['id'], orderNo:json['orderNo'], createTime:json['createTime'], startAddress:json['startAddress'], endAddress:json['endAddress'], itemName:json['itemName'], itemNo:json['itemNo'], sendPhone:json['sendPhone'], sendAddress: json['sendAddress'], getPhone:json['getPhone'], getAddress:json['getAddress'] ); } }