import 'package:json_annotation/json_annotation.dart'; part 'chatters.g.dart'; @JsonSerializable(createToJson: false, fieldRename: FieldRename.snake) class ChatUsers { final int chatterCount; final Chatters chatters; ChatUsers( this.chatterCount, this.chatters, ); factory ChatUsers.fromJson(Map json) => _$ChatUsersFromJson(json); } @JsonSerializable(createToJson: false, fieldRename: FieldRename.snake) class Chatters { final List broadcaster; final List vips; final List moderators; final List staff; final List admins; final List globalMods; final List viewers; const Chatters( this.broadcaster, this.vips, this.moderators, this.staff, this.admins, this.globalMods, this.viewers, ); factory Chatters.fromJson(Map json) => _$ChattersFromJson(json); }