Browse Source
Conflicts: lib/community/community_child_page.dart lib/mine/mine_page.dart lib/retrofit/min_api.dartmaster
fmk
3 years ago
40 changed files with 1114 additions and 531 deletions
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 1.0 KiB |
@ -0,0 +1,159 @@
|
||||
/// 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({ |
||||
String mid, |
||||
String nickname, |
||||
String avatar,}){ |
||||
_mid = mid; |
||||
_nickname = nickname; |
||||
_avatar = avatar; |
||||
} |
||||
|
||||
ListData.fromJson(dynamic json) { |
||||
_mid = json['mid']; |
||||
_nickname = json['nickname']; |
||||
_avatar = json['avatar']; |
||||
} |
||||
String _mid; |
||||
String _nickname; |
||||
String _avatar; |
||||
|
||||
String get mid => _mid; |
||||
String get nickname => _nickname; |
||||
String get avatar => _avatar; |
||||
|
||||
|
||||
set mid(String value) { |
||||
_mid = value; |
||||
} |
||||
|
||||
Map<String, dynamic> toJson() { |
||||
final map = <String, dynamic>{}; |
||||
map['mid'] = _mid; |
||||
map['nickname'] = _nickname; |
||||
map['avatar'] = _avatar; |
||||
return map; |
||||
} |
||||
|
||||
set nickname(String value) { |
||||
_nickname = value; |
||||
} |
||||
|
||||
set avatar(String value) { |
||||
_avatar = value; |
||||
} |
||||
} |
@ -0,0 +1,37 @@
|
||||
/// fans : 0 |
||||
/// follow : 0 |
||||
|
||||
class SocialInfo { |
||||
SocialInfo({ |
||||
int fans, |
||||
int follow,}){ |
||||
_fans = fans; |
||||
_follow = follow; |
||||
} |
||||
|
||||
SocialInfo.fromJson(dynamic json) { |
||||
_fans = json['fans']; |
||||
_follow = json['follow']; |
||||
} |
||||
int _fans; |
||||
int _follow; |
||||
|
||||
int get fans => _fans; |
||||
int get follow => _follow; |
||||
|
||||
|
||||
set fans(int value) { |
||||
_fans = value; |
||||
} |
||||
|
||||
Map<String, dynamic> toJson() { |
||||
final map = <String, dynamic>{}; |
||||
map['fans'] = _fans; |
||||
map['follow'] = _follow; |
||||
return map; |
||||
} |
||||
|
||||
set follow(int value) { |
||||
_follow = value; |
||||
} |
||||
} |
Loading…
Reference in new issue