mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-29 20:48:40 +00:00
refa query follow up
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,16 +1,18 @@
|
||||
import 'package:PiliPlus/models_new/follow/list.dart';
|
||||
|
||||
class FollowData {
|
||||
List<FollowItemModel>? list;
|
||||
late List<FollowItemModel> list;
|
||||
int? reVersion;
|
||||
int? total;
|
||||
|
||||
FollowData({this.list, this.reVersion, this.total});
|
||||
FollowData({required this.list, this.reVersion, this.total});
|
||||
|
||||
factory FollowData.fromJson(Map<String, dynamic> json) => FollowData(
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => FollowItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
list:
|
||||
(json['list'] as List<dynamic>?)
|
||||
?.map((e) => FollowItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
<FollowItemModel>[],
|
||||
reVersion: json['re_version'] as int?,
|
||||
total: json['total'] as int?,
|
||||
);
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
import 'package:PiliPlus/models/dynamics/up.dart';
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
|
||||
class FollowItemModel {
|
||||
int? mid;
|
||||
class FollowItemModel extends UpItem {
|
||||
int? attribute;
|
||||
int? mtime;
|
||||
dynamic tag;
|
||||
int? special;
|
||||
String? uname;
|
||||
String? face;
|
||||
String? sign;
|
||||
int? faceNft;
|
||||
BaseOfficialVerify? officialVerify;
|
||||
@@ -18,13 +16,13 @@ class FollowItemModel {
|
||||
String? followTime;
|
||||
|
||||
FollowItemModel({
|
||||
this.mid,
|
||||
required super.mid,
|
||||
this.attribute,
|
||||
this.mtime,
|
||||
this.tag,
|
||||
this.special,
|
||||
this.uname,
|
||||
this.face,
|
||||
super.uname,
|
||||
super.face,
|
||||
this.sign,
|
||||
this.faceNft,
|
||||
this.officialVerify,
|
||||
@@ -37,7 +35,7 @@ class FollowItemModel {
|
||||
|
||||
factory FollowItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
FollowItemModel(
|
||||
mid: json['mid'] as int?,
|
||||
mid: json['mid'] as int? ?? 0,
|
||||
attribute: json['attribute'] as int?,
|
||||
mtime: json['mtime'] as int?,
|
||||
tag: json['tag'] as dynamic,
|
||||
|
||||
Reference in New Issue
Block a user