Skip to content

Commit

Permalink
Make anime simulcasts nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziedelth committed Jul 3, 2024
1 parent 326a107 commit b40aa97
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion lib/dtos/anime_dto.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class AnimeDto with _$AnimeDto {
required String image,
required String? banner,
required String? description,
required List<SimulcastDto> simulcasts,
required List<SimulcastDto>? simulcasts,
required List<String> audioLocales,
required List<String> langTypes,
required List<SeasonDto> seasons,
Expand Down
32 changes: 17 additions & 15 deletions lib/dtos/anime_dto.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mixin _$AnimeDto {
String get image => throw _privateConstructorUsedError;
String? get banner => throw _privateConstructorUsedError;
String? get description => throw _privateConstructorUsedError;
List<SimulcastDto> get simulcasts => throw _privateConstructorUsedError;
List<SimulcastDto>? get simulcasts => throw _privateConstructorUsedError;
List<String> get audioLocales => throw _privateConstructorUsedError;
List<String> get langTypes => throw _privateConstructorUsedError;
List<SeasonDto> get seasons => throw _privateConstructorUsedError;
Expand Down Expand Up @@ -58,7 +58,7 @@ abstract class $AnimeDtoCopyWith<$Res> {
String image,
String? banner,
String? description,
List<SimulcastDto> simulcasts,
List<SimulcastDto>? simulcasts,
List<String> audioLocales,
List<String> langTypes,
List<SeasonDto> seasons,
Expand Down Expand Up @@ -88,7 +88,7 @@ class _$AnimeDtoCopyWithImpl<$Res, $Val extends AnimeDto>
Object? image = null,
Object? banner = freezed,
Object? description = freezed,
Object? simulcasts = null,
Object? simulcasts = freezed,
Object? audioLocales = null,
Object? langTypes = null,
Object? seasons = null,
Expand Down Expand Up @@ -135,10 +135,10 @@ class _$AnimeDtoCopyWithImpl<$Res, $Val extends AnimeDto>
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String?,
simulcasts: null == simulcasts
simulcasts: freezed == simulcasts
? _value.simulcasts
: simulcasts // ignore: cast_nullable_to_non_nullable
as List<SimulcastDto>,
as List<SimulcastDto>?,
audioLocales: null == audioLocales
? _value.audioLocales
: audioLocales // ignore: cast_nullable_to_non_nullable
Expand Down Expand Up @@ -178,7 +178,7 @@ abstract class _$$AnimeDtoImplCopyWith<$Res>
String image,
String? banner,
String? description,
List<SimulcastDto> simulcasts,
List<SimulcastDto>? simulcasts,
List<String> audioLocales,
List<String> langTypes,
List<SeasonDto> seasons,
Expand Down Expand Up @@ -206,7 +206,7 @@ class __$$AnimeDtoImplCopyWithImpl<$Res>
Object? image = null,
Object? banner = freezed,
Object? description = freezed,
Object? simulcasts = null,
Object? simulcasts = freezed,
Object? audioLocales = null,
Object? langTypes = null,
Object? seasons = null,
Expand Down Expand Up @@ -253,10 +253,10 @@ class __$$AnimeDtoImplCopyWithImpl<$Res>
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String?,
simulcasts: null == simulcasts
simulcasts: freezed == simulcasts
? _value._simulcasts
: simulcasts // ignore: cast_nullable_to_non_nullable
as List<SimulcastDto>,
as List<SimulcastDto>?,
audioLocales: null == audioLocales
? _value._audioLocales
: audioLocales // ignore: cast_nullable_to_non_nullable
Expand Down Expand Up @@ -291,7 +291,7 @@ class _$AnimeDtoImpl implements _AnimeDto {
required this.image,
required this.banner,
required this.description,
required final List<SimulcastDto> simulcasts,
required final List<SimulcastDto>? simulcasts,
required final List<String> audioLocales,
required final List<String> langTypes,
required final List<SeasonDto> seasons,
Expand Down Expand Up @@ -324,12 +324,14 @@ class _$AnimeDtoImpl implements _AnimeDto {
final String? banner;
@override
final String? description;
final List<SimulcastDto> _simulcasts;
final List<SimulcastDto>? _simulcasts;
@override
List<SimulcastDto> get simulcasts {
List<SimulcastDto>? get simulcasts {
final value = _simulcasts;
if (value == null) return null;
if (_simulcasts is EqualUnmodifiableListView) return _simulcasts;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_simulcasts);
return EqualUnmodifiableListView(value);
}

final List<String> _audioLocales;
Expand Down Expand Up @@ -440,7 +442,7 @@ abstract class _AnimeDto implements AnimeDto {
required final String image,
required final String? banner,
required final String? description,
required final List<SimulcastDto> simulcasts,
required final List<SimulcastDto>? simulcasts,
required final List<String> audioLocales,
required final List<String> langTypes,
required final List<SeasonDto> seasons,
Expand Down Expand Up @@ -470,7 +472,7 @@ abstract class _AnimeDto implements AnimeDto {
@override
String? get description;
@override
List<SimulcastDto> get simulcasts;
List<SimulcastDto>? get simulcasts;
@override
List<String> get audioLocales;
@override
Expand Down
4 changes: 2 additions & 2 deletions lib/dtos/anime_dto.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b40aa97

Please sign in to comment.