2021-08-18 14:01:40 -04:00
|
|
|
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
|
|
|
|
|
|
part 'user.g.dart';
|
|
|
|
|
|
|
|
|
|
// Twitch (default) user
|
|
|
|
|
@JsonSerializable(createToJson: false, fieldRename: FieldRename.snake)
|
|
|
|
|
class UserTwitch {
|
|
|
|
|
final String id;
|
|
|
|
|
final String login;
|
|
|
|
|
final String displayName;
|
|
|
|
|
final String profileImageUrl;
|
|
|
|
|
|
2021-11-18 22:13:01 -05:00
|
|
|
const UserTwitch(
|
|
|
|
|
this.id,
|
|
|
|
|
this.login,
|
|
|
|
|
this.displayName,
|
|
|
|
|
this.profileImageUrl,
|
|
|
|
|
);
|
2021-08-18 14:01:40 -04:00
|
|
|
|
2023-04-29 11:34:28 -04:00
|
|
|
factory UserTwitch.fromJson(Map<String, dynamic> json) =>
|
|
|
|
|
_$UserTwitchFromJson(json);
|
2021-08-18 14:01:40 -04:00
|
|
|
}
|
2021-12-11 00:45:44 -05:00
|
|
|
|
|
|
|
|
@JsonSerializable(createToJson: false, fieldRename: FieldRename.snake)
|
|
|
|
|
class UserBlockedTwitch {
|
|
|
|
|
final String userId;
|
|
|
|
|
final String userLogin;
|
|
|
|
|
final String displayName;
|
|
|
|
|
|
|
|
|
|
const UserBlockedTwitch(
|
|
|
|
|
this.userId,
|
|
|
|
|
this.userLogin,
|
|
|
|
|
this.displayName,
|
|
|
|
|
);
|
|
|
|
|
|
2023-04-29 11:34:28 -04:00
|
|
|
factory UserBlockedTwitch.fromJson(Map<String, dynamic> json) =>
|
|
|
|
|
_$UserBlockedTwitchFromJson(json);
|
2021-12-11 00:45:44 -05:00
|
|
|
}
|