DataPage<T>.fromJson constructor
Creates a new instance of data page and assigns its values.
json
json values to initialize this object.fromJson
convert function for convert from json into
Implementation
factory DataPage.fromJson(Map<String, dynamic> json, Function fromJson) {
//final items = json['data'].cast<Map<String, dynamic>>();
final items = json['data'];
return DataPage<T>(
List<T>.from(items.map((itemsJson) => fromJson(itemsJson))),
json['total']);
}