show member guard

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-04-05 12:10:18 +08:00
parent 279f21857d
commit c0b55f9af3
15 changed files with 776 additions and 300 deletions

View File

@@ -1,3 +1,5 @@
import 'package:PiliPlus/models/model_owner.dart';
class Elec {
int? total;
List<ElecItem>? list;
@@ -15,9 +17,11 @@ class Elec {
);
}
class ElecItem {
class ElecItem extends Owner {
String? uname;
String? avatar;
@override
String? get face => avatar;
ElecItem({
this.uname,

View File

@@ -2,20 +2,17 @@ import 'package:PiliPlus/models/model_owner.dart';
class Guard {
String? uri;
String? desc;
Object? count;
List<Owner>? item;
Guard({
this.uri,
this.desc,
this.item,
});
factory Guard.fromJson(Map<String, dynamic> json) => Guard(
uri: json['uri'] as String?,
desc: json['desc'] as String?,
item: (json['item'] as List<dynamic>?)
Guard.fromJson(Map<String, dynamic> json) {
uri = json['uri'] as String?;
item = (json['item'] as List<dynamic>?)
?.map((e) => Owner.fromJson(e as Map<String, dynamic>))
.toList(),
);
.toList();
final String? desc = json['desc'];
if (desc != null) {
count = RegExp(r'^(\d+)').firstMatch(desc)?.group(1);
}
}
}