diff --git a/lib/models/emotes.dart b/lib/models/emotes.dart index 85a02431..5abab918 100644 --- a/lib/models/emotes.dart +++ b/lib/models/emotes.dart @@ -3,10 +3,13 @@ import 'package:json_annotation/json_annotation.dart'; part 'emotes.g.dart'; // Twitch Emotes -@JsonSerializable(createToJson: false, fieldRename: FieldRename.snake) +@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); diff --git a/lib/models/emotes.g.dart b/lib/models/emotes.g.dart index 75e8df2e..cc6cdbe7 100644 --- a/lib/models/emotes.g.dart +++ b/lib/models/emotes.g.dart @@ -8,9 +8,9 @@ part of 'emotes.dart'; ImagesTwitch _$ImagesTwitchFromJson(Map json) { return ImagesTwitch( - json['url1x'] as String, - json['url2x'] as String, - json['url4x'] as String, + json['url_1x'] as String, + json['url_2x'] as String, + json['url_4x'] as String, ); } @@ -59,12 +59,8 @@ EmoteBTTVChannel _$EmoteBTTVChannelFromJson(Map json) { return EmoteBTTVChannel( json['id'] as String, (json['bots'] as List).map((e) => e as String).toList(), - (json['channelEmotes'] as List) - .map((e) => EmoteBTTVGlobal.fromJson(e as Map)) - .toList(), - (json['sharedEmotes'] as List) - .map((e) => EmoteBTTVShared.fromJson(e as Map)) - .toList(), + (json['channelEmotes'] as List).map((e) => EmoteBTTVGlobal.fromJson(e as Map)).toList(), + (json['sharedEmotes'] as List).map((e) => EmoteBTTVShared.fromJson(e as Map)).toList(), ); }