You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
913 B
Dart
34 lines
913 B
Dart
// ignore_for_file: unused_element
|
|
|
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'watch.freezed.dart';
|
|
part 'watch.g.dart';
|
|
|
|
@Freezed(copyWith: false)
|
|
class WatchActionResponseList with _$WatchActionResponseList {
|
|
WatchActionResponseList._();
|
|
|
|
factory WatchActionResponseList(
|
|
{required int ns,
|
|
required String title,
|
|
bool? watched,
|
|
bool? unwatched}) = _WatchActionResponseList;
|
|
|
|
bool get isWatched {
|
|
return watched == true;
|
|
}
|
|
|
|
factory WatchActionResponseList.fromJson(Map<String, dynamic> json) =>
|
|
_$WatchActionResponseListFromJson(json);
|
|
}
|
|
|
|
@Freezed(copyWith: false)
|
|
class WatchActionResponse with _$WatchActionResponse {
|
|
factory WatchActionResponse({required List<WatchActionResponseList> watch}) =
|
|
_WatchActionResponse;
|
|
|
|
factory WatchActionResponse.fromJson(Map<String, dynamic> json) =>
|
|
_$WatchActionResponseFromJson(json);
|
|
}
|