Files
PiliPlus/lib/models_new/live/live_danmaku/live_emote.dart
bggRGjQaUbCoE 8d94c0405f opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-09-03 13:09:08 +08:00

50 lines
1.0 KiB
Dart

class BaseEmote {
late String url;
late String emoticonUnique;
late double width;
double? height;
late final isUpower = emoticonUnique.startsWith('upower_');
BaseEmote.fromJson(Map<String, dynamic> json) {
url = json['url'];
emoticonUnique = json['emoticon_unique'];
width = (json['width'] as num).toDouble();
height = (json['height'] as num?)?.toDouble();
}
}
// class Emote extends BaseEmote {
// late int count;
// late String descript;
// late String emoji;
// late int emoticonId;
// }
/*
{
"bulge_display": 1,
"emoticon_unique": "upower_[{{emote}}]",
"height": {{height}},
"in_player_area": 1,
"is_dynamic": 0, // 0 or 1
"url": "{{url}}",
"width": {{width}}
}
{
"bulge_display": 1,
"emoticon_unique": "room_{{room_id}}_{{int}}",
"height": {{height}},
"in_player_area": 1,
"is_dynamic": 1,
"url": "{{url}}",
"width": {{width}}
}
*/
// class Uemote extends BaseEmote {
// late int bulgeDisplay;
// late int inPlayerArea;
// late int isDynamic;
// }