mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-30 23:58:13 +08:00
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user