You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

169 lines
3.5 KiB

3 years ago
/// pageNum : 1
/// pageSize : 100
/// size : 1
/// pages : 1
/// hasPreviousPage : false
/// hasNextPage : false
/// total : "1"
/// list : [{"mid":"1406879717390286848","nickname":"flutter无敌","avatar":"https://pos.upload.gznl.top/admin/2021/10/fb4dadec-a836-49bd-a4c9-c35fc9fd5008.jpeg"}]
class FollowList {
FollowList({
int pageNum,
int pageSize,
int size,
int pages,
bool hasPreviousPage,
bool hasNextPage,
String total,
List<ListData> list,}){
_pageNum = pageNum;
_pageSize = pageSize;
_size = size;
_pages = pages;
_hasPreviousPage = hasPreviousPage;
_hasNextPage = hasNextPage;
_total = total;
_list = list;
}
FollowList.fromJson(dynamic json) {
_pageNum = json['pageNum'];
_pageSize = json['pageSize'];
_size = json['size'];
_pages = json['pages'];
_hasPreviousPage = json['hasPreviousPage'];
_hasNextPage = json['hasNextPage'];
_total = json['total'];
if (json['list'] != null) {
_list = [];
json['list'].forEach((v) {
_list.add(ListData.fromJson(v));
});
}
}
int _pageNum;
int _pageSize;
int _size;
int _pages;
bool _hasPreviousPage;
bool _hasNextPage;
String _total;
List<ListData> _list;
int get pageNum => _pageNum;
int get pageSize => _pageSize;
int get size => _size;
int get pages => _pages;
bool get hasPreviousPage => _hasPreviousPage;
bool get hasNextPage => _hasNextPage;
String get total => _total;
List<ListData> get list => _list;
set pageNum(int value) {
_pageNum = value;
}
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['pageNum'] = _pageNum;
map['pageSize'] = _pageSize;
map['size'] = _size;
map['pages'] = _pages;
map['hasPreviousPage'] = _hasPreviousPage;
map['hasNextPage'] = _hasNextPage;
map['total'] = _total;
if (_list != null) {
map['list'] = _list.map((v) => v.toJson()).toList();
}
return map;
}
set pageSize(int value) {
_pageSize = value;
}
set size(int value) {
_size = value;
}
set pages(int value) {
_pages = value;
}
set hasPreviousPage(bool value) {
_hasPreviousPage = value;
}
set hasNextPage(bool value) {
_hasNextPage = value;
}
set total(String value) {
_total = value;
}
set list(List<ListData> value) {
_list = value;
}
}
/// mid : "1406879717390286848"
/// nickname : "flutter无敌"
/// avatar : "https://pos.upload.gznl.top/admin/2021/10/fb4dadec-a836-49bd-a4c9-c35fc9fd5008.jpeg"
class ListData {
ListData({
3 years ago
String mid,
3 years ago
bool isFollow,
3 years ago
String nickname,
String avatar,}){
_mid = mid;
_nickname = nickname;
3 years ago
_isFollow = isFollow;
3 years ago
_avatar = avatar;
}
ListData.fromJson(dynamic json) {
_mid = json['mid'];
_nickname = json['nickname'];
3 years ago
_isFollow = json['isFollow'];
3 years ago
_avatar = json['avatar'];
}
String _mid;
String _nickname;
String _avatar;
3 years ago
bool _isFollow;
3 years ago
String get mid => _mid;
String get nickname => _nickname;
3 years ago
bool get isFollow => _isFollow;
3 years ago
String get avatar => _avatar;
set mid(String value) {
_mid = value;
}
3 years ago
set isFollow(bool value) {
_isFollow = value;
}
3 years ago
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['mid'] = _mid;
map['nickname'] = _nickname;
3 years ago
map['isFollow'] = _isFollow;
3 years ago
map['avatar'] = _avatar;
return map;
}
set nickname(String value) {
_nickname = value;
}
set avatar(String value) {
_avatar = value;
}
}