Data.fromJson constructor
Implementation
Data.fromJson(Map<String, dynamic> json) {
page = json['page'];
size = json['size'];
totalElements = json['totalElements'];
totalPages = json['totalPages'];
last = json['last'];
first = json['first'];
sort = Sort.fromJson(json['sort']);
content = List.from(json['content'])
.map((e) => ProductModel.fromJson(e))
.toList();
}