From 6c504e01257b592fa1ffff84acb307d672f7cc98 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Sun, 8 Mar 2026 14:10:50 +0100 Subject: [PATCH] chore: Update Flutter version and dependencies --- lib/src/data/anime.dart | 4 +- lib/src/data/anime.freezed.dart | 564 ++++++++++----- lib/src/data/anime.g.dart | 8 +- lib/src/data/manga.dart | 4 +- lib/src/data/manga.freezed.dart | 515 +++++++++----- lib/src/data/manga.g.dart | 8 +- lib/src/ui/bloc/anime_list_bloc.freezed.dart | 450 ++++++++---- lib/src/ui/bloc/anime_list_state.dart | 2 +- .../ui/bloc/anime_search_bloc.freezed.dart | 386 +++++++--- lib/src/ui/bloc/anime_search_state.dart | 2 +- lib/src/ui/bloc/calendar_bloc.freezed.dart | 442 ++++++++---- lib/src/ui/bloc/calendar_state.dart | 2 +- lib/src/ui/bloc/details_bloc.freezed.dart | 360 +++++++--- lib/src/ui/bloc/details_state.dart | 2 +- lib/src/ui/bloc/settings_bloc.dart | 14 +- lib/src/ui/bloc/settings_bloc.freezed.dart | 359 +++++++--- lib/src/ui/bloc/settings_state.dart | 2 +- pubspec.lock | 665 +++++++++++------- pubspec.yaml | 32 +- 19 files changed, 2578 insertions(+), 1243 deletions(-) diff --git a/lib/src/data/anime.dart b/lib/src/data/anime.dart index 78335ed..f82e855 100644 --- a/lib/src/data/anime.dart +++ b/lib/src/data/anime.dart @@ -17,7 +17,7 @@ class BoolConverter implements JsonConverter { /// Data about a tracked anime @freezed -class AnimeTrackingData with _$AnimeTrackingData, TrackingMedium { +abstract class AnimeTrackingData with _$AnimeTrackingData, TrackingMedium { factory AnimeTrackingData( /// The ID of the anime String id, @@ -44,6 +44,8 @@ class AnimeTrackingData with _$AnimeTrackingData, TrackingMedium { String? broadcastDay, ) = _AnimeTrackingData; + AnimeTrackingData._(); + /// JSON factory AnimeTrackingData.fromJson(Map json) => _$AnimeTrackingDataFromJson(json); diff --git a/lib/src/data/anime.freezed.dart b/lib/src/data/anime.freezed.dart index f770a0d..b5430a0 100644 --- a/lib/src/data/anime.freezed.dart +++ b/lib/src/data/anime.freezed.dart @@ -1,5 +1,5 @@ -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -9,138 +9,83 @@ part of 'anime.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(T value) => value; -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - -AnimeTrackingData _$AnimeTrackingDataFromJson(Map json) { - return _AnimeTrackingData.fromJson(json); -} - /// @nodoc mixin _$AnimeTrackingData { /// The ID of the anime - String get id => throw _privateConstructorUsedError; + String get id; /// The state of the anime @MediumTrackingStateConverter() - MediumTrackingState get state => throw _privateConstructorUsedError; + MediumTrackingState get state; /// The title of the anime - String get title => throw _privateConstructorUsedError; + String get title; /// Episodes in total. - int get episodesWatched => throw _privateConstructorUsedError; + int get episodesWatched; /// Episodes watched. - int? get episodesTotal => throw _privateConstructorUsedError; + int? get episodesTotal; /// URL to the thumbnail/cover art for the anime. - String get thumbnailUrl => throw _privateConstructorUsedError; + String get thumbnailUrl; /// Flag whether the anime is airing @BoolConverter() - bool get airing => throw _privateConstructorUsedError; + bool get airing; /// The day of the week the anime is airing - String? get broadcastDay => throw _privateConstructorUsedError; - - /// Serializes this AnimeTrackingData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String? get broadcastDay; /// Create a copy of AnimeTrackingData /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $AnimeTrackingDataCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $AnimeTrackingDataCopyWith<$Res> { - factory $AnimeTrackingDataCopyWith( - AnimeTrackingData value, $Res Function(AnimeTrackingData) then) = - _$AnimeTrackingDataCopyWithImpl<$Res, AnimeTrackingData>; - @useResult - $Res call( - {String id, - @MediumTrackingStateConverter() MediumTrackingState state, - String title, - int episodesWatched, - int? episodesTotal, - String thumbnailUrl, - @BoolConverter() bool airing, - String? broadcastDay}); -} - -/// @nodoc -class _$AnimeTrackingDataCopyWithImpl<$Res, $Val extends AnimeTrackingData> - implements $AnimeTrackingDataCopyWith<$Res> { - _$AnimeTrackingDataCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of AnimeTrackingData - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $AnimeTrackingDataCopyWith get copyWith => + _$AnimeTrackingDataCopyWithImpl( + this as AnimeTrackingData, _$identity); + + /// Serializes this AnimeTrackingData to a JSON map. + Map toJson(); + @override - $Res call({ - Object? id = null, - Object? state = null, - Object? title = null, - Object? episodesWatched = null, - Object? episodesTotal = freezed, - Object? thumbnailUrl = null, - Object? airing = null, - Object? broadcastDay = freezed, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - state: null == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as MediumTrackingState, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - episodesWatched: null == episodesWatched - ? _value.episodesWatched - : episodesWatched // ignore: cast_nullable_to_non_nullable - as int, - episodesTotal: freezed == episodesTotal - ? _value.episodesTotal - : episodesTotal // ignore: cast_nullable_to_non_nullable - as int?, - thumbnailUrl: null == thumbnailUrl - ? _value.thumbnailUrl - : thumbnailUrl // ignore: cast_nullable_to_non_nullable - as String, - airing: null == airing - ? _value.airing - : airing // ignore: cast_nullable_to_non_nullable - as bool, - broadcastDay: freezed == broadcastDay - ? _value.broadcastDay - : broadcastDay // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is AnimeTrackingData && + (identical(other.id, id) || other.id == id) && + (identical(other.state, state) || other.state == state) && + (identical(other.title, title) || other.title == title) && + (identical(other.episodesWatched, episodesWatched) || + other.episodesWatched == episodesWatched) && + (identical(other.episodesTotal, episodesTotal) || + other.episodesTotal == episodesTotal) && + (identical(other.thumbnailUrl, thumbnailUrl) || + other.thumbnailUrl == thumbnailUrl) && + (identical(other.airing, airing) || other.airing == airing) && + (identical(other.broadcastDay, broadcastDay) || + other.broadcastDay == broadcastDay)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, id, state, title, + episodesWatched, episodesTotal, thumbnailUrl, airing, broadcastDay); + + @override + String toString() { + return 'AnimeTrackingData(id: $id, state: $state, title: $title, episodesWatched: $episodesWatched, episodesTotal: $episodesTotal, thumbnailUrl: $thumbnailUrl, airing: $airing, broadcastDay: $broadcastDay)'; } } /// @nodoc -abstract class _$$AnimeTrackingDataImplCopyWith<$Res> - implements $AnimeTrackingDataCopyWith<$Res> { - factory _$$AnimeTrackingDataImplCopyWith(_$AnimeTrackingDataImpl value, - $Res Function(_$AnimeTrackingDataImpl) then) = - __$$AnimeTrackingDataImplCopyWithImpl<$Res>; - @override +abstract mixin class $AnimeTrackingDataCopyWith<$Res> { + factory $AnimeTrackingDataCopyWith( + AnimeTrackingData value, $Res Function(AnimeTrackingData) _then) = + _$AnimeTrackingDataCopyWithImpl; @useResult $Res call( {String id, @@ -154,12 +99,12 @@ abstract class _$$AnimeTrackingDataImplCopyWith<$Res> } /// @nodoc -class __$$AnimeTrackingDataImplCopyWithImpl<$Res> - extends _$AnimeTrackingDataCopyWithImpl<$Res, _$AnimeTrackingDataImpl> - implements _$$AnimeTrackingDataImplCopyWith<$Res> { - __$$AnimeTrackingDataImplCopyWithImpl(_$AnimeTrackingDataImpl _value, - $Res Function(_$AnimeTrackingDataImpl) _then) - : super(_value, _then); +class _$AnimeTrackingDataCopyWithImpl<$Res> + implements $AnimeTrackingDataCopyWith<$Res> { + _$AnimeTrackingDataCopyWithImpl(this._self, this._then); + + final AnimeTrackingData _self; + final $Res Function(AnimeTrackingData) _then; /// Create a copy of AnimeTrackingData /// with the given fields replaced by the non-null parameter values. @@ -175,47 +120,255 @@ class __$$AnimeTrackingDataImplCopyWithImpl<$Res> Object? airing = null, Object? broadcastDay = freezed, }) { - return _then(_$AnimeTrackingDataImpl( - null == id - ? _value.id + return _then(_self.copyWith( + id: null == id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as String, - null == state - ? _value.state + state: null == state + ? _self.state : state // ignore: cast_nullable_to_non_nullable as MediumTrackingState, - null == title - ? _value.title + title: null == title + ? _self.title : title // ignore: cast_nullable_to_non_nullable as String, - null == episodesWatched - ? _value.episodesWatched + episodesWatched: null == episodesWatched + ? _self.episodesWatched : episodesWatched // ignore: cast_nullable_to_non_nullable as int, - freezed == episodesTotal - ? _value.episodesTotal + episodesTotal: freezed == episodesTotal + ? _self.episodesTotal : episodesTotal // ignore: cast_nullable_to_non_nullable as int?, - null == thumbnailUrl - ? _value.thumbnailUrl + thumbnailUrl: null == thumbnailUrl + ? _self.thumbnailUrl : thumbnailUrl // ignore: cast_nullable_to_non_nullable as String, - null == airing - ? _value.airing + airing: null == airing + ? _self.airing : airing // ignore: cast_nullable_to_non_nullable as bool, - freezed == broadcastDay - ? _value.broadcastDay + broadcastDay: freezed == broadcastDay + ? _self.broadcastDay : broadcastDay // ignore: cast_nullable_to_non_nullable as String?, )); } } +/// Adds pattern-matching-related methods to [AnimeTrackingData]. +extension AnimeTrackingDataPatterns on AnimeTrackingData { + /// A variant of `map` that fallback to returning `orElse`. + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case final Subclass value: + /// return ...; + /// case _: + /// return orElse(); + /// } + /// ``` + + @optionalTypeArgs + TResult maybeMap( + TResult Function(_AnimeTrackingData value)? $default, { + required TResult orElse(), + }) { + final _that = this; + switch (_that) { + case _AnimeTrackingData() when $default != null: + return $default(_that); + case _: + return orElse(); + } + } + + /// A `switch`-like method, using callbacks. + /// + /// Callbacks receives the raw object, upcasted. + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case final Subclass value: + /// return ...; + /// case final Subclass2 value: + /// return ...; + /// } + /// ``` + + @optionalTypeArgs + TResult map( + TResult Function(_AnimeTrackingData value) $default, + ) { + final _that = this; + switch (_that) { + case _AnimeTrackingData(): + return $default(_that); + case _: + throw StateError('Unexpected subclass'); + } + } + + /// A variant of `map` that fallback to returning `null`. + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case final Subclass value: + /// return ...; + /// case _: + /// return null; + /// } + /// ``` + + @optionalTypeArgs + TResult? mapOrNull( + TResult? Function(_AnimeTrackingData value)? $default, + ) { + final _that = this; + switch (_that) { + case _AnimeTrackingData() when $default != null: + return $default(_that); + case _: + return null; + } + } + + /// A variant of `when` that fallback to an `orElse` callback. + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case Subclass(:final field): + /// return ...; + /// case _: + /// return orElse(); + /// } + /// ``` + + @optionalTypeArgs + TResult maybeWhen( + TResult Function( + String id, + @MediumTrackingStateConverter() MediumTrackingState state, + String title, + int episodesWatched, + int? episodesTotal, + String thumbnailUrl, + @BoolConverter() bool airing, + String? broadcastDay)? + $default, { + required TResult orElse(), + }) { + final _that = this; + switch (_that) { + case _AnimeTrackingData() when $default != null: + return $default( + _that.id, + _that.state, + _that.title, + _that.episodesWatched, + _that.episodesTotal, + _that.thumbnailUrl, + _that.airing, + _that.broadcastDay); + case _: + return orElse(); + } + } + + /// A `switch`-like method, using callbacks. + /// + /// As opposed to `map`, this offers destructuring. + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case Subclass(:final field): + /// return ...; + /// case Subclass2(:final field2): + /// return ...; + /// } + /// ``` + + @optionalTypeArgs + TResult when( + TResult Function( + String id, + @MediumTrackingStateConverter() MediumTrackingState state, + String title, + int episodesWatched, + int? episodesTotal, + String thumbnailUrl, + @BoolConverter() bool airing, + String? broadcastDay) + $default, + ) { + final _that = this; + switch (_that) { + case _AnimeTrackingData(): + return $default( + _that.id, + _that.state, + _that.title, + _that.episodesWatched, + _that.episodesTotal, + _that.thumbnailUrl, + _that.airing, + _that.broadcastDay); + case _: + throw StateError('Unexpected subclass'); + } + } + + /// A variant of `when` that fallback to returning `null` + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case Subclass(:final field): + /// return ...; + /// case _: + /// return null; + /// } + /// ``` + + @optionalTypeArgs + TResult? whenOrNull( + TResult? Function( + String id, + @MediumTrackingStateConverter() MediumTrackingState state, + String title, + int episodesWatched, + int? episodesTotal, + String thumbnailUrl, + @BoolConverter() bool airing, + String? broadcastDay)? + $default, + ) { + final _that = this; + switch (_that) { + case _AnimeTrackingData() when $default != null: + return $default( + _that.id, + _that.state, + _that.title, + _that.episodesWatched, + _that.episodesTotal, + _that.thumbnailUrl, + _that.airing, + _that.broadcastDay); + case _: + return null; + } + } +} + /// @nodoc @JsonSerializable() -class _$AnimeTrackingDataImpl implements _AnimeTrackingData { - _$AnimeTrackingDataImpl( +class _AnimeTrackingData extends AnimeTrackingData { + _AnimeTrackingData( this.id, @MediumTrackingStateConverter() this.state, this.title, @@ -223,10 +376,10 @@ class _$AnimeTrackingDataImpl implements _AnimeTrackingData { this.episodesTotal, this.thumbnailUrl, @BoolConverter() this.airing, - this.broadcastDay); - - factory _$AnimeTrackingDataImpl.fromJson(Map json) => - _$$AnimeTrackingDataImplFromJson(json); + this.broadcastDay) + : super._(); + factory _AnimeTrackingData.fromJson(Map json) => + _$AnimeTrackingDataFromJson(json); /// The ID of the anime @override @@ -262,16 +415,26 @@ class _$AnimeTrackingDataImpl implements _AnimeTrackingData { @override final String? broadcastDay; + /// Create a copy of AnimeTrackingData + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'AnimeTrackingData(id: $id, state: $state, title: $title, episodesWatched: $episodesWatched, episodesTotal: $episodesTotal, thumbnailUrl: $thumbnailUrl, airing: $airing, broadcastDay: $broadcastDay)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$AnimeTrackingDataCopyWith<_AnimeTrackingData> get copyWith => + __$AnimeTrackingDataCopyWithImpl<_AnimeTrackingData>(this, _$identity); + + @override + Map toJson() { + return _$AnimeTrackingDataToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$AnimeTrackingDataImpl && + other is _AnimeTrackingData && (identical(other.id, id) || other.id == id) && (identical(other.state, state) || other.state == state) && (identical(other.title, title) || other.title == title) && @@ -291,75 +454,88 @@ class _$AnimeTrackingDataImpl implements _AnimeTrackingData { int get hashCode => Object.hash(runtimeType, id, state, title, episodesWatched, episodesTotal, thumbnailUrl, airing, broadcastDay); - /// Create a copy of AnimeTrackingData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$AnimeTrackingDataImplCopyWith<_$AnimeTrackingDataImpl> get copyWith => - __$$AnimeTrackingDataImplCopyWithImpl<_$AnimeTrackingDataImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$AnimeTrackingDataImplToJson( - this, - ); + String toString() { + return 'AnimeTrackingData(id: $id, state: $state, title: $title, episodesWatched: $episodesWatched, episodesTotal: $episodesTotal, thumbnailUrl: $thumbnailUrl, airing: $airing, broadcastDay: $broadcastDay)'; } } -abstract class _AnimeTrackingData implements AnimeTrackingData { - factory _AnimeTrackingData( - final String id, - @MediumTrackingStateConverter() final MediumTrackingState state, - final String title, - final int episodesWatched, - final int? episodesTotal, - final String thumbnailUrl, - @BoolConverter() final bool airing, - final String? broadcastDay) = _$AnimeTrackingDataImpl; - - factory _AnimeTrackingData.fromJson(Map json) = - _$AnimeTrackingDataImpl.fromJson; - - /// The ID of the anime +/// @nodoc +abstract mixin class _$AnimeTrackingDataCopyWith<$Res> + implements $AnimeTrackingDataCopyWith<$Res> { + factory _$AnimeTrackingDataCopyWith( + _AnimeTrackingData value, $Res Function(_AnimeTrackingData) _then) = + __$AnimeTrackingDataCopyWithImpl; @override - String get id; + @useResult + $Res call( + {String id, + @MediumTrackingStateConverter() MediumTrackingState state, + String title, + int episodesWatched, + int? episodesTotal, + String thumbnailUrl, + @BoolConverter() bool airing, + String? broadcastDay}); +} - /// The state of the anime - @override - @MediumTrackingStateConverter() - MediumTrackingState get state; +/// @nodoc +class __$AnimeTrackingDataCopyWithImpl<$Res> + implements _$AnimeTrackingDataCopyWith<$Res> { + __$AnimeTrackingDataCopyWithImpl(this._self, this._then); - /// The title of the anime - @override - String get title; - - /// Episodes in total. - @override - int get episodesWatched; - - /// Episodes watched. - @override - int? get episodesTotal; - - /// URL to the thumbnail/cover art for the anime. - @override - String get thumbnailUrl; - - /// Flag whether the anime is airing - @override - @BoolConverter() - bool get airing; - - /// The day of the week the anime is airing - @override - String? get broadcastDay; + final _AnimeTrackingData _self; + final $Res Function(_AnimeTrackingData) _then; /// Create a copy of AnimeTrackingData /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$AnimeTrackingDataImplCopyWith<_$AnimeTrackingDataImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? state = null, + Object? title = null, + Object? episodesWatched = null, + Object? episodesTotal = freezed, + Object? thumbnailUrl = null, + Object? airing = null, + Object? broadcastDay = freezed, + }) { + return _then(_AnimeTrackingData( + null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String, + null == state + ? _self.state + : state // ignore: cast_nullable_to_non_nullable + as MediumTrackingState, + null == title + ? _self.title + : title // ignore: cast_nullable_to_non_nullable + as String, + null == episodesWatched + ? _self.episodesWatched + : episodesWatched // ignore: cast_nullable_to_non_nullable + as int, + freezed == episodesTotal + ? _self.episodesTotal + : episodesTotal // ignore: cast_nullable_to_non_nullable + as int?, + null == thumbnailUrl + ? _self.thumbnailUrl + : thumbnailUrl // ignore: cast_nullable_to_non_nullable + as String, + null == airing + ? _self.airing + : airing // ignore: cast_nullable_to_non_nullable + as bool, + freezed == broadcastDay + ? _self.broadcastDay + : broadcastDay // ignore: cast_nullable_to_non_nullable + as String?, + )); + } } + +// dart format on diff --git a/lib/src/data/anime.g.dart b/lib/src/data/anime.g.dart index 6c3b813..b19a1a8 100644 --- a/lib/src/data/anime.g.dart +++ b/lib/src/data/anime.g.dart @@ -6,9 +6,8 @@ part of 'anime.dart'; // JsonSerializableGenerator // ************************************************************************** -_$AnimeTrackingDataImpl _$$AnimeTrackingDataImplFromJson( - Map json) => - _$AnimeTrackingDataImpl( +_AnimeTrackingData _$AnimeTrackingDataFromJson(Map json) => + _AnimeTrackingData( json['id'] as String, const MediumTrackingStateConverter() .fromJson((json['state'] as num).toInt()), @@ -20,8 +19,7 @@ _$AnimeTrackingDataImpl _$$AnimeTrackingDataImplFromJson( json['broadcastDay'] as String?, ); -Map _$$AnimeTrackingDataImplToJson( - _$AnimeTrackingDataImpl instance) => +Map _$AnimeTrackingDataToJson(_AnimeTrackingData instance) => { 'id': instance.id, 'state': const MediumTrackingStateConverter().toJson(instance.state), diff --git a/lib/src/data/manga.dart b/lib/src/data/manga.dart index d13a57a..599c5b7 100644 --- a/lib/src/data/manga.dart +++ b/lib/src/data/manga.dart @@ -6,7 +6,7 @@ part 'manga.g.dart'; /// Data about a tracked anime @freezed -class MangaTrackingData with _$MangaTrackingData, TrackingMedium { +abstract class MangaTrackingData with _$MangaTrackingData, TrackingMedium { factory MangaTrackingData( /// The ID of the manga String id, @@ -30,6 +30,8 @@ class MangaTrackingData with _$MangaTrackingData, TrackingMedium { String thumbnailUrl, ) = _MangaTrackingData; + MangaTrackingData._(); + /// JSON factory MangaTrackingData.fromJson(Map json) => _$MangaTrackingDataFromJson(json); diff --git a/lib/src/data/manga.freezed.dart b/lib/src/data/manga.freezed.dart index 151905c..691e586 100644 --- a/lib/src/data/manga.freezed.dart +++ b/lib/src/data/manga.freezed.dart @@ -1,5 +1,5 @@ -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -9,128 +9,78 @@ part of 'manga.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(T value) => value; -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - -MangaTrackingData _$MangaTrackingDataFromJson(Map json) { - return _MangaTrackingData.fromJson(json); -} - /// @nodoc mixin _$MangaTrackingData { /// The ID of the manga - String get id => throw _privateConstructorUsedError; + String get id; /// The state of the manga @MediumTrackingStateConverter() - MediumTrackingState get state => throw _privateConstructorUsedError; + MediumTrackingState get state; /// The title of the manga - String get title => throw _privateConstructorUsedError; + String get title; /// Chapters read. - int get chaptersRead => throw _privateConstructorUsedError; + int get chaptersRead; /// Chapters read. - int get volumesOwned => throw _privateConstructorUsedError; + int get volumesOwned; /// Episodes watched. - int? get chaptersTotal => throw _privateConstructorUsedError; + int? get chaptersTotal; /// URL to the thumbnail/cover art for the manga. - String get thumbnailUrl => throw _privateConstructorUsedError; - - /// Serializes this MangaTrackingData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get thumbnailUrl; /// Create a copy of MangaTrackingData /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $MangaTrackingDataCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $MangaTrackingDataCopyWith<$Res> { - factory $MangaTrackingDataCopyWith( - MangaTrackingData value, $Res Function(MangaTrackingData) then) = - _$MangaTrackingDataCopyWithImpl<$Res, MangaTrackingData>; - @useResult - $Res call( - {String id, - @MediumTrackingStateConverter() MediumTrackingState state, - String title, - int chaptersRead, - int volumesOwned, - int? chaptersTotal, - String thumbnailUrl}); -} - -/// @nodoc -class _$MangaTrackingDataCopyWithImpl<$Res, $Val extends MangaTrackingData> - implements $MangaTrackingDataCopyWith<$Res> { - _$MangaTrackingDataCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of MangaTrackingData - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $MangaTrackingDataCopyWith get copyWith => + _$MangaTrackingDataCopyWithImpl( + this as MangaTrackingData, _$identity); + + /// Serializes this MangaTrackingData to a JSON map. + Map toJson(); + @override - $Res call({ - Object? id = null, - Object? state = null, - Object? title = null, - Object? chaptersRead = null, - Object? volumesOwned = null, - Object? chaptersTotal = freezed, - Object? thumbnailUrl = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - state: null == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as MediumTrackingState, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - chaptersRead: null == chaptersRead - ? _value.chaptersRead - : chaptersRead // ignore: cast_nullable_to_non_nullable - as int, - volumesOwned: null == volumesOwned - ? _value.volumesOwned - : volumesOwned // ignore: cast_nullable_to_non_nullable - as int, - chaptersTotal: freezed == chaptersTotal - ? _value.chaptersTotal - : chaptersTotal // ignore: cast_nullable_to_non_nullable - as int?, - thumbnailUrl: null == thumbnailUrl - ? _value.thumbnailUrl - : thumbnailUrl // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is MangaTrackingData && + (identical(other.id, id) || other.id == id) && + (identical(other.state, state) || other.state == state) && + (identical(other.title, title) || other.title == title) && + (identical(other.chaptersRead, chaptersRead) || + other.chaptersRead == chaptersRead) && + (identical(other.volumesOwned, volumesOwned) || + other.volumesOwned == volumesOwned) && + (identical(other.chaptersTotal, chaptersTotal) || + other.chaptersTotal == chaptersTotal) && + (identical(other.thumbnailUrl, thumbnailUrl) || + other.thumbnailUrl == thumbnailUrl)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, id, state, title, chaptersRead, + volumesOwned, chaptersTotal, thumbnailUrl); + + @override + String toString() { + return 'MangaTrackingData(id: $id, state: $state, title: $title, chaptersRead: $chaptersRead, volumesOwned: $volumesOwned, chaptersTotal: $chaptersTotal, thumbnailUrl: $thumbnailUrl)'; } } /// @nodoc -abstract class _$$MangaTrackingDataImplCopyWith<$Res> - implements $MangaTrackingDataCopyWith<$Res> { - factory _$$MangaTrackingDataImplCopyWith(_$MangaTrackingDataImpl value, - $Res Function(_$MangaTrackingDataImpl) then) = - __$$MangaTrackingDataImplCopyWithImpl<$Res>; - @override +abstract mixin class $MangaTrackingDataCopyWith<$Res> { + factory $MangaTrackingDataCopyWith( + MangaTrackingData value, $Res Function(MangaTrackingData) _then) = + _$MangaTrackingDataCopyWithImpl; @useResult $Res call( {String id, @@ -143,12 +93,12 @@ abstract class _$$MangaTrackingDataImplCopyWith<$Res> } /// @nodoc -class __$$MangaTrackingDataImplCopyWithImpl<$Res> - extends _$MangaTrackingDataCopyWithImpl<$Res, _$MangaTrackingDataImpl> - implements _$$MangaTrackingDataImplCopyWith<$Res> { - __$$MangaTrackingDataImplCopyWithImpl(_$MangaTrackingDataImpl _value, - $Res Function(_$MangaTrackingDataImpl) _then) - : super(_value, _then); +class _$MangaTrackingDataCopyWithImpl<$Res> + implements $MangaTrackingDataCopyWith<$Res> { + _$MangaTrackingDataCopyWithImpl(this._self, this._then); + + final MangaTrackingData _self; + final $Res Function(MangaTrackingData) _then; /// Create a copy of MangaTrackingData /// with the given fields replaced by the non-null parameter values. @@ -163,53 +113,237 @@ class __$$MangaTrackingDataImplCopyWithImpl<$Res> Object? chaptersTotal = freezed, Object? thumbnailUrl = null, }) { - return _then(_$MangaTrackingDataImpl( - null == id - ? _value.id + return _then(_self.copyWith( + id: null == id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as String, - null == state - ? _value.state + state: null == state + ? _self.state : state // ignore: cast_nullable_to_non_nullable as MediumTrackingState, - null == title - ? _value.title + title: null == title + ? _self.title : title // ignore: cast_nullable_to_non_nullable as String, - null == chaptersRead - ? _value.chaptersRead + chaptersRead: null == chaptersRead + ? _self.chaptersRead : chaptersRead // ignore: cast_nullable_to_non_nullable as int, - null == volumesOwned - ? _value.volumesOwned + volumesOwned: null == volumesOwned + ? _self.volumesOwned : volumesOwned // ignore: cast_nullable_to_non_nullable as int, - freezed == chaptersTotal - ? _value.chaptersTotal + chaptersTotal: freezed == chaptersTotal + ? _self.chaptersTotal : chaptersTotal // ignore: cast_nullable_to_non_nullable as int?, - null == thumbnailUrl - ? _value.thumbnailUrl + thumbnailUrl: null == thumbnailUrl + ? _self.thumbnailUrl : thumbnailUrl // ignore: cast_nullable_to_non_nullable as String, )); } } +/// Adds pattern-matching-related methods to [MangaTrackingData]. +extension MangaTrackingDataPatterns on MangaTrackingData { + /// A variant of `map` that fallback to returning `orElse`. + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case final Subclass value: + /// return ...; + /// case _: + /// return orElse(); + /// } + /// ``` + + @optionalTypeArgs + TResult maybeMap( + TResult Function(_MangaTrackingData value)? $default, { + required TResult orElse(), + }) { + final _that = this; + switch (_that) { + case _MangaTrackingData() when $default != null: + return $default(_that); + case _: + return orElse(); + } + } + + /// A `switch`-like method, using callbacks. + /// + /// Callbacks receives the raw object, upcasted. + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case final Subclass value: + /// return ...; + /// case final Subclass2 value: + /// return ...; + /// } + /// ``` + + @optionalTypeArgs + TResult map( + TResult Function(_MangaTrackingData value) $default, + ) { + final _that = this; + switch (_that) { + case _MangaTrackingData(): + return $default(_that); + case _: + throw StateError('Unexpected subclass'); + } + } + + /// A variant of `map` that fallback to returning `null`. + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case final Subclass value: + /// return ...; + /// case _: + /// return null; + /// } + /// ``` + + @optionalTypeArgs + TResult? mapOrNull( + TResult? Function(_MangaTrackingData value)? $default, + ) { + final _that = this; + switch (_that) { + case _MangaTrackingData() when $default != null: + return $default(_that); + case _: + return null; + } + } + + /// A variant of `when` that fallback to an `orElse` callback. + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case Subclass(:final field): + /// return ...; + /// case _: + /// return orElse(); + /// } + /// ``` + + @optionalTypeArgs + TResult maybeWhen( + TResult Function( + String id, + @MediumTrackingStateConverter() MediumTrackingState state, + String title, + int chaptersRead, + int volumesOwned, + int? chaptersTotal, + String thumbnailUrl)? + $default, { + required TResult orElse(), + }) { + final _that = this; + switch (_that) { + case _MangaTrackingData() when $default != null: + return $default(_that.id, _that.state, _that.title, _that.chaptersRead, + _that.volumesOwned, _that.chaptersTotal, _that.thumbnailUrl); + case _: + return orElse(); + } + } + + /// A `switch`-like method, using callbacks. + /// + /// As opposed to `map`, this offers destructuring. + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case Subclass(:final field): + /// return ...; + /// case Subclass2(:final field2): + /// return ...; + /// } + /// ``` + + @optionalTypeArgs + TResult when( + TResult Function( + String id, + @MediumTrackingStateConverter() MediumTrackingState state, + String title, + int chaptersRead, + int volumesOwned, + int? chaptersTotal, + String thumbnailUrl) + $default, + ) { + final _that = this; + switch (_that) { + case _MangaTrackingData(): + return $default(_that.id, _that.state, _that.title, _that.chaptersRead, + _that.volumesOwned, _that.chaptersTotal, _that.thumbnailUrl); + case _: + throw StateError('Unexpected subclass'); + } + } + + /// A variant of `when` that fallback to returning `null` + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case Subclass(:final field): + /// return ...; + /// case _: + /// return null; + /// } + /// ``` + + @optionalTypeArgs + TResult? whenOrNull( + TResult? Function( + String id, + @MediumTrackingStateConverter() MediumTrackingState state, + String title, + int chaptersRead, + int volumesOwned, + int? chaptersTotal, + String thumbnailUrl)? + $default, + ) { + final _that = this; + switch (_that) { + case _MangaTrackingData() when $default != null: + return $default(_that.id, _that.state, _that.title, _that.chaptersRead, + _that.volumesOwned, _that.chaptersTotal, _that.thumbnailUrl); + case _: + return null; + } + } +} + /// @nodoc @JsonSerializable() -class _$MangaTrackingDataImpl implements _MangaTrackingData { - _$MangaTrackingDataImpl( +class _MangaTrackingData extends MangaTrackingData { + _MangaTrackingData( this.id, @MediumTrackingStateConverter() this.state, this.title, this.chaptersRead, this.volumesOwned, this.chaptersTotal, - this.thumbnailUrl); - - factory _$MangaTrackingDataImpl.fromJson(Map json) => - _$$MangaTrackingDataImplFromJson(json); + this.thumbnailUrl) + : super._(); + factory _MangaTrackingData.fromJson(Map json) => + _$MangaTrackingDataFromJson(json); /// The ID of the manga @override @@ -240,16 +374,26 @@ class _$MangaTrackingDataImpl implements _MangaTrackingData { @override final String thumbnailUrl; + /// Create a copy of MangaTrackingData + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'MangaTrackingData(id: $id, state: $state, title: $title, chaptersRead: $chaptersRead, volumesOwned: $volumesOwned, chaptersTotal: $chaptersTotal, thumbnailUrl: $thumbnailUrl)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$MangaTrackingDataCopyWith<_MangaTrackingData> get copyWith => + __$MangaTrackingDataCopyWithImpl<_MangaTrackingData>(this, _$identity); + + @override + Map toJson() { + return _$MangaTrackingDataToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$MangaTrackingDataImpl && + other is _MangaTrackingData && (identical(other.id, id) || other.id == id) && (identical(other.state, state) || other.state == state) && (identical(other.title, title) || other.title == title) && @@ -268,69 +412,82 @@ class _$MangaTrackingDataImpl implements _MangaTrackingData { int get hashCode => Object.hash(runtimeType, id, state, title, chaptersRead, volumesOwned, chaptersTotal, thumbnailUrl); - /// Create a copy of MangaTrackingData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$MangaTrackingDataImplCopyWith<_$MangaTrackingDataImpl> get copyWith => - __$$MangaTrackingDataImplCopyWithImpl<_$MangaTrackingDataImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$MangaTrackingDataImplToJson( - this, - ); + String toString() { + return 'MangaTrackingData(id: $id, state: $state, title: $title, chaptersRead: $chaptersRead, volumesOwned: $volumesOwned, chaptersTotal: $chaptersTotal, thumbnailUrl: $thumbnailUrl)'; } } -abstract class _MangaTrackingData implements MangaTrackingData { - factory _MangaTrackingData( - final String id, - @MediumTrackingStateConverter() final MediumTrackingState state, - final String title, - final int chaptersRead, - final int volumesOwned, - final int? chaptersTotal, - final String thumbnailUrl) = _$MangaTrackingDataImpl; - - factory _MangaTrackingData.fromJson(Map json) = - _$MangaTrackingDataImpl.fromJson; - - /// The ID of the manga +/// @nodoc +abstract mixin class _$MangaTrackingDataCopyWith<$Res> + implements $MangaTrackingDataCopyWith<$Res> { + factory _$MangaTrackingDataCopyWith( + _MangaTrackingData value, $Res Function(_MangaTrackingData) _then) = + __$MangaTrackingDataCopyWithImpl; @override - String get id; + @useResult + $Res call( + {String id, + @MediumTrackingStateConverter() MediumTrackingState state, + String title, + int chaptersRead, + int volumesOwned, + int? chaptersTotal, + String thumbnailUrl}); +} - /// The state of the manga - @override - @MediumTrackingStateConverter() - MediumTrackingState get state; +/// @nodoc +class __$MangaTrackingDataCopyWithImpl<$Res> + implements _$MangaTrackingDataCopyWith<$Res> { + __$MangaTrackingDataCopyWithImpl(this._self, this._then); - /// The title of the manga - @override - String get title; - - /// Chapters read. - @override - int get chaptersRead; - - /// Chapters read. - @override - int get volumesOwned; - - /// Episodes watched. - @override - int? get chaptersTotal; - - /// URL to the thumbnail/cover art for the manga. - @override - String get thumbnailUrl; + final _MangaTrackingData _self; + final $Res Function(_MangaTrackingData) _then; /// Create a copy of MangaTrackingData /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$MangaTrackingDataImplCopyWith<_$MangaTrackingDataImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? state = null, + Object? title = null, + Object? chaptersRead = null, + Object? volumesOwned = null, + Object? chaptersTotal = freezed, + Object? thumbnailUrl = null, + }) { + return _then(_MangaTrackingData( + null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String, + null == state + ? _self.state + : state // ignore: cast_nullable_to_non_nullable + as MediumTrackingState, + null == title + ? _self.title + : title // ignore: cast_nullable_to_non_nullable + as String, + null == chaptersRead + ? _self.chaptersRead + : chaptersRead // ignore: cast_nullable_to_non_nullable + as int, + null == volumesOwned + ? _self.volumesOwned + : volumesOwned // ignore: cast_nullable_to_non_nullable + as int, + freezed == chaptersTotal + ? _self.chaptersTotal + : chaptersTotal // ignore: cast_nullable_to_non_nullable + as int?, + null == thumbnailUrl + ? _self.thumbnailUrl + : thumbnailUrl // ignore: cast_nullable_to_non_nullable + as String, + )); + } } + +// dart format on diff --git a/lib/src/data/manga.g.dart b/lib/src/data/manga.g.dart index d829ae3..34021d3 100644 --- a/lib/src/data/manga.g.dart +++ b/lib/src/data/manga.g.dart @@ -6,9 +6,8 @@ part of 'manga.dart'; // JsonSerializableGenerator // ************************************************************************** -_$MangaTrackingDataImpl _$$MangaTrackingDataImplFromJson( - Map json) => - _$MangaTrackingDataImpl( +_MangaTrackingData _$MangaTrackingDataFromJson(Map json) => + _MangaTrackingData( json['id'] as String, const MediumTrackingStateConverter() .fromJson((json['state'] as num).toInt()), @@ -19,8 +18,7 @@ _$MangaTrackingDataImpl _$$MangaTrackingDataImplFromJson( json['thumbnailUrl'] as String, ); -Map _$$MangaTrackingDataImplToJson( - _$MangaTrackingDataImpl instance) => +Map _$MangaTrackingDataToJson(_MangaTrackingData instance) => { 'id': instance.id, 'state': const MediumTrackingStateConverter().toJson(instance.state), diff --git a/lib/src/ui/bloc/anime_list_bloc.freezed.dart b/lib/src/ui/bloc/anime_list_bloc.freezed.dart index bb77e8e..f5e35b7 100644 --- a/lib/src/ui/bloc/anime_list_bloc.freezed.dart +++ b/lib/src/ui/bloc/anime_list_bloc.freezed.dart @@ -1,5 +1,5 @@ -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -9,102 +9,64 @@ part of 'anime_list_bloc.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(T value) => value; -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - /// @nodoc mixin _$AnimeListState { - bool get buttonVisibility => throw _privateConstructorUsedError; - List get animes => throw _privateConstructorUsedError; - List get mangas => throw _privateConstructorUsedError; - MediumTrackingState get animeFilterState => - throw _privateConstructorUsedError; - MediumTrackingState get mangaFilterState => - throw _privateConstructorUsedError; - TrackingMediumType get trackingType => throw _privateConstructorUsedError; + bool get buttonVisibility; + List get animes; + List get mangas; + MediumTrackingState get animeFilterState; + MediumTrackingState get mangaFilterState; + TrackingMediumType get trackingType; /// Create a copy of AnimeListState /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $AnimeListStateCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $AnimeListStateCopyWith<$Res> { - factory $AnimeListStateCopyWith( - AnimeListState value, $Res Function(AnimeListState) then) = - _$AnimeListStateCopyWithImpl<$Res, AnimeListState>; - @useResult - $Res call( - {bool buttonVisibility, - List animes, - List mangas, - MediumTrackingState animeFilterState, - MediumTrackingState mangaFilterState, - TrackingMediumType trackingType}); -} - -/// @nodoc -class _$AnimeListStateCopyWithImpl<$Res, $Val extends AnimeListState> - implements $AnimeListStateCopyWith<$Res> { - _$AnimeListStateCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of AnimeListState - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $AnimeListStateCopyWith get copyWith => + _$AnimeListStateCopyWithImpl( + this as AnimeListState, _$identity); + @override - $Res call({ - Object? buttonVisibility = null, - Object? animes = null, - Object? mangas = null, - Object? animeFilterState = null, - Object? mangaFilterState = null, - Object? trackingType = null, - }) { - return _then(_value.copyWith( - buttonVisibility: null == buttonVisibility - ? _value.buttonVisibility - : buttonVisibility // ignore: cast_nullable_to_non_nullable - as bool, - animes: null == animes - ? _value.animes - : animes // ignore: cast_nullable_to_non_nullable - as List, - mangas: null == mangas - ? _value.mangas - : mangas // ignore: cast_nullable_to_non_nullable - as List, - animeFilterState: null == animeFilterState - ? _value.animeFilterState - : animeFilterState // ignore: cast_nullable_to_non_nullable - as MediumTrackingState, - mangaFilterState: null == mangaFilterState - ? _value.mangaFilterState - : mangaFilterState // ignore: cast_nullable_to_non_nullable - as MediumTrackingState, - trackingType: null == trackingType - ? _value.trackingType - : trackingType // ignore: cast_nullable_to_non_nullable - as TrackingMediumType, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is AnimeListState && + (identical(other.buttonVisibility, buttonVisibility) || + other.buttonVisibility == buttonVisibility) && + const DeepCollectionEquality().equals(other.animes, animes) && + const DeepCollectionEquality().equals(other.mangas, mangas) && + (identical(other.animeFilterState, animeFilterState) || + other.animeFilterState == animeFilterState) && + (identical(other.mangaFilterState, mangaFilterState) || + other.mangaFilterState == mangaFilterState) && + (identical(other.trackingType, trackingType) || + other.trackingType == trackingType)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + buttonVisibility, + const DeepCollectionEquality().hash(animes), + const DeepCollectionEquality().hash(mangas), + animeFilterState, + mangaFilterState, + trackingType); + + @override + String toString() { + return 'AnimeListState(buttonVisibility: $buttonVisibility, animes: $animes, mangas: $mangas, animeFilterState: $animeFilterState, mangaFilterState: $mangaFilterState, trackingType: $trackingType)'; } } /// @nodoc -abstract class _$$AnimeListStateImplCopyWith<$Res> - implements $AnimeListStateCopyWith<$Res> { - factory _$$AnimeListStateImplCopyWith(_$AnimeListStateImpl value, - $Res Function(_$AnimeListStateImpl) then) = - __$$AnimeListStateImplCopyWithImpl<$Res>; - @override +abstract mixin class $AnimeListStateCopyWith<$Res> { + factory $AnimeListStateCopyWith( + AnimeListState value, $Res Function(AnimeListState) _then) = + _$AnimeListStateCopyWithImpl; @useResult $Res call( {bool buttonVisibility, @@ -116,12 +78,12 @@ abstract class _$$AnimeListStateImplCopyWith<$Res> } /// @nodoc -class __$$AnimeListStateImplCopyWithImpl<$Res> - extends _$AnimeListStateCopyWithImpl<$Res, _$AnimeListStateImpl> - implements _$$AnimeListStateImplCopyWith<$Res> { - __$$AnimeListStateImplCopyWithImpl( - _$AnimeListStateImpl _value, $Res Function(_$AnimeListStateImpl) _then) - : super(_value, _then); +class _$AnimeListStateCopyWithImpl<$Res> + implements $AnimeListStateCopyWith<$Res> { + _$AnimeListStateCopyWithImpl(this._self, this._then); + + final AnimeListState _self; + final $Res Function(AnimeListState) _then; /// Create a copy of AnimeListState /// with the given fields replaced by the non-null parameter values. @@ -135,39 +97,220 @@ class __$$AnimeListStateImplCopyWithImpl<$Res> Object? mangaFilterState = null, Object? trackingType = null, }) { - return _then(_$AnimeListStateImpl( + return _then(_self.copyWith( buttonVisibility: null == buttonVisibility - ? _value.buttonVisibility + ? _self.buttonVisibility : buttonVisibility // ignore: cast_nullable_to_non_nullable as bool, animes: null == animes - ? _value._animes + ? _self.animes : animes // ignore: cast_nullable_to_non_nullable as List, mangas: null == mangas - ? _value._mangas + ? _self.mangas : mangas // ignore: cast_nullable_to_non_nullable as List, animeFilterState: null == animeFilterState - ? _value.animeFilterState + ? _self.animeFilterState : animeFilterState // ignore: cast_nullable_to_non_nullable as MediumTrackingState, mangaFilterState: null == mangaFilterState - ? _value.mangaFilterState + ? _self.mangaFilterState : mangaFilterState // ignore: cast_nullable_to_non_nullable as MediumTrackingState, trackingType: null == trackingType - ? _value.trackingType + ? _self.trackingType : trackingType // ignore: cast_nullable_to_non_nullable as TrackingMediumType, )); } } +/// Adds pattern-matching-related methods to [AnimeListState]. +extension AnimeListStatePatterns on AnimeListState { + /// A variant of `map` that fallback to returning `orElse`. + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case final Subclass value: + /// return ...; + /// case _: + /// return orElse(); + /// } + /// ``` + + @optionalTypeArgs + TResult maybeMap( + TResult Function(_AnimeListState value)? $default, { + required TResult orElse(), + }) { + final _that = this; + switch (_that) { + case _AnimeListState() when $default != null: + return $default(_that); + case _: + return orElse(); + } + } + + /// A `switch`-like method, using callbacks. + /// + /// Callbacks receives the raw object, upcasted. + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case final Subclass value: + /// return ...; + /// case final Subclass2 value: + /// return ...; + /// } + /// ``` + + @optionalTypeArgs + TResult map( + TResult Function(_AnimeListState value) $default, + ) { + final _that = this; + switch (_that) { + case _AnimeListState(): + return $default(_that); + case _: + throw StateError('Unexpected subclass'); + } + } + + /// A variant of `map` that fallback to returning `null`. + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case final Subclass value: + /// return ...; + /// case _: + /// return null; + /// } + /// ``` + + @optionalTypeArgs + TResult? mapOrNull( + TResult? Function(_AnimeListState value)? $default, + ) { + final _that = this; + switch (_that) { + case _AnimeListState() when $default != null: + return $default(_that); + case _: + return null; + } + } + + /// A variant of `when` that fallback to an `orElse` callback. + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case Subclass(:final field): + /// return ...; + /// case _: + /// return orElse(); + /// } + /// ``` + + @optionalTypeArgs + TResult maybeWhen( + TResult Function( + bool buttonVisibility, + List animes, + List mangas, + MediumTrackingState animeFilterState, + MediumTrackingState mangaFilterState, + TrackingMediumType trackingType)? + $default, { + required TResult orElse(), + }) { + final _that = this; + switch (_that) { + case _AnimeListState() when $default != null: + return $default(_that.buttonVisibility, _that.animes, _that.mangas, + _that.animeFilterState, _that.mangaFilterState, _that.trackingType); + case _: + return orElse(); + } + } + + /// A `switch`-like method, using callbacks. + /// + /// As opposed to `map`, this offers destructuring. + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case Subclass(:final field): + /// return ...; + /// case Subclass2(:final field2): + /// return ...; + /// } + /// ``` + + @optionalTypeArgs + TResult when( + TResult Function( + bool buttonVisibility, + List animes, + List mangas, + MediumTrackingState animeFilterState, + MediumTrackingState mangaFilterState, + TrackingMediumType trackingType) + $default, + ) { + final _that = this; + switch (_that) { + case _AnimeListState(): + return $default(_that.buttonVisibility, _that.animes, _that.mangas, + _that.animeFilterState, _that.mangaFilterState, _that.trackingType); + case _: + throw StateError('Unexpected subclass'); + } + } + + /// A variant of `when` that fallback to returning `null` + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case Subclass(:final field): + /// return ...; + /// case _: + /// return null; + /// } + /// ``` + + @optionalTypeArgs + TResult? whenOrNull( + TResult? Function( + bool buttonVisibility, + List animes, + List mangas, + MediumTrackingState animeFilterState, + MediumTrackingState mangaFilterState, + TrackingMediumType trackingType)? + $default, + ) { + final _that = this; + switch (_that) { + case _AnimeListState() when $default != null: + return $default(_that.buttonVisibility, _that.animes, _that.mangas, + _that.animeFilterState, _that.mangaFilterState, _that.trackingType); + case _: + return null; + } + } +} + /// @nodoc -class _$AnimeListStateImpl implements _AnimeListState { - _$AnimeListStateImpl( +class _AnimeListState implements AnimeListState { + _AnimeListState( {this.buttonVisibility = true, final List animes = const [], final List mangas = const [], @@ -208,16 +351,19 @@ class _$AnimeListStateImpl implements _AnimeListState { @JsonKey() final TrackingMediumType trackingType; + /// Create a copy of AnimeListState + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'AnimeListState(buttonVisibility: $buttonVisibility, animes: $animes, mangas: $mangas, animeFilterState: $animeFilterState, mangaFilterState: $mangaFilterState, trackingType: $trackingType)'; - } + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$AnimeListStateCopyWith<_AnimeListState> get copyWith => + __$AnimeListStateCopyWithImpl<_AnimeListState>(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$AnimeListStateImpl && + other is _AnimeListState && (identical(other.buttonVisibility, buttonVisibility) || other.buttonVisibility == buttonVisibility) && const DeepCollectionEquality().equals(other._animes, _animes) && @@ -240,42 +386,76 @@ class _$AnimeListStateImpl implements _AnimeListState { mangaFilterState, trackingType); + @override + String toString() { + return 'AnimeListState(buttonVisibility: $buttonVisibility, animes: $animes, mangas: $mangas, animeFilterState: $animeFilterState, mangaFilterState: $mangaFilterState, trackingType: $trackingType)'; + } +} + +/// @nodoc +abstract mixin class _$AnimeListStateCopyWith<$Res> + implements $AnimeListStateCopyWith<$Res> { + factory _$AnimeListStateCopyWith( + _AnimeListState value, $Res Function(_AnimeListState) _then) = + __$AnimeListStateCopyWithImpl; + @override + @useResult + $Res call( + {bool buttonVisibility, + List animes, + List mangas, + MediumTrackingState animeFilterState, + MediumTrackingState mangaFilterState, + TrackingMediumType trackingType}); +} + +/// @nodoc +class __$AnimeListStateCopyWithImpl<$Res> + implements _$AnimeListStateCopyWith<$Res> { + __$AnimeListStateCopyWithImpl(this._self, this._then); + + final _AnimeListState _self; + final $Res Function(_AnimeListState) _then; + /// Create a copy of AnimeListState /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$AnimeListStateImplCopyWith<_$AnimeListStateImpl> get copyWith => - __$$AnimeListStateImplCopyWithImpl<_$AnimeListStateImpl>( - this, _$identity); + $Res call({ + Object? buttonVisibility = null, + Object? animes = null, + Object? mangas = null, + Object? animeFilterState = null, + Object? mangaFilterState = null, + Object? trackingType = null, + }) { + return _then(_AnimeListState( + buttonVisibility: null == buttonVisibility + ? _self.buttonVisibility + : buttonVisibility // ignore: cast_nullable_to_non_nullable + as bool, + animes: null == animes + ? _self._animes + : animes // ignore: cast_nullable_to_non_nullable + as List, + mangas: null == mangas + ? _self._mangas + : mangas // ignore: cast_nullable_to_non_nullable + as List, + animeFilterState: null == animeFilterState + ? _self.animeFilterState + : animeFilterState // ignore: cast_nullable_to_non_nullable + as MediumTrackingState, + mangaFilterState: null == mangaFilterState + ? _self.mangaFilterState + : mangaFilterState // ignore: cast_nullable_to_non_nullable + as MediumTrackingState, + trackingType: null == trackingType + ? _self.trackingType + : trackingType // ignore: cast_nullable_to_non_nullable + as TrackingMediumType, + )); + } } -abstract class _AnimeListState implements AnimeListState { - factory _AnimeListState( - {final bool buttonVisibility, - final List animes, - final List mangas, - final MediumTrackingState animeFilterState, - final MediumTrackingState mangaFilterState, - final TrackingMediumType trackingType}) = _$AnimeListStateImpl; - - @override - bool get buttonVisibility; - @override - List get animes; - @override - List get mangas; - @override - MediumTrackingState get animeFilterState; - @override - MediumTrackingState get mangaFilterState; - @override - TrackingMediumType get trackingType; - - /// Create a copy of AnimeListState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$AnimeListStateImplCopyWith<_$AnimeListStateImpl> get copyWith => - throw _privateConstructorUsedError; -} +// dart format on diff --git a/lib/src/ui/bloc/anime_list_state.dart b/lib/src/ui/bloc/anime_list_state.dart index f1ff529..a9fb3df 100644 --- a/lib/src/ui/bloc/anime_list_state.dart +++ b/lib/src/ui/bloc/anime_list_state.dart @@ -1,7 +1,7 @@ part of 'anime_list_bloc.dart'; @freezed -class AnimeListState with _$AnimeListState { +abstract class AnimeListState with _$AnimeListState { factory AnimeListState({ @Default(true) bool buttonVisibility, @Default([]) List animes, diff --git a/lib/src/ui/bloc/anime_search_bloc.freezed.dart b/lib/src/ui/bloc/anime_search_bloc.freezed.dart index aff2f13..e1d9539 100644 --- a/lib/src/ui/bloc/anime_search_bloc.freezed.dart +++ b/lib/src/ui/bloc/anime_search_bloc.freezed.dart @@ -1,5 +1,5 @@ -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -9,86 +9,53 @@ part of 'anime_search_bloc.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(T value) => value; -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - /// @nodoc mixin _$AnimeSearchState { - TrackingMediumType get trackingType => throw _privateConstructorUsedError; - String get searchQuery => throw _privateConstructorUsedError; - bool get working => throw _privateConstructorUsedError; - List get searchResults => throw _privateConstructorUsedError; + TrackingMediumType get trackingType; + String get searchQuery; + bool get working; + List get searchResults; /// Create a copy of AnimeSearchState /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $AnimeSearchStateCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $AnimeSearchStateCopyWith<$Res> { - factory $AnimeSearchStateCopyWith( - AnimeSearchState value, $Res Function(AnimeSearchState) then) = - _$AnimeSearchStateCopyWithImpl<$Res, AnimeSearchState>; - @useResult - $Res call( - {TrackingMediumType trackingType, - String searchQuery, - bool working, - List searchResults}); -} - -/// @nodoc -class _$AnimeSearchStateCopyWithImpl<$Res, $Val extends AnimeSearchState> - implements $AnimeSearchStateCopyWith<$Res> { - _$AnimeSearchStateCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of AnimeSearchState - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $AnimeSearchStateCopyWith get copyWith => + _$AnimeSearchStateCopyWithImpl( + this as AnimeSearchState, _$identity); + @override - $Res call({ - Object? trackingType = null, - Object? searchQuery = null, - Object? working = null, - Object? searchResults = null, - }) { - return _then(_value.copyWith( - trackingType: null == trackingType - ? _value.trackingType - : trackingType // ignore: cast_nullable_to_non_nullable - as TrackingMediumType, - searchQuery: null == searchQuery - ? _value.searchQuery - : searchQuery // ignore: cast_nullable_to_non_nullable - as String, - working: null == working - ? _value.working - : working // ignore: cast_nullable_to_non_nullable - as bool, - searchResults: null == searchResults - ? _value.searchResults - : searchResults // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is AnimeSearchState && + (identical(other.trackingType, trackingType) || + other.trackingType == trackingType) && + (identical(other.searchQuery, searchQuery) || + other.searchQuery == searchQuery) && + (identical(other.working, working) || other.working == working) && + const DeepCollectionEquality() + .equals(other.searchResults, searchResults)); + } + + @override + int get hashCode => Object.hash(runtimeType, trackingType, searchQuery, + working, const DeepCollectionEquality().hash(searchResults)); + + @override + String toString() { + return 'AnimeSearchState(trackingType: $trackingType, searchQuery: $searchQuery, working: $working, searchResults: $searchResults)'; } } /// @nodoc -abstract class _$$AnimeSearchStateImplCopyWith<$Res> - implements $AnimeSearchStateCopyWith<$Res> { - factory _$$AnimeSearchStateImplCopyWith(_$AnimeSearchStateImpl value, - $Res Function(_$AnimeSearchStateImpl) then) = - __$$AnimeSearchStateImplCopyWithImpl<$Res>; - @override +abstract mixin class $AnimeSearchStateCopyWith<$Res> { + factory $AnimeSearchStateCopyWith( + AnimeSearchState value, $Res Function(AnimeSearchState) _then) = + _$AnimeSearchStateCopyWithImpl; @useResult $Res call( {TrackingMediumType trackingType, @@ -98,12 +65,12 @@ abstract class _$$AnimeSearchStateImplCopyWith<$Res> } /// @nodoc -class __$$AnimeSearchStateImplCopyWithImpl<$Res> - extends _$AnimeSearchStateCopyWithImpl<$Res, _$AnimeSearchStateImpl> - implements _$$AnimeSearchStateImplCopyWith<$Res> { - __$$AnimeSearchStateImplCopyWithImpl(_$AnimeSearchStateImpl _value, - $Res Function(_$AnimeSearchStateImpl) _then) - : super(_value, _then); +class _$AnimeSearchStateCopyWithImpl<$Res> + implements $AnimeSearchStateCopyWith<$Res> { + _$AnimeSearchStateCopyWithImpl(this._self, this._then); + + final AnimeSearchState _self; + final $Res Function(AnimeSearchState) _then; /// Create a copy of AnimeSearchState /// with the given fields replaced by the non-null parameter values. @@ -115,31 +82,197 @@ class __$$AnimeSearchStateImplCopyWithImpl<$Res> Object? working = null, Object? searchResults = null, }) { - return _then(_$AnimeSearchStateImpl( + return _then(_self.copyWith( trackingType: null == trackingType - ? _value.trackingType + ? _self.trackingType : trackingType // ignore: cast_nullable_to_non_nullable as TrackingMediumType, searchQuery: null == searchQuery - ? _value.searchQuery + ? _self.searchQuery : searchQuery // ignore: cast_nullable_to_non_nullable as String, working: null == working - ? _value.working + ? _self.working : working // ignore: cast_nullable_to_non_nullable as bool, searchResults: null == searchResults - ? _value._searchResults + ? _self.searchResults : searchResults // ignore: cast_nullable_to_non_nullable as List, )); } } +/// Adds pattern-matching-related methods to [AnimeSearchState]. +extension AnimeSearchStatePatterns on AnimeSearchState { + /// A variant of `map` that fallback to returning `orElse`. + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case final Subclass value: + /// return ...; + /// case _: + /// return orElse(); + /// } + /// ``` + + @optionalTypeArgs + TResult maybeMap( + TResult Function(_AnimeSearchState value)? $default, { + required TResult orElse(), + }) { + final _that = this; + switch (_that) { + case _AnimeSearchState() when $default != null: + return $default(_that); + case _: + return orElse(); + } + } + + /// A `switch`-like method, using callbacks. + /// + /// Callbacks receives the raw object, upcasted. + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case final Subclass value: + /// return ...; + /// case final Subclass2 value: + /// return ...; + /// } + /// ``` + + @optionalTypeArgs + TResult map( + TResult Function(_AnimeSearchState value) $default, + ) { + final _that = this; + switch (_that) { + case _AnimeSearchState(): + return $default(_that); + case _: + throw StateError('Unexpected subclass'); + } + } + + /// A variant of `map` that fallback to returning `null`. + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case final Subclass value: + /// return ...; + /// case _: + /// return null; + /// } + /// ``` + + @optionalTypeArgs + TResult? mapOrNull( + TResult? Function(_AnimeSearchState value)? $default, + ) { + final _that = this; + switch (_that) { + case _AnimeSearchState() when $default != null: + return $default(_that); + case _: + return null; + } + } + + /// A variant of `when` that fallback to an `orElse` callback. + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case Subclass(:final field): + /// return ...; + /// case _: + /// return orElse(); + /// } + /// ``` + + @optionalTypeArgs + TResult maybeWhen( + TResult Function(TrackingMediumType trackingType, String searchQuery, + bool working, List searchResults)? + $default, { + required TResult orElse(), + }) { + final _that = this; + switch (_that) { + case _AnimeSearchState() when $default != null: + return $default(_that.trackingType, _that.searchQuery, _that.working, + _that.searchResults); + case _: + return orElse(); + } + } + + /// A `switch`-like method, using callbacks. + /// + /// As opposed to `map`, this offers destructuring. + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case Subclass(:final field): + /// return ...; + /// case Subclass2(:final field2): + /// return ...; + /// } + /// ``` + + @optionalTypeArgs + TResult when( + TResult Function(TrackingMediumType trackingType, String searchQuery, + bool working, List searchResults) + $default, + ) { + final _that = this; + switch (_that) { + case _AnimeSearchState(): + return $default(_that.trackingType, _that.searchQuery, _that.working, + _that.searchResults); + case _: + throw StateError('Unexpected subclass'); + } + } + + /// A variant of `when` that fallback to returning `null` + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case Subclass(:final field): + /// return ...; + /// case _: + /// return null; + /// } + /// ``` + + @optionalTypeArgs + TResult? whenOrNull( + TResult? Function(TrackingMediumType trackingType, String searchQuery, + bool working, List searchResults)? + $default, + ) { + final _that = this; + switch (_that) { + case _AnimeSearchState() when $default != null: + return $default(_that.trackingType, _that.searchQuery, _that.working, + _that.searchResults); + case _: + return null; + } + } +} + /// @nodoc -class _$AnimeSearchStateImpl implements _AnimeSearchState { - _$AnimeSearchStateImpl( +class _AnimeSearchState implements AnimeSearchState { + _AnimeSearchState( {this.trackingType = TrackingMediumType.anime, this.searchQuery = '', this.working = false, @@ -164,16 +297,19 @@ class _$AnimeSearchStateImpl implements _AnimeSearchState { return EqualUnmodifiableListView(_searchResults); } + /// Create a copy of AnimeSearchState + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'AnimeSearchState(trackingType: $trackingType, searchQuery: $searchQuery, working: $working, searchResults: $searchResults)'; - } + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$AnimeSearchStateCopyWith<_AnimeSearchState> get copyWith => + __$AnimeSearchStateCopyWithImpl<_AnimeSearchState>(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$AnimeSearchStateImpl && + other is _AnimeSearchState && (identical(other.trackingType, trackingType) || other.trackingType == trackingType) && (identical(other.searchQuery, searchQuery) || @@ -187,36 +323,64 @@ class _$AnimeSearchStateImpl implements _AnimeSearchState { int get hashCode => Object.hash(runtimeType, trackingType, searchQuery, working, const DeepCollectionEquality().hash(_searchResults)); + @override + String toString() { + return 'AnimeSearchState(trackingType: $trackingType, searchQuery: $searchQuery, working: $working, searchResults: $searchResults)'; + } +} + +/// @nodoc +abstract mixin class _$AnimeSearchStateCopyWith<$Res> + implements $AnimeSearchStateCopyWith<$Res> { + factory _$AnimeSearchStateCopyWith( + _AnimeSearchState value, $Res Function(_AnimeSearchState) _then) = + __$AnimeSearchStateCopyWithImpl; + @override + @useResult + $Res call( + {TrackingMediumType trackingType, + String searchQuery, + bool working, + List searchResults}); +} + +/// @nodoc +class __$AnimeSearchStateCopyWithImpl<$Res> + implements _$AnimeSearchStateCopyWith<$Res> { + __$AnimeSearchStateCopyWithImpl(this._self, this._then); + + final _AnimeSearchState _self; + final $Res Function(_AnimeSearchState) _then; + /// Create a copy of AnimeSearchState /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$AnimeSearchStateImplCopyWith<_$AnimeSearchStateImpl> get copyWith => - __$$AnimeSearchStateImplCopyWithImpl<_$AnimeSearchStateImpl>( - this, _$identity); + $Res call({ + Object? trackingType = null, + Object? searchQuery = null, + Object? working = null, + Object? searchResults = null, + }) { + return _then(_AnimeSearchState( + trackingType: null == trackingType + ? _self.trackingType + : trackingType // ignore: cast_nullable_to_non_nullable + as TrackingMediumType, + searchQuery: null == searchQuery + ? _self.searchQuery + : searchQuery // ignore: cast_nullable_to_non_nullable + as String, + working: null == working + ? _self.working + : working // ignore: cast_nullable_to_non_nullable + as bool, + searchResults: null == searchResults + ? _self._searchResults + : searchResults // ignore: cast_nullable_to_non_nullable + as List, + )); + } } -abstract class _AnimeSearchState implements AnimeSearchState { - factory _AnimeSearchState( - {final TrackingMediumType trackingType, - final String searchQuery, - final bool working, - final List searchResults}) = _$AnimeSearchStateImpl; - - @override - TrackingMediumType get trackingType; - @override - String get searchQuery; - @override - bool get working; - @override - List get searchResults; - - /// Create a copy of AnimeSearchState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$AnimeSearchStateImplCopyWith<_$AnimeSearchStateImpl> get copyWith => - throw _privateConstructorUsedError; -} +// dart format on diff --git a/lib/src/ui/bloc/anime_search_state.dart b/lib/src/ui/bloc/anime_search_state.dart index b6ad766..398a0dc 100644 --- a/lib/src/ui/bloc/anime_search_state.dart +++ b/lib/src/ui/bloc/anime_search_state.dart @@ -1,7 +1,7 @@ part of 'anime_search_bloc.dart'; @freezed -class AnimeSearchState with _$AnimeSearchState { +abstract class AnimeSearchState with _$AnimeSearchState { factory AnimeSearchState({ @Default(TrackingMediumType.anime) TrackingMediumType trackingType, @Default('') String searchQuery, diff --git a/lib/src/ui/bloc/calendar_bloc.freezed.dart b/lib/src/ui/bloc/calendar_bloc.freezed.dart index d08c483..bb3a9f5 100644 --- a/lib/src/ui/bloc/calendar_bloc.freezed.dart +++ b/lib/src/ui/bloc/calendar_bloc.freezed.dart @@ -1,5 +1,5 @@ -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -9,137 +9,28 @@ part of 'calendar_bloc.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(T value) => value; -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - /// @nodoc mixin _$CalendarState { - bool get refreshing => throw _privateConstructorUsedError; - int get refreshingCount => throw _privateConstructorUsedError; - int get refreshingTotal => throw _privateConstructorUsedError; + bool get refreshing; + int get refreshingCount; + int get refreshingTotal; /// Create a copy of CalendarState /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $CalendarStateCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $CalendarStateCopyWith<$Res> { - factory $CalendarStateCopyWith( - CalendarState value, $Res Function(CalendarState) then) = - _$CalendarStateCopyWithImpl<$Res, CalendarState>; - @useResult - $Res call({bool refreshing, int refreshingCount, int refreshingTotal}); -} - -/// @nodoc -class _$CalendarStateCopyWithImpl<$Res, $Val extends CalendarState> - implements $CalendarStateCopyWith<$Res> { - _$CalendarStateCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of CalendarState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? refreshing = null, - Object? refreshingCount = null, - Object? refreshingTotal = null, - }) { - return _then(_value.copyWith( - refreshing: null == refreshing - ? _value.refreshing - : refreshing // ignore: cast_nullable_to_non_nullable - as bool, - refreshingCount: null == refreshingCount - ? _value.refreshingCount - : refreshingCount // ignore: cast_nullable_to_non_nullable - as int, - refreshingTotal: null == refreshingTotal - ? _value.refreshingTotal - : refreshingTotal // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$CalendarStateImplCopyWith<$Res> - implements $CalendarStateCopyWith<$Res> { - factory _$$CalendarStateImplCopyWith( - _$CalendarStateImpl value, $Res Function(_$CalendarStateImpl) then) = - __$$CalendarStateImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({bool refreshing, int refreshingCount, int refreshingTotal}); -} - -/// @nodoc -class __$$CalendarStateImplCopyWithImpl<$Res> - extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateImpl> - implements _$$CalendarStateImplCopyWith<$Res> { - __$$CalendarStateImplCopyWithImpl( - _$CalendarStateImpl _value, $Res Function(_$CalendarStateImpl) _then) - : super(_value, _then); - - /// Create a copy of CalendarState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? refreshing = null, - Object? refreshingCount = null, - Object? refreshingTotal = null, - }) { - return _then(_$CalendarStateImpl( - null == refreshing - ? _value.refreshing - : refreshing // ignore: cast_nullable_to_non_nullable - as bool, - null == refreshingCount - ? _value.refreshingCount - : refreshingCount // ignore: cast_nullable_to_non_nullable - as int, - null == refreshingTotal - ? _value.refreshingTotal - : refreshingTotal // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc - -class _$CalendarStateImpl implements _CalendarState { - _$CalendarStateImpl( - this.refreshing, this.refreshingCount, this.refreshingTotal); - - @override - final bool refreshing; - @override - final int refreshingCount; - @override - final int refreshingTotal; - - @override - String toString() { - return 'CalendarState(refreshing: $refreshing, refreshingCount: $refreshingCount, refreshingTotal: $refreshingTotal)'; - } + _$CalendarStateCopyWithImpl( + this as CalendarState, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$CalendarStateImpl && + other is CalendarState && (identical(other.refreshing, refreshing) || other.refreshing == refreshing) && (identical(other.refreshingCount, refreshingCount) || @@ -152,30 +43,305 @@ class _$CalendarStateImpl implements _CalendarState { int get hashCode => Object.hash(runtimeType, refreshing, refreshingCount, refreshingTotal); + @override + String toString() { + return 'CalendarState(refreshing: $refreshing, refreshingCount: $refreshingCount, refreshingTotal: $refreshingTotal)'; + } +} + +/// @nodoc +abstract mixin class $CalendarStateCopyWith<$Res> { + factory $CalendarStateCopyWith( + CalendarState value, $Res Function(CalendarState) _then) = + _$CalendarStateCopyWithImpl; + @useResult + $Res call({bool refreshing, int refreshingCount, int refreshingTotal}); +} + +/// @nodoc +class _$CalendarStateCopyWithImpl<$Res> + implements $CalendarStateCopyWith<$Res> { + _$CalendarStateCopyWithImpl(this._self, this._then); + + final CalendarState _self; + final $Res Function(CalendarState) _then; + /// Create a copy of CalendarState /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? refreshing = null, + Object? refreshingCount = null, + Object? refreshingTotal = null, + }) { + return _then(_self.copyWith( + refreshing: null == refreshing + ? _self.refreshing + : refreshing // ignore: cast_nullable_to_non_nullable + as bool, + refreshingCount: null == refreshingCount + ? _self.refreshingCount + : refreshingCount // ignore: cast_nullable_to_non_nullable + as int, + refreshingTotal: null == refreshingTotal + ? _self.refreshingTotal + : refreshingTotal // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// Adds pattern-matching-related methods to [CalendarState]. +extension CalendarStatePatterns on CalendarState { + /// A variant of `map` that fallback to returning `orElse`. + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case final Subclass value: + /// return ...; + /// case _: + /// return orElse(); + /// } + /// ``` + + @optionalTypeArgs + TResult maybeMap( + TResult Function(_CalendarState value)? $default, { + required TResult orElse(), + }) { + final _that = this; + switch (_that) { + case _CalendarState() when $default != null: + return $default(_that); + case _: + return orElse(); + } + } + + /// A `switch`-like method, using callbacks. + /// + /// Callbacks receives the raw object, upcasted. + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case final Subclass value: + /// return ...; + /// case final Subclass2 value: + /// return ...; + /// } + /// ``` + + @optionalTypeArgs + TResult map( + TResult Function(_CalendarState value) $default, + ) { + final _that = this; + switch (_that) { + case _CalendarState(): + return $default(_that); + case _: + throw StateError('Unexpected subclass'); + } + } + + /// A variant of `map` that fallback to returning `null`. + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case final Subclass value: + /// return ...; + /// case _: + /// return null; + /// } + /// ``` + + @optionalTypeArgs + TResult? mapOrNull( + TResult? Function(_CalendarState value)? $default, + ) { + final _that = this; + switch (_that) { + case _CalendarState() when $default != null: + return $default(_that); + case _: + return null; + } + } + + /// A variant of `when` that fallback to an `orElse` callback. + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case Subclass(:final field): + /// return ...; + /// case _: + /// return orElse(); + /// } + /// ``` + + @optionalTypeArgs + TResult maybeWhen( + TResult Function(bool refreshing, int refreshingCount, int refreshingTotal)? + $default, { + required TResult orElse(), + }) { + final _that = this; + switch (_that) { + case _CalendarState() when $default != null: + return $default( + _that.refreshing, _that.refreshingCount, _that.refreshingTotal); + case _: + return orElse(); + } + } + + /// A `switch`-like method, using callbacks. + /// + /// As opposed to `map`, this offers destructuring. + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case Subclass(:final field): + /// return ...; + /// case Subclass2(:final field2): + /// return ...; + /// } + /// ``` + + @optionalTypeArgs + TResult when( + TResult Function(bool refreshing, int refreshingCount, int refreshingTotal) + $default, + ) { + final _that = this; + switch (_that) { + case _CalendarState(): + return $default( + _that.refreshing, _that.refreshingCount, _that.refreshingTotal); + case _: + throw StateError('Unexpected subclass'); + } + } + + /// A variant of `when` that fallback to returning `null` + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case Subclass(:final field): + /// return ...; + /// case _: + /// return null; + /// } + /// ``` + + @optionalTypeArgs + TResult? whenOrNull( + TResult? Function( + bool refreshing, int refreshingCount, int refreshingTotal)? + $default, + ) { + final _that = this; + switch (_that) { + case _CalendarState() when $default != null: + return $default( + _that.refreshing, _that.refreshingCount, _that.refreshingTotal); + case _: + return null; + } + } +} + +/// @nodoc + +class _CalendarState implements CalendarState { + _CalendarState(this.refreshing, this.refreshingCount, this.refreshingTotal); + + @override + final bool refreshing; + @override + final int refreshingCount; + @override + final int refreshingTotal; + + /// Create a copy of CalendarState + /// with the given fields replaced by the non-null parameter values. + @override @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$CalendarStateCopyWith<_CalendarState> get copyWith => + __$CalendarStateCopyWithImpl<_CalendarState>(this, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _CalendarState && + (identical(other.refreshing, refreshing) || + other.refreshing == refreshing) && + (identical(other.refreshingCount, refreshingCount) || + other.refreshingCount == refreshingCount) && + (identical(other.refreshingTotal, refreshingTotal) || + other.refreshingTotal == refreshingTotal)); + } + + @override + int get hashCode => + Object.hash(runtimeType, refreshing, refreshingCount, refreshingTotal); + + @override + String toString() { + return 'CalendarState(refreshing: $refreshing, refreshingCount: $refreshingCount, refreshingTotal: $refreshingTotal)'; + } +} + +/// @nodoc +abstract mixin class _$CalendarStateCopyWith<$Res> + implements $CalendarStateCopyWith<$Res> { + factory _$CalendarStateCopyWith( + _CalendarState value, $Res Function(_CalendarState) _then) = + __$CalendarStateCopyWithImpl; + @override + @useResult + $Res call({bool refreshing, int refreshingCount, int refreshingTotal}); +} + +/// @nodoc +class __$CalendarStateCopyWithImpl<$Res> + implements _$CalendarStateCopyWith<$Res> { + __$CalendarStateCopyWithImpl(this._self, this._then); + + final _CalendarState _self; + final $Res Function(_CalendarState) _then; + + /// Create a copy of CalendarState + /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') - _$$CalendarStateImplCopyWith<_$CalendarStateImpl> get copyWith => - __$$CalendarStateImplCopyWithImpl<_$CalendarStateImpl>(this, _$identity); + $Res call({ + Object? refreshing = null, + Object? refreshingCount = null, + Object? refreshingTotal = null, + }) { + return _then(_CalendarState( + null == refreshing + ? _self.refreshing + : refreshing // ignore: cast_nullable_to_non_nullable + as bool, + null == refreshingCount + ? _self.refreshingCount + : refreshingCount // ignore: cast_nullable_to_non_nullable + as int, + null == refreshingTotal + ? _self.refreshingTotal + : refreshingTotal // ignore: cast_nullable_to_non_nullable + as int, + )); + } } -abstract class _CalendarState implements CalendarState { - factory _CalendarState(final bool refreshing, final int refreshingCount, - final int refreshingTotal) = _$CalendarStateImpl; - - @override - bool get refreshing; - @override - int get refreshingCount; - @override - int get refreshingTotal; - - /// Create a copy of CalendarState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$CalendarStateImplCopyWith<_$CalendarStateImpl> get copyWith => - throw _privateConstructorUsedError; -} +// dart format on diff --git a/lib/src/ui/bloc/calendar_state.dart b/lib/src/ui/bloc/calendar_state.dart index bdc2741..5810554 100644 --- a/lib/src/ui/bloc/calendar_state.dart +++ b/lib/src/ui/bloc/calendar_state.dart @@ -1,7 +1,7 @@ part of 'calendar_bloc.dart'; @freezed -class CalendarState with _$CalendarState { +abstract class CalendarState with _$CalendarState { factory CalendarState( bool refreshing, int refreshingCount, diff --git a/lib/src/ui/bloc/details_bloc.freezed.dart b/lib/src/ui/bloc/details_bloc.freezed.dart index f424a51..7a615e2 100644 --- a/lib/src/ui/bloc/details_bloc.freezed.dart +++ b/lib/src/ui/bloc/details_bloc.freezed.dart @@ -1,5 +1,5 @@ -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -9,79 +9,50 @@ part of 'details_bloc.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(T value) => value; -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - /// @nodoc mixin _$DetailsState { - TrackingMedium? get data => throw _privateConstructorUsedError; - String? get heroImagePrefix => throw _privateConstructorUsedError; - TrackingMediumType get trackingType => throw _privateConstructorUsedError; + TrackingMedium? get data; + String? get heroImagePrefix; + TrackingMediumType get trackingType; /// Create a copy of DetailsState /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $DetailsStateCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $DetailsStateCopyWith<$Res> { - factory $DetailsStateCopyWith( - DetailsState value, $Res Function(DetailsState) then) = - _$DetailsStateCopyWithImpl<$Res, DetailsState>; - @useResult - $Res call( - {TrackingMedium? data, - String? heroImagePrefix, - TrackingMediumType trackingType}); -} - -/// @nodoc -class _$DetailsStateCopyWithImpl<$Res, $Val extends DetailsState> - implements $DetailsStateCopyWith<$Res> { - _$DetailsStateCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of DetailsState - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $DetailsStateCopyWith get copyWith => + _$DetailsStateCopyWithImpl( + this as DetailsState, _$identity); + @override - $Res call({ - Object? data = freezed, - Object? heroImagePrefix = freezed, - Object? trackingType = null, - }) { - return _then(_value.copyWith( - data: freezed == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as TrackingMedium?, - heroImagePrefix: freezed == heroImagePrefix - ? _value.heroImagePrefix - : heroImagePrefix // ignore: cast_nullable_to_non_nullable - as String?, - trackingType: null == trackingType - ? _value.trackingType - : trackingType // ignore: cast_nullable_to_non_nullable - as TrackingMediumType, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is DetailsState && + (identical(other.data, data) || other.data == data) && + (identical(other.heroImagePrefix, heroImagePrefix) || + other.heroImagePrefix == heroImagePrefix) && + (identical(other.trackingType, trackingType) || + other.trackingType == trackingType)); + } + + @override + int get hashCode => + Object.hash(runtimeType, data, heroImagePrefix, trackingType); + + @override + String toString() { + return 'DetailsState(data: $data, heroImagePrefix: $heroImagePrefix, trackingType: $trackingType)'; } } /// @nodoc -abstract class _$$DetailsStateImplCopyWith<$Res> - implements $DetailsStateCopyWith<$Res> { - factory _$$DetailsStateImplCopyWith( - _$DetailsStateImpl value, $Res Function(_$DetailsStateImpl) then) = - __$$DetailsStateImplCopyWithImpl<$Res>; - @override +abstract mixin class $DetailsStateCopyWith<$Res> { + factory $DetailsStateCopyWith( + DetailsState value, $Res Function(DetailsState) _then) = + _$DetailsStateCopyWithImpl; @useResult $Res call( {TrackingMedium? data, @@ -90,12 +61,11 @@ abstract class _$$DetailsStateImplCopyWith<$Res> } /// @nodoc -class __$$DetailsStateImplCopyWithImpl<$Res> - extends _$DetailsStateCopyWithImpl<$Res, _$DetailsStateImpl> - implements _$$DetailsStateImplCopyWith<$Res> { - __$$DetailsStateImplCopyWithImpl( - _$DetailsStateImpl _value, $Res Function(_$DetailsStateImpl) _then) - : super(_value, _then); +class _$DetailsStateCopyWithImpl<$Res> implements $DetailsStateCopyWith<$Res> { + _$DetailsStateCopyWithImpl(this._self, this._then); + + final DetailsState _self; + final $Res Function(DetailsState) _then; /// Create a copy of DetailsState /// with the given fields replaced by the non-null parameter values. @@ -106,27 +76,190 @@ class __$$DetailsStateImplCopyWithImpl<$Res> Object? heroImagePrefix = freezed, Object? trackingType = null, }) { - return _then(_$DetailsStateImpl( + return _then(_self.copyWith( data: freezed == data - ? _value.data + ? _self.data : data // ignore: cast_nullable_to_non_nullable as TrackingMedium?, heroImagePrefix: freezed == heroImagePrefix - ? _value.heroImagePrefix + ? _self.heroImagePrefix : heroImagePrefix // ignore: cast_nullable_to_non_nullable as String?, trackingType: null == trackingType - ? _value.trackingType + ? _self.trackingType : trackingType // ignore: cast_nullable_to_non_nullable as TrackingMediumType, )); } } +/// Adds pattern-matching-related methods to [DetailsState]. +extension DetailsStatePatterns on DetailsState { + /// A variant of `map` that fallback to returning `orElse`. + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case final Subclass value: + /// return ...; + /// case _: + /// return orElse(); + /// } + /// ``` + + @optionalTypeArgs + TResult maybeMap( + TResult Function(_DetailsState value)? $default, { + required TResult orElse(), + }) { + final _that = this; + switch (_that) { + case _DetailsState() when $default != null: + return $default(_that); + case _: + return orElse(); + } + } + + /// A `switch`-like method, using callbacks. + /// + /// Callbacks receives the raw object, upcasted. + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case final Subclass value: + /// return ...; + /// case final Subclass2 value: + /// return ...; + /// } + /// ``` + + @optionalTypeArgs + TResult map( + TResult Function(_DetailsState value) $default, + ) { + final _that = this; + switch (_that) { + case _DetailsState(): + return $default(_that); + case _: + throw StateError('Unexpected subclass'); + } + } + + /// A variant of `map` that fallback to returning `null`. + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case final Subclass value: + /// return ...; + /// case _: + /// return null; + /// } + /// ``` + + @optionalTypeArgs + TResult? mapOrNull( + TResult? Function(_DetailsState value)? $default, + ) { + final _that = this; + switch (_that) { + case _DetailsState() when $default != null: + return $default(_that); + case _: + return null; + } + } + + /// A variant of `when` that fallback to an `orElse` callback. + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case Subclass(:final field): + /// return ...; + /// case _: + /// return orElse(); + /// } + /// ``` + + @optionalTypeArgs + TResult maybeWhen( + TResult Function(TrackingMedium? data, String? heroImagePrefix, + TrackingMediumType trackingType)? + $default, { + required TResult orElse(), + }) { + final _that = this; + switch (_that) { + case _DetailsState() when $default != null: + return $default(_that.data, _that.heroImagePrefix, _that.trackingType); + case _: + return orElse(); + } + } + + /// A `switch`-like method, using callbacks. + /// + /// As opposed to `map`, this offers destructuring. + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case Subclass(:final field): + /// return ...; + /// case Subclass2(:final field2): + /// return ...; + /// } + /// ``` + + @optionalTypeArgs + TResult when( + TResult Function(TrackingMedium? data, String? heroImagePrefix, + TrackingMediumType trackingType) + $default, + ) { + final _that = this; + switch (_that) { + case _DetailsState(): + return $default(_that.data, _that.heroImagePrefix, _that.trackingType); + case _: + throw StateError('Unexpected subclass'); + } + } + + /// A variant of `when` that fallback to returning `null` + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case Subclass(:final field): + /// return ...; + /// case _: + /// return null; + /// } + /// ``` + + @optionalTypeArgs + TResult? whenOrNull( + TResult? Function(TrackingMedium? data, String? heroImagePrefix, + TrackingMediumType trackingType)? + $default, + ) { + final _that = this; + switch (_that) { + case _DetailsState() when $default != null: + return $default(_that.data, _that.heroImagePrefix, _that.trackingType); + case _: + return null; + } + } +} + /// @nodoc -class _$DetailsStateImpl implements _DetailsState { - _$DetailsStateImpl( +class _DetailsState implements DetailsState { + _DetailsState( {this.data, this.heroImagePrefix, this.trackingType = TrackingMediumType.anime}); @@ -139,16 +272,19 @@ class _$DetailsStateImpl implements _DetailsState { @JsonKey() final TrackingMediumType trackingType; + /// Create a copy of DetailsState + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'DetailsState(data: $data, heroImagePrefix: $heroImagePrefix, trackingType: $trackingType)'; - } + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$DetailsStateCopyWith<_DetailsState> get copyWith => + __$DetailsStateCopyWithImpl<_DetailsState>(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$DetailsStateImpl && + other is _DetailsState && (identical(other.data, data) || other.data == data) && (identical(other.heroImagePrefix, heroImagePrefix) || other.heroImagePrefix == heroImagePrefix) && @@ -160,32 +296,58 @@ class _$DetailsStateImpl implements _DetailsState { int get hashCode => Object.hash(runtimeType, data, heroImagePrefix, trackingType); + @override + String toString() { + return 'DetailsState(data: $data, heroImagePrefix: $heroImagePrefix, trackingType: $trackingType)'; + } +} + +/// @nodoc +abstract mixin class _$DetailsStateCopyWith<$Res> + implements $DetailsStateCopyWith<$Res> { + factory _$DetailsStateCopyWith( + _DetailsState value, $Res Function(_DetailsState) _then) = + __$DetailsStateCopyWithImpl; + @override + @useResult + $Res call( + {TrackingMedium? data, + String? heroImagePrefix, + TrackingMediumType trackingType}); +} + +/// @nodoc +class __$DetailsStateCopyWithImpl<$Res> + implements _$DetailsStateCopyWith<$Res> { + __$DetailsStateCopyWithImpl(this._self, this._then); + + final _DetailsState _self; + final $Res Function(_DetailsState) _then; + /// Create a copy of DetailsState /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$DetailsStateImplCopyWith<_$DetailsStateImpl> get copyWith => - __$$DetailsStateImplCopyWithImpl<_$DetailsStateImpl>(this, _$identity); + $Res call({ + Object? data = freezed, + Object? heroImagePrefix = freezed, + Object? trackingType = null, + }) { + return _then(_DetailsState( + data: freezed == data + ? _self.data + : data // ignore: cast_nullable_to_non_nullable + as TrackingMedium?, + heroImagePrefix: freezed == heroImagePrefix + ? _self.heroImagePrefix + : heroImagePrefix // ignore: cast_nullable_to_non_nullable + as String?, + trackingType: null == trackingType + ? _self.trackingType + : trackingType // ignore: cast_nullable_to_non_nullable + as TrackingMediumType, + )); + } } -abstract class _DetailsState implements DetailsState { - factory _DetailsState( - {final TrackingMedium? data, - final String? heroImagePrefix, - final TrackingMediumType trackingType}) = _$DetailsStateImpl; - - @override - TrackingMedium? get data; - @override - String? get heroImagePrefix; - @override - TrackingMediumType get trackingType; - - /// Create a copy of DetailsState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$DetailsStateImplCopyWith<_$DetailsStateImpl> get copyWith => - throw _privateConstructorUsedError; -} +// dart format on diff --git a/lib/src/ui/bloc/details_state.dart b/lib/src/ui/bloc/details_state.dart index 7fe1d01..f9ae5a2 100644 --- a/lib/src/ui/bloc/details_state.dart +++ b/lib/src/ui/bloc/details_state.dart @@ -1,7 +1,7 @@ part of 'details_bloc.dart'; @freezed -class DetailsState with _$DetailsState { +abstract class DetailsState with _$DetailsState { factory DetailsState({ TrackingMedium? data, String? heroImagePrefix, diff --git a/lib/src/ui/bloc/settings_bloc.dart b/lib/src/ui/bloc/settings_bloc.dart index ca021bd..183fe53 100644 --- a/lib/src/ui/bloc/settings_bloc.dart +++ b/lib/src/ui/bloc/settings_bloc.dart @@ -75,8 +75,8 @@ class SettingsBloc extends Bloc { ); _showLoadingSpinner(emit); - final inputStream = InputFileStream(event.path); - final listRaw = GZipDecoder().decodeBuffer(inputStream); + final input = await File(event.path).readAsBytes(); + final listRaw = const GZipDecoder().decodeBytes(input); final listXml = utf8.decode(listRaw); final document = XmlDocument.parse(listXml); final mal = document.getElement('myanimelist'); @@ -148,8 +148,8 @@ class SettingsBloc extends Bloc { ); _showLoadingSpinner(emit); - final inputStream = InputFileStream(event.path); - final listRaw = GZipDecoder().decodeBuffer(inputStream); + final input = await File(event.path).readAsBytes(); + final listRaw = const archive.GZipDecoder().decodeBytes(input); final listXml = utf8.decode(listRaw); final document = XmlDocument.parse(listXml); final mal = document.getElement('myanimelist'); @@ -230,11 +230,9 @@ class SettingsBloc extends Bloc { event.path, 'anitrack_${date.year}${date.month}${date.day}.json.gz', ); - archive.GZipEncoder().encode( - InputStream(utf8.encode(exportData)), - output: OutputFileStream(outputPath), - ); + final output = const archive.GZipEncoder().encode(utf8.encode(exportData)); + await File(outputPath).writeAsBytes(output); await Fluttertoast.showToast( msg: t.settings.dataExportSuccess, ); diff --git a/lib/src/ui/bloc/settings_bloc.freezed.dart b/lib/src/ui/bloc/settings_bloc.freezed.dart index 73aca8a..6234e5a 100644 --- a/lib/src/ui/bloc/settings_bloc.freezed.dart +++ b/lib/src/ui/bloc/settings_bloc.freezed.dart @@ -1,5 +1,5 @@ -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -9,87 +9,62 @@ part of 'settings_bloc.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(T value) => value; -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - /// @nodoc mixin _$SettingsState { - bool get importSpinnerVisible => throw _privateConstructorUsedError; - int get importCurrent => throw _privateConstructorUsedError; - int get importTotal => throw _privateConstructorUsedError; + bool get importSpinnerVisible; + int get importCurrent; + int get importTotal; /// Create a copy of SettingsState /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SettingsStateCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SettingsStateCopyWith<$Res> { - factory $SettingsStateCopyWith( - SettingsState value, $Res Function(SettingsState) then) = - _$SettingsStateCopyWithImpl<$Res, SettingsState>; - @useResult - $Res call({bool importSpinnerVisible, int importCurrent, int importTotal}); -} - -/// @nodoc -class _$SettingsStateCopyWithImpl<$Res, $Val extends SettingsState> - implements $SettingsStateCopyWith<$Res> { - _$SettingsStateCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of SettingsState - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $SettingsStateCopyWith get copyWith => + _$SettingsStateCopyWithImpl( + this as SettingsState, _$identity); + @override - $Res call({ - Object? importSpinnerVisible = null, - Object? importCurrent = null, - Object? importTotal = null, - }) { - return _then(_value.copyWith( - importSpinnerVisible: null == importSpinnerVisible - ? _value.importSpinnerVisible - : importSpinnerVisible // ignore: cast_nullable_to_non_nullable - as bool, - importCurrent: null == importCurrent - ? _value.importCurrent - : importCurrent // ignore: cast_nullable_to_non_nullable - as int, - importTotal: null == importTotal - ? _value.importTotal - : importTotal // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is SettingsState && + (identical(other.importSpinnerVisible, importSpinnerVisible) || + other.importSpinnerVisible == importSpinnerVisible) && + (identical(other.importCurrent, importCurrent) || + other.importCurrent == importCurrent) && + (identical(other.importTotal, importTotal) || + other.importTotal == importTotal)); + } + + @override + int get hashCode => Object.hash( + runtimeType, importSpinnerVisible, importCurrent, importTotal); + + @override + String toString() { + return 'SettingsState(importSpinnerVisible: $importSpinnerVisible, importCurrent: $importCurrent, importTotal: $importTotal)'; } } /// @nodoc -abstract class _$$SettingsStateImplCopyWith<$Res> - implements $SettingsStateCopyWith<$Res> { - factory _$$SettingsStateImplCopyWith( - _$SettingsStateImpl value, $Res Function(_$SettingsStateImpl) then) = - __$$SettingsStateImplCopyWithImpl<$Res>; - @override +abstract mixin class $SettingsStateCopyWith<$Res> { + factory $SettingsStateCopyWith( + SettingsState value, $Res Function(SettingsState) _then) = + _$SettingsStateCopyWithImpl; @useResult $Res call({bool importSpinnerVisible, int importCurrent, int importTotal}); } /// @nodoc -class __$$SettingsStateImplCopyWithImpl<$Res> - extends _$SettingsStateCopyWithImpl<$Res, _$SettingsStateImpl> - implements _$$SettingsStateImplCopyWith<$Res> { - __$$SettingsStateImplCopyWithImpl( - _$SettingsStateImpl _value, $Res Function(_$SettingsStateImpl) _then) - : super(_value, _then); +class _$SettingsStateCopyWithImpl<$Res> + implements $SettingsStateCopyWith<$Res> { + _$SettingsStateCopyWithImpl(this._self, this._then); + + final SettingsState _self; + final $Res Function(SettingsState) _then; /// Create a copy of SettingsState /// with the given fields replaced by the non-null parameter values. @@ -100,27 +75,193 @@ class __$$SettingsStateImplCopyWithImpl<$Res> Object? importCurrent = null, Object? importTotal = null, }) { - return _then(_$SettingsStateImpl( + return _then(_self.copyWith( importSpinnerVisible: null == importSpinnerVisible - ? _value.importSpinnerVisible + ? _self.importSpinnerVisible : importSpinnerVisible // ignore: cast_nullable_to_non_nullable as bool, importCurrent: null == importCurrent - ? _value.importCurrent + ? _self.importCurrent : importCurrent // ignore: cast_nullable_to_non_nullable as int, importTotal: null == importTotal - ? _value.importTotal + ? _self.importTotal : importTotal // ignore: cast_nullable_to_non_nullable as int, )); } } +/// Adds pattern-matching-related methods to [SettingsState]. +extension SettingsStatePatterns on SettingsState { + /// A variant of `map` that fallback to returning `orElse`. + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case final Subclass value: + /// return ...; + /// case _: + /// return orElse(); + /// } + /// ``` + + @optionalTypeArgs + TResult maybeMap( + TResult Function(_SettingsState value)? $default, { + required TResult orElse(), + }) { + final _that = this; + switch (_that) { + case _SettingsState() when $default != null: + return $default(_that); + case _: + return orElse(); + } + } + + /// A `switch`-like method, using callbacks. + /// + /// Callbacks receives the raw object, upcasted. + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case final Subclass value: + /// return ...; + /// case final Subclass2 value: + /// return ...; + /// } + /// ``` + + @optionalTypeArgs + TResult map( + TResult Function(_SettingsState value) $default, + ) { + final _that = this; + switch (_that) { + case _SettingsState(): + return $default(_that); + case _: + throw StateError('Unexpected subclass'); + } + } + + /// A variant of `map` that fallback to returning `null`. + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case final Subclass value: + /// return ...; + /// case _: + /// return null; + /// } + /// ``` + + @optionalTypeArgs + TResult? mapOrNull( + TResult? Function(_SettingsState value)? $default, + ) { + final _that = this; + switch (_that) { + case _SettingsState() when $default != null: + return $default(_that); + case _: + return null; + } + } + + /// A variant of `when` that fallback to an `orElse` callback. + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case Subclass(:final field): + /// return ...; + /// case _: + /// return orElse(); + /// } + /// ``` + + @optionalTypeArgs + TResult maybeWhen( + TResult Function( + bool importSpinnerVisible, int importCurrent, int importTotal)? + $default, { + required TResult orElse(), + }) { + final _that = this; + switch (_that) { + case _SettingsState() when $default != null: + return $default( + _that.importSpinnerVisible, _that.importCurrent, _that.importTotal); + case _: + return orElse(); + } + } + + /// A `switch`-like method, using callbacks. + /// + /// As opposed to `map`, this offers destructuring. + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case Subclass(:final field): + /// return ...; + /// case Subclass2(:final field2): + /// return ...; + /// } + /// ``` + + @optionalTypeArgs + TResult when( + TResult Function( + bool importSpinnerVisible, int importCurrent, int importTotal) + $default, + ) { + final _that = this; + switch (_that) { + case _SettingsState(): + return $default( + _that.importSpinnerVisible, _that.importCurrent, _that.importTotal); + case _: + throw StateError('Unexpected subclass'); + } + } + + /// A variant of `when` that fallback to returning `null` + /// + /// It is equivalent to doing: + /// ```dart + /// switch (sealedClass) { + /// case Subclass(:final field): + /// return ...; + /// case _: + /// return null; + /// } + /// ``` + + @optionalTypeArgs + TResult? whenOrNull( + TResult? Function( + bool importSpinnerVisible, int importCurrent, int importTotal)? + $default, + ) { + final _that = this; + switch (_that) { + case _SettingsState() when $default != null: + return $default( + _that.importSpinnerVisible, _that.importCurrent, _that.importTotal); + case _: + return null; + } + } +} + /// @nodoc -class _$SettingsStateImpl implements _SettingsState { - _$SettingsStateImpl( +class _SettingsState implements SettingsState { + _SettingsState( {this.importSpinnerVisible = false, this.importCurrent = 0, this.importTotal = 0}); @@ -135,16 +276,19 @@ class _$SettingsStateImpl implements _SettingsState { @JsonKey() final int importTotal; + /// Create a copy of SettingsState + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'SettingsState(importSpinnerVisible: $importSpinnerVisible, importCurrent: $importCurrent, importTotal: $importTotal)'; - } + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$SettingsStateCopyWith<_SettingsState> get copyWith => + __$SettingsStateCopyWithImpl<_SettingsState>(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SettingsStateImpl && + other is _SettingsState && (identical(other.importSpinnerVisible, importSpinnerVisible) || other.importSpinnerVisible == importSpinnerVisible) && (identical(other.importCurrent, importCurrent) || @@ -157,32 +301,55 @@ class _$SettingsStateImpl implements _SettingsState { int get hashCode => Object.hash( runtimeType, importSpinnerVisible, importCurrent, importTotal); + @override + String toString() { + return 'SettingsState(importSpinnerVisible: $importSpinnerVisible, importCurrent: $importCurrent, importTotal: $importTotal)'; + } +} + +/// @nodoc +abstract mixin class _$SettingsStateCopyWith<$Res> + implements $SettingsStateCopyWith<$Res> { + factory _$SettingsStateCopyWith( + _SettingsState value, $Res Function(_SettingsState) _then) = + __$SettingsStateCopyWithImpl; + @override + @useResult + $Res call({bool importSpinnerVisible, int importCurrent, int importTotal}); +} + +/// @nodoc +class __$SettingsStateCopyWithImpl<$Res> + implements _$SettingsStateCopyWith<$Res> { + __$SettingsStateCopyWithImpl(this._self, this._then); + + final _SettingsState _self; + final $Res Function(_SettingsState) _then; + /// Create a copy of SettingsState /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$SettingsStateImplCopyWith<_$SettingsStateImpl> get copyWith => - __$$SettingsStateImplCopyWithImpl<_$SettingsStateImpl>(this, _$identity); + $Res call({ + Object? importSpinnerVisible = null, + Object? importCurrent = null, + Object? importTotal = null, + }) { + return _then(_SettingsState( + importSpinnerVisible: null == importSpinnerVisible + ? _self.importSpinnerVisible + : importSpinnerVisible // ignore: cast_nullable_to_non_nullable + as bool, + importCurrent: null == importCurrent + ? _self.importCurrent + : importCurrent // ignore: cast_nullable_to_non_nullable + as int, + importTotal: null == importTotal + ? _self.importTotal + : importTotal // ignore: cast_nullable_to_non_nullable + as int, + )); + } } -abstract class _SettingsState implements SettingsState { - factory _SettingsState( - {final bool importSpinnerVisible, - final int importCurrent, - final int importTotal}) = _$SettingsStateImpl; - - @override - bool get importSpinnerVisible; - @override - int get importCurrent; - @override - int get importTotal; - - /// Create a copy of SettingsState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SettingsStateImplCopyWith<_$SettingsStateImpl> get copyWith => - throw _privateConstructorUsedError; -} +// dart format on diff --git a/lib/src/ui/bloc/settings_state.dart b/lib/src/ui/bloc/settings_state.dart index dcf0a91..2c19c9e 100644 --- a/lib/src/ui/bloc/settings_state.dart +++ b/lib/src/ui/bloc/settings_state.dart @@ -1,7 +1,7 @@ part of 'settings_bloc.dart'; @freezed -class SettingsState with _$SettingsState { +abstract class SettingsState with _$SettingsState { factory SettingsState({ @Default(false) bool importSpinnerVisible, @Default(0) int importCurrent, diff --git a/pubspec.lock b/pubspec.lock index b2cec10..b53f4b6 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,114 +5,98 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: da0d9209ca76bde579f2da330aeb9df62b6319c834fa7baae052021b0462401f + sha256: "8d7ff3948166b8ec5da0fbb5962000926b8e02f2ed9b3e51d1738905fbd4c98d" url: "https://pub.dev" source: hosted - version: "85.0.0" + version: "93.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: "974859dc0ff5f37bc4313244b3218c791810d03ab3470a579580279ba971a48d" + sha256: de7148ed2fcec579b19f122c1800933dfa028f6d9fd38a152b04b1516cec120b url: "https://pub.dev" source: hosted - version: "7.7.1" + version: "10.0.1" archive: dependency: "direct main" description: name: archive - sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d + sha256: a96e8b390886ee8abb49b7bd3ac8df6f451c621619f52a26e815fdcf568959ff url: "https://pub.dev" source: hosted - version: "3.6.1" + version: "4.0.9" args: dependency: transitive description: name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.7.0" async: dependency: transitive description: name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.13.0" bloc: dependency: "direct main" description: name: bloc - sha256: "106842ad6569f0b60297619e9e0b1885c2fb9bf84812935490e6c5275777804e" + sha256: a48653a82055a900b88cd35f92429f068c5a8057ae9b136d197b3d56c57efb81 url: "https://pub.dev" source: hosted - version: "8.1.4" + version: "9.2.0" boolean_selector: dependency: transitive description: name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" bottom_bar: dependency: "direct main" description: name: bottom_bar - sha256: "4382b5fe59c2e1d44022bd0db530f68877afea442ebbdc76d7976c22dd4fb15c" + sha256: a2c96d8be21ab6173ac95bae3bcb2beb4c9a4cae7d82674f5551303986e121bf url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "2.0.5" build: dependency: transitive description: name: build - sha256: cef23f1eda9b57566c81e2133d196f8e3df48f244b317368d65c5943d91148f0 + sha256: "275bf6bb2a00a9852c28d4e0b410da1d833a734d57d39d44f94bfc895a484ec3" url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "4.0.4" build_config: dependency: transitive description: name: build_config - sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + sha256: "4070d2a59f8eec34c97c86ceb44403834899075f66e8a9d59706f8e7834f6f71" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.3.0" build_daemon: dependency: transitive description: name: build_daemon - sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" + sha256: bf05f6e12cfea92d3c09308d7bcdab1906cd8a179b023269eed00c071004b957 url: "https://pub.dev" source: hosted - version: "4.0.2" - build_resolvers: - dependency: transitive - description: - name: build_resolvers - sha256: b9e4fda21d846e192628e7a4f6deda6888c36b5b69ba02ff291a01fd529140f0 - url: "https://pub.dev" - source: hosted - version: "2.4.4" + version: "4.1.1" build_runner: dependency: "direct dev" description: name: build_runner - sha256: "058fe9dce1de7d69c4b84fada934df3e0153dd000758c4d65964d0166779aa99" + sha256: "7981eb922842c77033026eb4341d5af651562008cdb116bdfa31fc46516b6462" url: "https://pub.dev" source: hosted - version: "2.4.15" - build_runner_core: - dependency: transitive - description: - name: build_runner_core - sha256: "22e3aa1c80e0ada3722fe5b63fd43d9c8990759d0a2cf489c8c5d7b2bdebc021" - url: "https://pub.dev" - source: hosted - version: "8.0.0" + version: "2.12.2" built_collection: dependency: transitive description: @@ -125,10 +109,10 @@ packages: dependency: transitive description: name: built_value - sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + sha256: "6ae8a6435a8c6520c7077b107e77f1fb4ba7009633259a4d49a8afd8e7efc5e9" url: "https://pub.dev" source: hosted - version: "8.9.2" + version: "8.12.4" cached_network_image: dependency: "direct main" description: @@ -157,26 +141,34 @@ packages: dependency: transitive description: name: characters - sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.4.1" checked_yaml: dependency: transitive description: name: checked_yaml - sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + sha256: "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f" url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "2.0.4" + cli_config: + dependency: transitive + description: + name: cli_config + sha256: ac20a183a07002b700f0c25e61b7ee46b23c309d76ab7b7640a028f18e4d99ec + url: "https://pub.dev" + source: hosted + version: "0.2.0" cli_util: dependency: transitive description: name: cli_util - sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 + sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c url: "https://pub.dev" source: hosted - version: "0.4.1" + version: "0.4.2" clock: dependency: transitive description: @@ -185,14 +177,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.2" + code_assets: + dependency: transitive + description: + name: code_assets + sha256: "83ccdaa064c980b5596c35dd64a8d3ecc68620174ab9b90b6343b753aa721687" + url: "https://pub.dev" + source: hosted + version: "1.0.0" code_builder: dependency: transitive description: name: code_builder - sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + sha256: "6a6cab2ba4680d6423f34a9b972a4c9a94ebe1b62ecec4e1a1f2cba91fd1319d" url: "https://pub.dev" source: hosted - version: "4.10.0" + version: "4.11.1" collection: dependency: "direct main" description: @@ -205,34 +205,42 @@ packages: dependency: transitive description: name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" + coverage: + dependency: transitive + description: + name: coverage + sha256: "5da775aa218eaf2151c721b16c01c7676fbfdd99cebba2bf64e8b807a28ff94d" + url: "https://pub.dev" + source: hosted + version: "1.15.0" cross_file: dependency: transitive description: name: cross_file - sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" + sha256: "28bb3ae56f117b5aec029d702a90f57d285cd975c3c5c281eaca38dbc47c5937" url: "https://pub.dev" source: hosted - version: "0.3.4+2" + version: "0.3.5+2" crypto: dependency: transitive description: name: crypto - sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 + sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf url: "https://pub.dev" source: hosted - version: "3.0.5" - csv: + version: "3.0.7" + csslib: dependency: transitive description: - name: csv - sha256: c6aa2679b2a18cb57652920f674488d89712efaf4d3fdf2e537215b35fc19d6c + name: csslib + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" url: "https://pub.dev" source: hosted - version: "6.0.0" + version: "1.0.2" cupertino_icons: dependency: "direct main" description: @@ -245,18 +253,26 @@ packages: dependency: transitive description: name: dart_pubspec_licenses - sha256: a488baa010044452b208bc35c6dd62ac072a1ea918f796e4381d5aa1b21cfa41 + sha256: "3d579e1aa3ad3b6519f08fce6980799c0a8375bf41e0b8d58ca21f1be64032c9" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.2.0" dart_style: dependency: transitive description: name: dart_style - sha256: "8a0e5fba27e8ee025d2ffb4ee820b4e6e2cf5e4246a6b1a477eb66866947e0bb" + sha256: "29f7ecc274a86d32920b1d9cfc7502fa87220da41ec60b55f329559d5732e2b2" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.7" + dbus: + dependency: transitive + description: + name: dbus + sha256: d0c98dcd4f5169878b6cf8f6e0a52403a9dff371a3e2f019697accbf6f44a270 + url: "https://pub.dev" + source: hosted + version: "0.7.12" fake_async: dependency: transitive description: @@ -269,34 +285,34 @@ packages: dependency: transitive description: name: ffi - sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + sha256: "6d7fd89431262d8f3125e81b50d3847a091d846eafcd4fdb88dd06f36d705a45" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.2.0" file: dependency: transitive description: name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 url: "https://pub.dev" source: hosted - version: "7.0.0" + version: "7.0.1" file_picker: dependency: "direct main" description: name: file_picker - sha256: "167bb619cdddaa10ef2907609feb8a79c16dfa479d3afaf960f8e223f754bf12" + sha256: "57d9a1dd5063f85fa3107fb42d1faffda52fdc948cefd5fe5ea85267a5fc7343" url: "https://pub.dev" source: hosted - version: "8.1.2" + version: "10.3.10" fixnum: dependency: transitive description: name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" flutter: dependency: "direct main" description: flutter @@ -306,10 +322,10 @@ packages: dependency: "direct main" description: name: flutter_bloc - sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a + sha256: cf51747952201a455a1c840f8171d273be009b932c75093020f9af64f2123e38 url: "https://pub.dev" source: hosted - version: "8.1.6" + version: "9.1.1" flutter_cache_manager: dependency: transitive description: @@ -322,34 +338,39 @@ packages: dependency: "direct dev" description: name: flutter_launcher_icons - sha256: "619817c4b65b322b5104b6bb6dfe6cda62d9729bd7ad4303ecc8b4e690a67a77" + sha256: "10f13781741a2e3972126fae08393d3c4e01fa4cd7473326b94b72cf594195e7" url: "https://pub.dev" source: hosted - version: "0.14.1" + version: "0.14.4" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + sha256: "3105dc8492f6183fb076ccf1f351ac3d60564bff92e20bfc4af9cc1651f4e7e1" url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "6.0.0" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" flutter_oss_licenses: dependency: "direct dev" description: name: flutter_oss_licenses - sha256: "1219e0e03faac80e68a554b79447d4936c79081d698abca912cc123fb77094aa" + sha256: "80f5d879f1760f90020692db0d4b58b5a475df23573df567e12757a71ce59628" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.2.0" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda" + sha256: ee8068e0e1cd16c4a82714119918efdeed33b3ba7772c54b5d094ab53f9b7fd1 url: "https://pub.dev" source: hosted - version: "2.0.22" + version: "2.0.33" flutter_test: dependency: "direct dev" description: flutter @@ -364,26 +385,26 @@ packages: dependency: "direct main" description: name: fluttertoast - sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" + sha256: "144ddd74d49c865eba47abe31cbc746c7b311c82d6c32e571fd73c4264b740e2" url: "https://pub.dev" source: hosted - version: "8.2.8" + version: "9.0.0" freezed: dependency: "direct dev" description: name: freezed - sha256: "59a584c24b3acdc5250bb856d0d3e9c0b798ed14a4af1ddb7dc1c7b41df91c9c" + sha256: f23ea33b3863f119b58ed1b586e881a46bd28715ddcc4dbc33104524e3434131 url: "https://pub.dev" source: hosted - version: "2.5.8" + version: "3.2.5" freezed_annotation: dependency: "direct main" description: name: freezed_annotation - sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 + sha256: "7294967ff0a6d98638e7acb774aac3af2550777accd8149c90af5b014e6d44d8" url: "https://pub.dev" source: hosted - version: "2.4.4" + version: "3.1.0" frontend_server_client: dependency: transitive description: @@ -396,18 +417,18 @@ packages: dependency: "direct main" description: name: get_it - sha256: ff97e5e7b2e82e63c82f5658c6ba2605ea831f0f7489b0d2fb255d817ec4eb5e + sha256: "568d62f0e68666fb5d95519743b3c24a34c7f19d834b0658c46e26d778461f66" url: "https://pub.dev" source: hosted - version: "8.0.0" + version: "9.2.1" glob: dependency: transitive description: name: glob - sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.3" graphs: dependency: transitive description: @@ -416,86 +437,94 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.2" + hooks: + dependency: transitive + description: + name: hooks + sha256: e79ed1e8e1929bc6ecb6ec85f0cb519c887aa5b423705ded0d0f2d9226def388 + url: "https://pub.dev" + source: hosted + version: "1.0.2" + html: + dependency: transitive + description: + name: html + sha256: "6d1264f2dffa1b1101c25a91dff0dc2daee4c18e87cd8538729773c073dbf602" + url: "https://pub.dev" + source: hosted + version: "0.15.6" http: dependency: transitive description: name: http - sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412" url: "https://pub.dev" source: hosted - version: "1.2.2" + version: "1.6.0" http_multi_server: dependency: transitive description: name: http_multi_server - sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 url: "https://pub.dev" source: hosted - version: "3.2.1" + version: "3.2.2" http_parser: dependency: transitive description: name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.1.2" image: dependency: transitive description: name: image - sha256: "2237616a36c0d69aef7549ab439b833fb7f9fb9fc861af2cc9ac3eedddd69ca8" + sha256: f9881ff4998044947ec38d098bc7c8316ae1186fa786eddffdb867b9bc94dfce url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "4.8.0" + intl: + dependency: transitive + description: + name: intl + sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5" + url: "https://pub.dev" + source: hosted + version: "0.20.2" io: dependency: transitive description: name: io - sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" jikan_api: dependency: "direct main" description: name: jikan_api - sha256: "43cace06b6d807ea9d808f32c8f761e52cb08dfb4482b727bee2246f9d751d30" + sha256: "1f08d8db23f0378d9fdd0929b2741a7abe3c6ed6ad67039690c253aa59eee6ce" url: "https://pub.dev" source: hosted - version: "2.2.1" - js: - dependency: transitive - description: - name: js - sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf - url: "https://pub.dev" - source: hosted - version: "0.7.1" - json2yaml: - dependency: transitive - description: - name: json2yaml - sha256: da94630fbc56079426fdd167ae58373286f603371075b69bf46d848d63ba3e51 - url: "https://pub.dev" - source: hosted - version: "3.0.1" + version: "2.3.0" json_annotation: dependency: "direct main" description: name: json_annotation - sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + sha256: cb09e7dac6210041fad964ed7fbee004f14258b4eca4040f72d1234062ace4c8 url: "https://pub.dev" source: hosted - version: "4.9.0" + version: "4.11.0" json_serializable: dependency: "direct dev" description: name: json_serializable - sha256: c50ef5fc083d5b5e12eef489503ba3bf5ccc899e487d691584699b4bdefeea8c + sha256: "44729f5c45748e6748f6b9a57ab8f7e4336edc8ae41fc295070e3814e616a6c0" url: "https://pub.dev" source: hosted - version: "6.9.5" + version: "6.13.0" leak_tracker: dependency: transitive description: @@ -524,34 +553,42 @@ packages: dependency: transitive description: name: lints - sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" + sha256: "12f842a479589fea194fe5c5a3095abc7be0c1f2ddfa9a0e76aed1dbd26a87df" url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "6.1.0" logging: dependency: transitive description: name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" + markdown: + dependency: transitive + description: + name: markdown + sha256: "935e23e1ff3bc02d390bad4d4be001208ee92cc217cb5b5a6c19bc14aaa318c1" + url: "https://pub.dev" + source: hosted + version: "7.3.0" matcher: dependency: transitive description: name: matcher - sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861 url: "https://pub.dev" source: hosted - version: "0.12.17" + version: "0.12.19" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b" url: "https://pub.dev" source: hosted - version: "0.11.1" + version: "0.13.0" meta: dependency: transitive description: @@ -564,10 +601,18 @@ packages: dependency: transitive description: name: mime - sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" url: "https://pub.dev" source: hosted - version: "1.0.6" + version: "2.0.0" + native_toolchain_c: + dependency: transitive + description: + name: native_toolchain_c + sha256: "92b2ca62c8bd2b8d2f267cdfccf9bfbdb7322f778f8f91b3ce5b5cda23a3899f" + url: "https://pub.dev" + source: hosted + version: "0.17.5" nested: dependency: transitive description: @@ -576,6 +621,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.0" + node_preamble: + dependency: transitive + description: + name: node_preamble + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + objective_c: + dependency: transitive + description: + name: objective_c + sha256: "100a1c87616ab6ed41ec263b083c0ef3261ee6cd1dc3b0f35f8ddfa4f996fe52" + url: "https://pub.dev" + source: hosted + version: "9.3.0" octo_image: dependency: transitive description: @@ -588,10 +649,18 @@ packages: dependency: transitive description: name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.2.0" + pana: + dependency: transitive + description: + name: pana + sha256: d7bd85f18a14909f0baab69a13895dc4ff163be51c9884f73a506982adeac57d + url: "https://pub.dev" + source: hosted + version: "0.23.10" path: dependency: "direct main" description: @@ -604,26 +673,26 @@ packages: dependency: transitive description: name: path_provider - sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" + sha256: f2c65e21139ce2c3dad46922be8272bb5963516045659e71bb16e151c93b580e url: "https://pub.dev" source: hosted - version: "2.2.10" + version: "2.2.22" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 + sha256: "2a376b7d6392d80cd3705782d2caa734ca4727776db0b6ec36ef3f1855197699" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.6.0" path_provider_linux: dependency: transitive description: @@ -652,42 +721,42 @@ packages: dependency: "direct main" description: name: permission_handler - sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb" + sha256: bc917da36261b00137bbc8896bf1482169cd76f866282368948f032c8c1caae1 url: "https://pub.dev" source: hosted - version: "11.3.1" + version: "12.0.1" permission_handler_android: dependency: transitive description: name: permission_handler_android - sha256: "76e4ab092c1b240d31177bb64d2b0bea43f43d0e23541ec866151b9f7b2490fa" + sha256: "1e3bc410ca1bf84662104b100eb126e066cb55791b7451307f9708d4007350e6" url: "https://pub.dev" source: hosted - version: "12.0.12" + version: "13.0.1" permission_handler_apple: dependency: transitive description: name: permission_handler_apple - sha256: e6f6d73b12438ef13e648c4ae56bd106ec60d17e90a59c4545db6781229082a0 + sha256: f000131e755c54cf4d84a5d8bd6e4149e262cc31c5a8b1d698de1ac85fa41023 url: "https://pub.dev" source: hosted - version: "9.4.5" + version: "9.4.7" permission_handler_html: dependency: transitive description: name: permission_handler_html - sha256: af26edbbb1f2674af65a8f4b56e1a6f526156bc273d0e65dd8075fab51c78851 + sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24" url: "https://pub.dev" source: hosted - version: "0.1.3+2" + version: "0.1.3+5" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - sha256: e9c8eadee926c4532d0305dff94b85bf961f16759c3af791486613152af4b4f9 + sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878 url: "https://pub.dev" source: hosted - version: "4.2.3" + version: "4.3.0" permission_handler_windows: dependency: transitive description: @@ -700,18 +769,18 @@ packages: dependency: transitive description: name: petitparser - sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + sha256: "91bd59303e9f769f108f8df05e371341b15d59e995e6806aefab827b58336675" url: "https://pub.dev" source: hosted - version: "6.0.2" + version: "7.0.2" platform: dependency: transitive description: name: platform - sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" url: "https://pub.dev" source: hosted - version: "3.1.5" + version: "3.1.6" plugin_platform_interface: dependency: transitive description: @@ -724,34 +793,50 @@ packages: dependency: transitive description: name: pool - sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + sha256: "978783255c543aa3586a1b3c21f6e9d720eb315376a915872c61ef8b5c20177d" url: "https://pub.dev" source: hosted - version: "1.5.1" + version: "1.5.2" + posix: + dependency: transitive + description: + name: posix + sha256: "185ef7606574f789b40f289c233efa52e96dead518aed988e040a10737febb07" + url: "https://pub.dev" + source: hosted + version: "6.5.0" provider: dependency: transitive description: name: provider - sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c + sha256: "4e82183fa20e5ca25703ead7e05de9e4cceed1fbd1eadc1ac3cb6f565a09f272" url: "https://pub.dev" source: hosted - version: "6.1.2" + version: "6.1.5+1" pub_semver: dependency: transitive description: name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" pubspec_parse: dependency: transitive description: name: pubspec_parse - sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 + sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082" url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.5.0" + retry: + dependency: transitive + description: + name: retry + sha256: "822e118d5b3aafed083109c72d5f484c6dc66707885e07c0fbcb8b986bba7efc" + url: "https://pub.dev" + source: hosted + version: "3.1.2" rxdart: dependency: transitive description: @@ -760,22 +845,54 @@ packages: url: "https://pub.dev" source: hosted version: "0.28.0" + safe_url_check: + dependency: transitive + description: + name: safe_url_check + sha256: "49a3e060a7869cbafc8f4845ca1ecbbaaa53179980a32f4fdfeab1607e90f41d" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + serial_csv: + dependency: transitive + description: + name: serial_csv + sha256: "2d62bb70cb3ce7251383fc86ea9aae1298ab1e57af6ef4e93b6a9751c5c268dd" + url: "https://pub.dev" + source: hosted + version: "0.5.2" shelf: dependency: transitive description: name: shelf - sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 url: "https://pub.dev" source: hosted - version: "1.4.1" + version: "1.4.2" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + shelf_static: + dependency: transitive + description: + name: shelf_static + sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 + url: "https://pub.dev" + source: hosted + version: "1.1.3" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" + sha256: "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925" url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "3.0.0" sky_engine: dependency: transitive description: flutter @@ -785,90 +902,122 @@ packages: dependency: "direct main" description: name: slang - sha256: a2f704508bf9f209b71c881347bd27de45309651e9bd63570e4dd6ed2a77fbd2 + sha256: "27f3490c7a9eb2908715ed7be6b11cc2cc35a51365f33041b561ded79636f136" url: "https://pub.dev" source: hosted - version: "3.31.2" + version: "4.13.0" slang_build_runner: dependency: "direct dev" description: name: slang_build_runner - sha256: "6e60160e8000b91824c47221b20d9642e7408287a5a21837ecefc75270197586" + sha256: "137c359f6b692f3cfd69832f010b1473783389e88a88b7420ddb12d1a4387432" url: "https://pub.dev" source: hosted - version: "3.31.0" + version: "4.13.0" slang_flutter: dependency: "direct main" description: name: slang_flutter - sha256: f8400292be49c11697d94af58d7f7d054c91af759f41ffe71e4e5413871ffc62 + sha256: "2200626c34540af594c31a052bc55a59febc353228feaa1232d60d6143a99680" url: "https://pub.dev" source: hosted - version: "3.31.0" + version: "4.13.0" source_gen: dependency: transitive description: name: source_gen - sha256: "35c8150ece9e8c8d263337a265153c3329667640850b9304861faea59fc98f6b" + sha256: "1d562a3c1f713904ebbed50d2760217fd8a51ca170ac4b05b0db490699dbac17" url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "4.2.0" source_helper: dependency: transitive description: name: source_helper - sha256: a447acb083d3a5ef17f983dd36201aeea33fedadb3228fa831f2f0c92f0f3aca + sha256: "4a85e90b50694e652075cbe4575665539d253e6ec10e46e76b45368ab5e3caae" url: "https://pub.dev" source: hosted - version: "1.3.7" + version: "1.3.10" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b + url: "https://pub.dev" + source: hosted + version: "2.1.2" + source_maps: + dependency: transitive + description: + name: source_maps + sha256: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812" + url: "https://pub.dev" + source: hosted + version: "0.10.13" source_span: dependency: transitive description: name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab" url: "https://pub.dev" source: hosted - version: "1.10.0" - sprintf: - dependency: transitive - description: - name: sprintf - sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" - url: "https://pub.dev" - source: hosted - version: "7.0.0" + version: "1.10.2" sqflite: dependency: "direct main" description: name: sqflite - sha256: ff5a2436ef8ebdfda748fbfe957f9981524cb5ff11e7bafa8c42771840e8a788 + sha256: e2297b1da52f127bc7a3da11439985d9b536f75070f3325e62ada69a5c585d03 url: "https://pub.dev" source: hosted - version: "2.3.3+2" + version: "2.4.2" + sqflite_android: + dependency: transitive + description: + name: sqflite_android + sha256: ecd684501ebc2ae9a83536e8b15731642b9570dc8623e0073d227d0ee2bfea88 + url: "https://pub.dev" + source: hosted + version: "2.4.2+2" sqflite_common: dependency: transitive description: name: sqflite_common - sha256: "2d8e607db72e9cb7748c9c6e739e2c9618320a5517de693d5a24609c4671b1a4" + sha256: "6ef422a4525ecc601db6c0a2233ff448c731307906e92cabc9ba292afaae16a6" url: "https://pub.dev" source: hosted - version: "2.5.4+4" + version: "2.5.6" sqflite_common_ffi: dependency: "direct main" description: name: sqflite_common_ffi - sha256: "1f3ef3888d3bfbb47785cc1dda0dc7dd7ebd8c1955d32a9e8e9dae1e38d1c4c1" + sha256: c59fcdc143839a77581f7a7c4de018e53682408903a0a0800b95ef2dc4033eff url: "https://pub.dev" source: hosted - version: "2.3.5" + version: "2.4.0+2" + sqflite_darwin: + dependency: transitive + description: + name: sqflite_darwin + sha256: "279832e5cde3fe99e8571879498c9211f3ca6391b0d818df4e17d9fff5c6ccb3" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + sqflite_platform_interface: + dependency: transitive + description: + name: sqflite_platform_interface + sha256: "8dd4515c7bdcae0a785b0062859336de775e8c65db81ae33dd5445f35be61920" + url: "https://pub.dev" + source: hosted + version: "2.4.0" sqlite3: dependency: transitive description: name: sqlite3 - sha256: "3145bd74dcdb4fd6f5c6dda4d4e4490a8087d7f286a14dee5d37087290f0f8a2" + sha256: b7cf6b37667f6a921281797d2499ffc60fb878b161058d422064f0ddc78f6aa6 url: "https://pub.dev" source: hosted - version: "2.9.4" + version: "3.1.6" stack_trace: dependency: transitive description: @@ -889,18 +1038,18 @@ packages: dependency: transitive description: name: stream_transform - sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" string_scanner: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.4.1" swipeable_tile: dependency: "direct main" description: @@ -913,82 +1062,90 @@ packages: dependency: transitive description: name: synchronized - sha256: "69fe30f3a8b04a0be0c15ae6490fc859a78ef4c43ae2dd5e8a623d45bfcf9225" + sha256: c254ade258ec8282947a0acbbc90b9575b4f19673533ee46f2f6e9b3aeefd7c0 url: "https://pub.dev" source: hosted - version: "3.3.0+3" + version: "3.4.0" term_glyph: dependency: transitive description: name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" + test: + dependency: transitive + description: + name: test + sha256: "280d6d890011ca966ad08df7e8a4ddfab0fb3aa49f96ed6de56e3521347a9ae7" + url: "https://pub.dev" + source: hosted + version: "1.30.0" test_api: dependency: transitive description: name: test_api - sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 + sha256: "8161c84903fd860b26bfdefb7963b3f0b68fee7adea0f59ef805ecca346f0c7a" url: "https://pub.dev" source: hosted - version: "0.7.7" - timing: + version: "0.7.10" + test_core: dependency: transitive description: - name: timing - sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + name: test_core + sha256: "0381bd1585d1a924763c308100f2138205252fb90c9d4eeaf28489ee65ccde51" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "0.6.16" typed_data: dependency: transitive description: name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.4.0" url_launcher: dependency: "direct main" description: name: url_launcher - sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" + sha256: f6a7e5c4835bb4e3026a04793a4199ca2d14c739ec378fdfe23fc8075d0439f8 url: "https://pub.dev" source: hosted - version: "6.3.0" + version: "6.3.2" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: e35a698ac302dd68e41f73250bd9517fe3ab5fa4f18fe4647a0872db61bacbab + sha256: "767344bf3063897b5cf0db830e94f904528e6dd50a6dfaf839f0abf509009611" url: "https://pub.dev" source: hosted - version: "6.3.10" + version: "6.3.28" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: e43b677296fadce447e987a2f519dcf5f6d1e527dc35d01ffab4fff5b8a7063e + sha256: "580fe5dfb51671ae38191d316e027f6b76272b026370708c2d898799750a02b0" url: "https://pub.dev" source: hosted - version: "6.3.1" + version: "6.4.1" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: e2b9622b4007f97f504cd64c0128309dfb978ae66adbe944125ed9e1750f06af + sha256: d5e14138b3bc193a0f63c10a53c94b91d399df0512b1f29b94a043db7482384a url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "3.2.2" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: "769549c999acdb42b8bcfa7c43d72bf79a382ca7441ab18a808e101149daf672" + sha256: "368adf46f71ad3c21b8f06614adb38346f193f3a59ba8fe9a2fd74133070ba18" url: "https://pub.dev" source: hosted - version: "3.2.1" + version: "3.2.5" url_launcher_platform_interface: dependency: transitive description: @@ -1001,26 +1158,26 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + sha256: d0412fcf4c6b31ecfdb7762359b7206ffba3bbffd396c6d9f9c4616ece476c1f url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.4.2" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" + sha256: "712c70ab1b99744ff066053cbe3e80c73332b38d46e5e945c98689b2e66fc15f" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.5" uuid: dependency: transitive description: name: uuid - sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff + sha256: "1fef9e8e11e2991bb773070d4656b7bd5d850967a2456cfc83cf47925ba79489" url: "https://pub.dev" source: hosted - version: "4.5.1" + version: "4.5.3" vector_math: dependency: transitive description: @@ -1033,82 +1190,90 @@ packages: dependency: "direct dev" description: name: very_good_analysis - sha256: "1fb637c0022034b1f19ea2acb42a3603cbd8314a470646a59a2fb01f5f3a8629" + sha256: d1cb1d66a5aae2c702d68caca6c8347306d35e728fd94555fa21fa0448a972e0 url: "https://pub.dev" source: hosted - version: "6.0.0" + version: "10.2.0" vm_service: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60" url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "15.0.2" watcher: dependency: transitive description: name: watcher - sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + sha256: "1398c9f081a753f9226febe8900fce8f7d0a67163334e1c94a2438339d79d635" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.1" web: dependency: transitive description: name: web - sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" web_socket: dependency: transitive description: name: web_socket - sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + sha256: "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c" url: "https://pub.dev" source: hosted - version: "0.1.6" + version: "1.0.1" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" + sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8 url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.3" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" + url: "https://pub.dev" + source: hosted + version: "1.2.1" win32: dependency: transitive description: name: win32 - sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" + sha256: d7cb55e04cd34096cd3a79b3330245f54cb96a370a1c27adb3c84b917de8b08e url: "https://pub.dev" source: hosted - version: "5.5.4" + version: "5.15.0" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.1.0" xml: dependency: "direct main" description: name: xml - sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + sha256: "971043b3a0d3da28727e40ed3e0b5d18b742fa5a68665cca88e74b7876d5e025" url: "https://pub.dev" source: hosted - version: "6.5.0" + version: "6.6.1" yaml: dependency: transitive description: name: yaml - sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.3" sdks: - dart: ">=3.8.0-0 <4.0.0" - flutter: ">=3.24.0" + dart: ">=3.11.0 <4.0.0" + flutter: ">=3.38.4" diff --git a/pubspec.yaml b/pubspec.yaml index 707b069..28e98d8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,28 +5,28 @@ publish_to: "none" version: 0.1.3+2011 environment: - sdk: ">=3.0.0 <4.0.0" + sdk: ^3.8.0 dependencies: - archive: ^3.6.1 - bloc: ^8.1.4 + archive: ^4.0.9 + bloc: ^9.2.0 bottom_bar: ^2.0.3 cached_network_image: ^3.4.1 collection: ^1.18.0 cupertino_icons: ^1.0.8 - file_picker: ^8.1.2 + file_picker: ^10.3.10 flutter: sdk: flutter - flutter_bloc: ^8.1.6 - fluttertoast: ^8.2.8 - freezed_annotation: ^2.4.4 - get_it: ^8.0.0 + flutter_bloc: ^9.1.1 + fluttertoast: ^9.0.0 + freezed_annotation: ^3.1.0 + get_it: ^9.2.1 jikan_api: ^2.2.1 - json_annotation: ^4.9.0 + json_annotation: ^4.11.0 path: ^1.9.0 - permission_handler: ^11.3.1 - slang: ^3.31.2 - slang_flutter: ^3.31.0 + permission_handler: ^12.0.1 + slang: ^4.13.0 + slang_flutter: ^4.13.0 sqflite: ^2.3.3+2 sqflite_common_ffi: swipeable_tile: ^2.0.1 @@ -36,14 +36,14 @@ dependencies: dev_dependencies: build_runner: ^2.4.12 flutter_launcher_icons: ^0.14.1 - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0 flutter_oss_licenses: ^3.0.2 flutter_test: sdk: flutter - freezed: ^2.5.7 + freezed: ^3.2.5 json_serializable: ^6.8.0 - slang_build_runner: ^3.31.0 - very_good_analysis: ^6.0.0 + slang_build_runner: ^4.13.0 + very_good_analysis: ^10.2.0 flutter: uses-material-design: true