import 'package:json_annotation/json_annotation.dart'; part 'emotes.g.dart'; // Twitch Emotes @JsonSerializable(createToJson: false) class ImagesTwitch { @JsonKey(name: 'url_1x') final String url1x; @JsonKey(name: 'url_2x') final String url2x; @JsonKey(name: 'url_4x') final String url4x; const ImagesTwitch(this.url1x, this.url2x, this.url4x); factory ImagesTwitch.fromJson(Map json) => _$ImagesTwitchFromJson(json); } @JsonSerializable(createToJson: false, fieldRename: FieldRename.snake) class EmoteTwitch { final String id; final String name; final ImagesTwitch images; final String? tier; final String? emoteType; final String? emoteSetId; final List format; final List scale; final List themeMode; const EmoteTwitch(this.id, this.name, this.images, this.tier, this.emoteType, this.emoteSetId, this.format, this.scale, this.themeMode); factory EmoteTwitch.fromJson(Map json) => _$EmoteTwitchFromJson(json); } // BTTV Emotes @JsonSerializable(createToJson: false) class EmoteBTTVGlobal { final String id; final String code; final String imageType; final String userId; const EmoteBTTVGlobal(this.id, this.code, this.imageType, this.userId); factory EmoteBTTVGlobal.fromJson(Map json) => _$EmoteBTTVGlobalFromJson(json); } @JsonSerializable(createToJson: false) class UserBTTV { final String id; final String name; final String displayName; final String providerId; const UserBTTV(this.id, this.name, this.displayName, this.providerId); factory UserBTTV.fromJson(Map json) => _$UserBTTVFromJson(json); } @JsonSerializable(createToJson: false) class EmoteBTTVShared { final String id; final String code; final String imageType; final UserBTTV user; const EmoteBTTVShared(this.id, this.code, this.imageType, this.user); factory EmoteBTTVShared.fromJson(Map json) => _$EmoteBTTVSharedFromJson(json); } @JsonSerializable(createToJson: false) class EmoteBTTVChannel { final String id; final List bots; final List channelEmotes; final List sharedEmotes; const EmoteBTTVChannel(this.id, this.bots, this.channelEmotes, this.sharedEmotes); factory EmoteBTTVChannel.fromJson(Map json) => _$EmoteBTTVChannelFromJson(json); } // FFZ Emotes @JsonSerializable(createToJson: false) class UserFFZ { final int id; final String name; final String displayName; const UserFFZ(this.id, this.name, this.displayName); factory UserFFZ.fromJson(Map json) => _$UserFFZFromJson(json); } @JsonSerializable(createToJson: false) class ImagesFFZ { @JsonKey(name: '1x') final String url1x; @JsonKey(name: '2x') final String? url2x; @JsonKey(name: '4x') final String? url4x; const ImagesFFZ(this.url1x, this.url2x, this.url4x); factory ImagesFFZ.fromJson(Map json) => _$ImagesFFZFromJson(json); } @JsonSerializable(createToJson: false) class EmoteFFZ { final int id; final UserFFZ user; final String code; final ImagesFFZ images; final String imageType; const EmoteFFZ(this.id, this.user, this.code, this.images, this.imageType); factory EmoteFFZ.fromJson(Map json) => _$EmoteFFZFromJson(json); }