2021-11-18 22:13:01 -05:00
|
|
|
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
|
|
|
|
|
|
part 'category.g.dart';
|
|
|
|
|
|
|
|
|
|
@JsonSerializable(createToJson: false, fieldRename: FieldRename.snake)
|
|
|
|
|
class CategoryTwitch {
|
|
|
|
|
final String boxArtUrl;
|
|
|
|
|
final String id;
|
|
|
|
|
final String name;
|
|
|
|
|
|
|
|
|
|
const CategoryTwitch(
|
|
|
|
|
this.boxArtUrl,
|
|
|
|
|
this.id,
|
|
|
|
|
this.name,
|
|
|
|
|
);
|
|
|
|
|
|
2023-04-29 11:34:28 -04:00
|
|
|
factory CategoryTwitch.fromJson(Map<String, dynamic> json) =>
|
|
|
|
|
_$CategoryTwitchFromJson(json);
|
2021-11-18 22:13:01 -05:00
|
|
|
}
|
|
|
|
|
|
2021-11-26 01:14:47 -05:00
|
|
|
@JsonSerializable(createToJson: false, fieldRename: FieldRename.snake)
|
2021-11-18 22:13:01 -05:00
|
|
|
class CategoriesTwitch {
|
|
|
|
|
final List<CategoryTwitch> data;
|
2022-03-25 21:23:14 -04:00
|
|
|
final Map<String, String>? pagination;
|
2021-11-18 22:13:01 -05:00
|
|
|
|
|
|
|
|
const CategoriesTwitch(
|
|
|
|
|
this.data,
|
2021-11-26 01:14:47 -05:00
|
|
|
this.pagination,
|
2021-11-18 22:13:01 -05:00
|
|
|
);
|
2021-11-26 01:14:47 -05:00
|
|
|
|
2023-04-29 11:34:28 -04:00
|
|
|
factory CategoriesTwitch.fromJson(Map<String, dynamic> json) =>
|
|
|
|
|
_$CategoriesTwitchFromJson(json);
|
2021-11-18 22:13:01 -05:00
|
|
|
}
|