diff --git a/lib/dtos/anime_dto.dart b/lib/dtos/anime_dto.dart index c946a64f..b0e3177e 100644 --- a/lib/dtos/anime_dto.dart +++ b/lib/dtos/anime_dto.dart @@ -18,7 +18,7 @@ class AnimeDto with _$AnimeDto { required String image, required String? banner, required String? description, - required List simulcasts, + required List? simulcasts, required List audioLocales, required List langTypes, required List seasons, diff --git a/lib/dtos/anime_dto.freezed.dart b/lib/dtos/anime_dto.freezed.dart index 0f749fda..fe528e38 100644 --- a/lib/dtos/anime_dto.freezed.dart +++ b/lib/dtos/anime_dto.freezed.dart @@ -30,7 +30,7 @@ mixin _$AnimeDto { String get image => throw _privateConstructorUsedError; String? get banner => throw _privateConstructorUsedError; String? get description => throw _privateConstructorUsedError; - List get simulcasts => throw _privateConstructorUsedError; + List? get simulcasts => throw _privateConstructorUsedError; List get audioLocales => throw _privateConstructorUsedError; List get langTypes => throw _privateConstructorUsedError; List get seasons => throw _privateConstructorUsedError; @@ -58,7 +58,7 @@ abstract class $AnimeDtoCopyWith<$Res> { String image, String? banner, String? description, - List simulcasts, + List? simulcasts, List audioLocales, List langTypes, List seasons, @@ -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, @@ -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, + as List?, audioLocales: null == audioLocales ? _value.audioLocales : audioLocales // ignore: cast_nullable_to_non_nullable @@ -178,7 +178,7 @@ abstract class _$$AnimeDtoImplCopyWith<$Res> String image, String? banner, String? description, - List simulcasts, + List? simulcasts, List audioLocales, List langTypes, List seasons, @@ -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, @@ -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, + as List?, audioLocales: null == audioLocales ? _value._audioLocales : audioLocales // ignore: cast_nullable_to_non_nullable @@ -291,7 +291,7 @@ class _$AnimeDtoImpl implements _AnimeDto { required this.image, required this.banner, required this.description, - required final List simulcasts, + required final List? simulcasts, required final List audioLocales, required final List langTypes, required final List seasons, @@ -324,12 +324,14 @@ class _$AnimeDtoImpl implements _AnimeDto { final String? banner; @override final String? description; - final List _simulcasts; + final List? _simulcasts; @override - List get simulcasts { + List? 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 _audioLocales; @@ -440,7 +442,7 @@ abstract class _AnimeDto implements AnimeDto { required final String image, required final String? banner, required final String? description, - required final List simulcasts, + required final List? simulcasts, required final List audioLocales, required final List langTypes, required final List seasons, @@ -470,7 +472,7 @@ abstract class _AnimeDto implements AnimeDto { @override String? get description; @override - List get simulcasts; + List? get simulcasts; @override List get audioLocales; @override diff --git a/lib/dtos/anime_dto.g.dart b/lib/dtos/anime_dto.g.dart index 58bcea71..41805d38 100644 --- a/lib/dtos/anime_dto.g.dart +++ b/lib/dtos/anime_dto.g.dart @@ -18,8 +18,8 @@ _$AnimeDtoImpl _$$AnimeDtoImplFromJson(Map json) => image: json['image'] as String, banner: json['banner'] as String?, description: json['description'] as String?, - simulcasts: (json['simulcasts'] as List) - .map((e) => SimulcastDto.fromJson(e as Map)) + simulcasts: (json['simulcasts'] as List?) + ?.map((e) => SimulcastDto.fromJson(e as Map)) .toList(), audioLocales: (json['audioLocales'] as List) .map((e) => e as String)