mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-05 01:27:49 +08:00
@@ -27,7 +27,7 @@ class CardLiveItem {
|
||||
this.areaV2Id,
|
||||
this.areaV2ParentId,
|
||||
this.watchedShow,
|
||||
}) : _systemCover = noneNullOrEmptyString(systemCover);
|
||||
}) : _systemCover = nonNullOrEmptyString(systemCover);
|
||||
|
||||
factory CardLiveItem.fromJson(Map<String, dynamic> json) => CardLiveItem(
|
||||
roomid: json['roomid'] ?? json['id'],
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:PiliPlus/models_new/live/live_medal_wall/uinfo_medal.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_superchat/user_info.dart';
|
||||
import 'package:PiliPlus/utils/global_data.dart';
|
||||
import 'package:PiliPlus/utils/parse_int.dart';
|
||||
import 'package:PiliPlus/utils/parse_string.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
|
||||
@@ -64,18 +65,18 @@ class SuperChatItem {
|
||||
});
|
||||
|
||||
factory SuperChatItem.fromJson(Map<String, dynamic> json) => SuperChatItem(
|
||||
id: Utils.safeToInt(json['id']) ?? Utils.random.nextInt(2147483647),
|
||||
uid: Utils.safeToInt(json['uid'])!,
|
||||
id: safeToInt(json['id']) ?? Utils.random.nextInt(2147483647),
|
||||
uid: safeToInt(json['uid'])!,
|
||||
price: json['price'],
|
||||
backgroundImage: noneNullOrEmptyString(json['background_image']),
|
||||
backgroundImage: nonNullOrEmptyString(json['background_image']),
|
||||
backgroundColor: json['background_color'] ?? '#EDF5FF',
|
||||
backgroundBottomColor: json['background_bottom_color'] ?? '#2A60B2',
|
||||
backgroundPriceColor: json['background_price_color'] ?? '#7497CD',
|
||||
messageFontColor: json['message_font_color'] ?? '#FFFFFF',
|
||||
endTime: Utils.safeToInt(json['end_time'])!,
|
||||
endTime: safeToInt(json['end_time'])!,
|
||||
message: json['message'],
|
||||
token: json['token'],
|
||||
ts: Utils.safeToInt(json['ts'])!,
|
||||
ts: safeToInt(json['ts'])!,
|
||||
userInfo: UserInfo.fromJson(json['user_info'] as Map<String, dynamic>),
|
||||
medalInfo: !GlobalData().showMedal || json['uinfo']?['medal'] == null
|
||||
? null
|
||||
|
||||
@@ -28,7 +28,7 @@ class ReservationCardItem {
|
||||
total: json['total'] ?? 0,
|
||||
isFollow: json['is_follow'] == 1,
|
||||
livePlanStartTime: json['live_plan_start_time'] as int?,
|
||||
descText1: noneNullOrEmptyString(json['desc_text_1']?['text']),
|
||||
descText1: nonNullOrEmptyString(json['desc_text_1']?['text']),
|
||||
dynamicId: json['dynamic_id'] as String?,
|
||||
lotteryPrizeInfo: json['lottery_prize_info'] == null
|
||||
? null
|
||||
|
||||
@@ -28,7 +28,7 @@ class TopImage {
|
||||
final item = json['item'];
|
||||
final img = item['image'];
|
||||
title = json['title'] == null ? null : TopTitle.fromJson(json['title']);
|
||||
_defaultImage = noneNullOrEmptyString(img?['default_image']);
|
||||
_defaultImage = nonNullOrEmptyString(img?['default_image']);
|
||||
fullCover = json['cover'];
|
||||
double dy = 0;
|
||||
try {
|
||||
|
||||
@@ -103,6 +103,6 @@ class VideoDetailData {
|
||||
staff: (json["staff"] as List?)
|
||||
?.map((item) => Staff.fromJson(item))
|
||||
.toList(),
|
||||
redirectUrl: noneNullOrEmptyString(json['redirect_url']),
|
||||
redirectUrl: nonNullOrEmptyString(json['redirect_url']),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user