mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-23 12:10:33 +08:00
34
lib/models_new/space/space/pr_info.dart
Normal file
34
lib/models_new/space/space/pr_info.dart
Normal file
@@ -0,0 +1,34 @@
|
||||
class SpacePrInfo {
|
||||
SpacePrInfo(
|
||||
this.content,
|
||||
this.url,
|
||||
this.icon,
|
||||
this.iconNight,
|
||||
this.textColor,
|
||||
this.bgColor,
|
||||
this.textColorNight,
|
||||
this.bgColorNight,
|
||||
);
|
||||
|
||||
String? content;
|
||||
String? url;
|
||||
String? icon;
|
||||
String? iconNight;
|
||||
late String textColor;
|
||||
late String bgColor;
|
||||
late String textColorNight;
|
||||
late String bgColorNight;
|
||||
|
||||
SpacePrInfo.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