refactor: remove unused elements

This commit is contained in:
mso7nueh
2024-09-11 16:39:15 +03:00
parent 09cfacb022
commit 69472f422e
182 changed files with 2443 additions and 5482 deletions

View File

@@ -20,21 +20,16 @@ mixin _$ProfileState {
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)
loaded,
required TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts) loaded,
required TResult Function(String errorMessage) error,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult? Function(String errorMessage)? error,
}) =>
throw _privateConstructorUsedError;
@@ -42,9 +37,7 @@ mixin _$ProfileState {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) =>
@@ -78,18 +71,16 @@ mixin _$ProfileState {
/// @nodoc
abstract class $ProfileStateCopyWith<$Res> {
factory $ProfileStateCopyWith(
ProfileState value, $Res Function(ProfileState) then) =
_$ProfileStateCopyWithImpl<$Res, ProfileState>;
factory $ProfileStateCopyWith(ProfileState value, $Res Function(ProfileState) then) = _$ProfileStateCopyWithImpl<$Res, ProfileState>;
}
/// @nodoc
class _$ProfileStateCopyWithImpl<$Res, $Val extends ProfileState>
implements $ProfileStateCopyWith<$Res> {
class _$ProfileStateCopyWithImpl<$Res, $Val extends ProfileState> implements $ProfileStateCopyWith<$Res> {
_$ProfileStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -99,18 +90,12 @@ class _$ProfileStateCopyWithImpl<$Res, $Val extends ProfileState>
/// @nodoc
abstract class _$$ProfileStateImplCopyWith<$Res> {
factory _$$ProfileStateImplCopyWith(
_$ProfileStateImpl value, $Res Function(_$ProfileStateImpl) then) =
__$$ProfileStateImplCopyWithImpl<$Res>;
factory _$$ProfileStateImplCopyWith(_$ProfileStateImpl value, $Res Function(_$ProfileStateImpl) then) = __$$ProfileStateImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$ProfileStateImplCopyWithImpl<$Res>
extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateImpl>
implements _$$ProfileStateImplCopyWith<$Res> {
__$$ProfileStateImplCopyWithImpl(
_$ProfileStateImpl _value, $Res Function(_$ProfileStateImpl) _then)
: super(_value, _then);
class __$$ProfileStateImplCopyWithImpl<$Res> extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateImpl> implements _$$ProfileStateImplCopyWith<$Res> {
__$$ProfileStateImplCopyWithImpl(_$ProfileStateImpl _value, $Res Function(_$ProfileStateImpl) _then) : super(_value, _then);
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@@ -128,8 +113,7 @@ class _$ProfileStateImpl implements _ProfileState {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$ProfileStateImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ProfileStateImpl);
}
@override
@@ -140,11 +124,7 @@ class _$ProfileStateImpl implements _ProfileState {
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)
loaded,
required TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts) loaded,
required TResult Function(String errorMessage) error,
}) {
return $default();
@@ -155,9 +135,7 @@ class _$ProfileStateImpl implements _ProfileState {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return $default?.call();
@@ -168,9 +146,7 @@ class _$ProfileStateImpl implements _ProfileState {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -224,18 +200,14 @@ abstract class _ProfileState implements ProfileState {
/// @nodoc
abstract class _$$ProfileStateLoadingImplCopyWith<$Res> {
factory _$$ProfileStateLoadingImplCopyWith(_$ProfileStateLoadingImpl value,
$Res Function(_$ProfileStateLoadingImpl) then) =
factory _$$ProfileStateLoadingImplCopyWith(_$ProfileStateLoadingImpl value, $Res Function(_$ProfileStateLoadingImpl) then) =
__$$ProfileStateLoadingImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$ProfileStateLoadingImplCopyWithImpl<$Res>
extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateLoadingImpl>
class __$$ProfileStateLoadingImplCopyWithImpl<$Res> extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateLoadingImpl>
implements _$$ProfileStateLoadingImplCopyWith<$Res> {
__$$ProfileStateLoadingImplCopyWithImpl(_$ProfileStateLoadingImpl _value,
$Res Function(_$ProfileStateLoadingImpl) _then)
: super(_value, _then);
__$$ProfileStateLoadingImplCopyWithImpl(_$ProfileStateLoadingImpl _value, $Res Function(_$ProfileStateLoadingImpl) _then) : super(_value, _then);
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@@ -253,9 +225,7 @@ class _$ProfileStateLoadingImpl implements ProfileStateLoading {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProfileStateLoadingImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ProfileStateLoadingImpl);
}
@override
@@ -266,11 +236,7 @@ class _$ProfileStateLoadingImpl implements ProfileStateLoading {
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)
loaded,
required TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts) loaded,
required TResult Function(String errorMessage) error,
}) {
return loading();
@@ -281,9 +247,7 @@ class _$ProfileStateLoadingImpl implements ProfileStateLoading {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return loading?.call();
@@ -294,9 +258,7 @@ class _$ProfileStateLoadingImpl implements ProfileStateLoading {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -350,26 +312,21 @@ abstract class ProfileStateLoading implements ProfileState {
/// @nodoc
abstract class _$$ProfileStateLoadedImplCopyWith<$Res> {
factory _$$ProfileStateLoadedImplCopyWith(_$ProfileStateLoadedImpl value,
$Res Function(_$ProfileStateLoadedImpl) then) =
factory _$$ProfileStateLoadedImplCopyWith(_$ProfileStateLoadedImpl value, $Res Function(_$ProfileStateLoadedImpl) then) =
__$$ProfileStateLoadedImplCopyWithImpl<$Res>;
@useResult
$Res call(
{ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts});
$Res call({ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts});
$ProfileModelCopyWith<$Res> get profile;
$ProfileDetailsModelCopyWith<$Res> get profileDetails;
}
/// @nodoc
class __$$ProfileStateLoadedImplCopyWithImpl<$Res>
extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateLoadedImpl>
class __$$ProfileStateLoadedImplCopyWithImpl<$Res> extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateLoadedImpl>
implements _$$ProfileStateLoadedImplCopyWith<$Res> {
__$$ProfileStateLoadedImplCopyWithImpl(_$ProfileStateLoadedImpl _value,
$Res Function(_$ProfileStateLoadedImpl) _then)
: super(_value, _then);
__$$ProfileStateLoadedImplCopyWithImpl(_$ProfileStateLoadedImpl _value, $Res Function(_$ProfileStateLoadedImpl) _then) : super(_value, _then);
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@@ -420,10 +377,7 @@ class __$$ProfileStateLoadedImplCopyWithImpl<$Res>
/// @nodoc
class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
const _$ProfileStateLoadedImpl(
{required this.profile,
required this.profileDetails,
required final List<FeedBlogPostModel> blogPosts})
const _$ProfileStateLoadedImpl({required this.profile, required this.profileDetails, required final List<FeedBlogPostModel> blogPosts})
: _blogPosts = blogPosts;
@override
@@ -431,6 +385,7 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
@override
final ProfileDetailsModel profileDetails;
final List<FeedBlogPostModel> _blogPosts;
@override
List<FeedBlogPostModel> get blogPosts {
if (_blogPosts is EqualUnmodifiableListView) return _blogPosts;
@@ -449,15 +404,12 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
(other.runtimeType == runtimeType &&
other is _$ProfileStateLoadedImpl &&
(identical(other.profile, profile) || other.profile == profile) &&
(identical(other.profileDetails, profileDetails) ||
other.profileDetails == profileDetails) &&
const DeepCollectionEquality()
.equals(other._blogPosts, _blogPosts));
(identical(other.profileDetails, profileDetails) || other.profileDetails == profileDetails) &&
const DeepCollectionEquality().equals(other._blogPosts, _blogPosts));
}
@override
int get hashCode => Object.hash(runtimeType, profile, profileDetails,
const DeepCollectionEquality().hash(_blogPosts));
int get hashCode => Object.hash(runtimeType, profile, profileDetails, const DeepCollectionEquality().hash(_blogPosts));
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@@ -465,19 +417,14 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
@override
@pragma('vm:prefer-inline')
_$$ProfileStateLoadedImplCopyWith<_$ProfileStateLoadedImpl> get copyWith =>
__$$ProfileStateLoadedImplCopyWithImpl<_$ProfileStateLoadedImpl>(
this, _$identity);
__$$ProfileStateLoadedImplCopyWithImpl<_$ProfileStateLoadedImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)
loaded,
required TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts) loaded,
required TResult Function(String errorMessage) error,
}) {
return loaded(profile, profileDetails, blogPosts);
@@ -488,9 +435,7 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return loaded?.call(profile, profileDetails, blogPosts);
@@ -501,9 +446,7 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -553,38 +496,35 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
abstract class ProfileStateLoaded implements ProfileState {
const factory ProfileStateLoaded(
{required final ProfileModel profile,
required final ProfileDetailsModel profileDetails,
required final List<FeedBlogPostModel> blogPosts}) =
_$ProfileStateLoadedImpl;
{required final ProfileModel profile,
required final ProfileDetailsModel profileDetails,
required final List<FeedBlogPostModel> blogPosts}) = _$ProfileStateLoadedImpl;
ProfileModel get profile;
ProfileDetailsModel get profileDetails;
List<FeedBlogPostModel> get blogPosts;
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProfileStateLoadedImplCopyWith<_$ProfileStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ProfileStateLoadedImplCopyWith<_$ProfileStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$ProfileStateErrorImplCopyWith<$Res> {
factory _$$ProfileStateErrorImplCopyWith(_$ProfileStateErrorImpl value,
$Res Function(_$ProfileStateErrorImpl) then) =
factory _$$ProfileStateErrorImplCopyWith(_$ProfileStateErrorImpl value, $Res Function(_$ProfileStateErrorImpl) then) =
__$$ProfileStateErrorImplCopyWithImpl<$Res>;
@useResult
$Res call({String errorMessage});
}
/// @nodoc
class __$$ProfileStateErrorImplCopyWithImpl<$Res>
extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateErrorImpl>
class __$$ProfileStateErrorImplCopyWithImpl<$Res> extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateErrorImpl>
implements _$$ProfileStateErrorImplCopyWith<$Res> {
__$$ProfileStateErrorImplCopyWithImpl(_$ProfileStateErrorImpl _value,
$Res Function(_$ProfileStateErrorImpl) _then)
: super(_value, _then);
__$$ProfileStateErrorImplCopyWithImpl(_$ProfileStateErrorImpl _value, $Res Function(_$ProfileStateErrorImpl) _then) : super(_value, _then);
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@@ -620,8 +560,7 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProfileStateErrorImpl &&
(identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
@@ -632,20 +571,14 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ProfileStateErrorImplCopyWith<_$ProfileStateErrorImpl> get copyWith =>
__$$ProfileStateErrorImplCopyWithImpl<_$ProfileStateErrorImpl>(
this, _$identity);
_$$ProfileStateErrorImplCopyWith<_$ProfileStateErrorImpl> get copyWith => __$$ProfileStateErrorImplCopyWithImpl<_$ProfileStateErrorImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)
loaded,
required TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts) loaded,
required TResult Function(String errorMessage) error,
}) {
return error(errorMessage);
@@ -656,9 +589,7 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return error?.call(errorMessage);
@@ -669,9 +600,7 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -720,14 +649,12 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
}
abstract class ProfileStateError implements ProfileState {
const factory ProfileStateError({required final String errorMessage}) =
_$ProfileStateErrorImpl;
const factory ProfileStateError({required final String errorMessage}) = _$ProfileStateErrorImpl;
String get errorMessage;
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProfileStateErrorImplCopyWith<_$ProfileStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ProfileStateErrorImplCopyWith<_$ProfileStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -1,4 +1,4 @@
//
//
// import 'package:eatvio_app/features/profile/models/profile_model.dart';
// import 'package:eatvio_app/features/profile/presentation/bloc/profile_cubit/profile_cubit.dart';
// import 'package:flutter/cupertino.dart';

View File

@@ -1,4 +1,4 @@
//
//
// import 'package:eatvio_app/features/profile/models/profile_model.dart';
// import 'package:eatvio_app/features/profile/presentation/bloc/profile_cubit/profile_cubit.dart';
// import 'package:flutter/cupertino.dart';