mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: member card: show prInfo
Closes #571 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,14 +1,34 @@
|
||||
|
||||
class PrInfo {
|
||||
PrInfo();
|
||||
PrInfo(
|
||||
this.content,
|
||||
this.url,
|
||||
this.icon,
|
||||
this.iconNight,
|
||||
this.textColor,
|
||||
this.bgColor,
|
||||
this.textColorNight,
|
||||
this.bgColorNight,
|
||||
);
|
||||
|
||||
factory PrInfo.fromJson(Map<String, dynamic> json) {
|
||||
// TODO: implement fromJson
|
||||
throw UnimplementedError('PrInfo.fromJson($json) is not implemented');
|
||||
}
|
||||
String? content;
|
||||
String? url;
|
||||
String? icon;
|
||||
String? iconNight;
|
||||
String? textColor;
|
||||
String? bgColor;
|
||||
String? textColorNight;
|
||||
String? bgColorNight;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
// TODO: implement toJson
|
||||
throw UnimplementedError();
|
||||
}
|
||||
}
|
||||
PrInfo.fromJson(Map<String, dynamic> json) {
|
||||
content = json['content'];
|
||||
if (content?.isNotEmpty == true) {
|
||||
url = json['url'];
|
||||
icon = json['icon'];
|
||||
iconNight = json['icon_night'];
|
||||
textColor = json['text_color'] ?? "#999999";
|
||||
bgColor = json['bg_color'] ?? "#e7e7e7";
|
||||
textColorNight = json['text_color_night'] ?? "#727272";
|
||||
bgColorNight = json['bg_color_night'] ?? "#2A2A2A";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user