PageModel.fromMap constructor
This is will help us to create object from Map
Implementation
factory PageModel.fromMap(Map<String, dynamic> map) {
return PageModel(
kind: map['kind'],
items: map['items'] != null
? List<PostItemModel>.from(
map['items']?.map((x) => PostItemModel.fromMap(x)))
: null,
etag: map['etag'],
error: map['error'],
);
}