forked from eatvio/eatvio_app
feat(feed): add recipes screen
This commit is contained in:
@@ -24,6 +24,7 @@ mixin _$FeedState {
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
@@ -70,35 +71,28 @@ mixin _$FeedState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $FeedStateCopyWith<$Res> {
|
||||
factory $FeedStateCopyWith(FeedState value, $Res Function(FeedState) then) =
|
||||
_$FeedStateCopyWithImpl<$Res, FeedState>;
|
||||
factory $FeedStateCopyWith(FeedState value, $Res Function(FeedState) then) = _$FeedStateCopyWithImpl<$Res, FeedState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState>
|
||||
implements $FeedStateCopyWith<$Res> {
|
||||
class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState> implements $FeedStateCopyWith<$Res> {
|
||||
_$FeedStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FeedStateImplCopyWith<$Res> {
|
||||
factory _$$FeedStateImplCopyWith(
|
||||
_$FeedStateImpl value, $Res Function(_$FeedStateImpl) then) =
|
||||
__$$FeedStateImplCopyWithImpl<$Res>;
|
||||
factory _$$FeedStateImplCopyWith(_$FeedStateImpl value, $Res Function(_$FeedStateImpl) then) = __$$FeedStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedStateImplCopyWithImpl<$Res>
|
||||
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateImpl>
|
||||
implements _$$FeedStateImplCopyWith<$Res> {
|
||||
__$$FeedStateImplCopyWithImpl(
|
||||
_$FeedStateImpl _value, $Res Function(_$FeedStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$FeedStateImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateImpl> implements _$$FeedStateImplCopyWith<$Res> {
|
||||
__$$FeedStateImplCopyWithImpl(_$FeedStateImpl _value, $Res Function(_$FeedStateImpl) _then) : super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -113,8 +107,7 @@ class _$FeedStateImpl implements _FeedState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$FeedStateImpl);
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$FeedStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -201,18 +194,14 @@ abstract class _FeedState implements FeedState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FeedStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$FeedStateLoadingImplCopyWith(_$FeedStateLoadingImpl value,
|
||||
$Res Function(_$FeedStateLoadingImpl) then) =
|
||||
factory _$$FeedStateLoadingImplCopyWith(_$FeedStateLoadingImpl value, $Res Function(_$FeedStateLoadingImpl) then) =
|
||||
__$$FeedStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadingImpl>
|
||||
class __$$FeedStateLoadingImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadingImpl>
|
||||
implements _$$FeedStateLoadingImplCopyWith<$Res> {
|
||||
__$$FeedStateLoadingImplCopyWithImpl(_$FeedStateLoadingImpl _value,
|
||||
$Res Function(_$FeedStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$FeedStateLoadingImplCopyWithImpl(_$FeedStateLoadingImpl _value, $Res Function(_$FeedStateLoadingImpl) _then) : super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -227,8 +216,7 @@ class _$FeedStateLoadingImpl implements FeedStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$FeedStateLoadingImpl);
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$FeedStateLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -315,20 +303,15 @@ abstract class FeedStateLoading implements FeedState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FeedStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$FeedStateLoadedImplCopyWith(_$FeedStateLoadedImpl value,
|
||||
$Res Function(_$FeedStateLoadedImpl) then) =
|
||||
__$$FeedStateLoadedImplCopyWithImpl<$Res>;
|
||||
factory _$$FeedStateLoadedImplCopyWith(_$FeedStateLoadedImpl value, $Res Function(_$FeedStateLoadedImpl) then) = __$$FeedStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({List<FeedBlogPostModel> feedBlogPostList});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadedImpl>
|
||||
implements _$$FeedStateLoadedImplCopyWith<$Res> {
|
||||
__$$FeedStateLoadedImplCopyWithImpl(
|
||||
_$FeedStateLoadedImpl _value, $Res Function(_$FeedStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$FeedStateLoadedImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadedImpl> implements _$$FeedStateLoadedImplCopyWith<$Res> {
|
||||
__$$FeedStateLoadedImplCopyWithImpl(_$FeedStateLoadedImpl _value, $Res Function(_$FeedStateLoadedImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -347,15 +330,13 @@ class __$$FeedStateLoadedImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
|
||||
class _$FeedStateLoadedImpl implements FeedStateLoaded {
|
||||
const _$FeedStateLoadedImpl(
|
||||
{required final List<FeedBlogPostModel> feedBlogPostList})
|
||||
: _feedBlogPostList = feedBlogPostList;
|
||||
const _$FeedStateLoadedImpl({required final List<FeedBlogPostModel> feedBlogPostList}) : _feedBlogPostList = feedBlogPostList;
|
||||
|
||||
final List<FeedBlogPostModel> _feedBlogPostList;
|
||||
|
||||
@override
|
||||
List<FeedBlogPostModel> get feedBlogPostList {
|
||||
if (_feedBlogPostList is EqualUnmodifiableListView)
|
||||
return _feedBlogPostList;
|
||||
if (_feedBlogPostList is EqualUnmodifiableListView) return _feedBlogPostList;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_feedBlogPostList);
|
||||
}
|
||||
@@ -370,20 +351,16 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$FeedStateLoadedImpl &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._feedBlogPostList, _feedBlogPostList));
|
||||
const DeepCollectionEquality().equals(other._feedBlogPostList, _feedBlogPostList));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_feedBlogPostList));
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_feedBlogPostList));
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith =>
|
||||
__$$FeedStateLoadedImplCopyWithImpl<_$FeedStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith => __$$FeedStateLoadedImplCopyWithImpl<_$FeedStateLoadedImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -461,32 +438,25 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
|
||||
}
|
||||
|
||||
abstract class FeedStateLoaded implements FeedState {
|
||||
const factory FeedStateLoaded(
|
||||
{required final List<FeedBlogPostModel> feedBlogPostList}) =
|
||||
_$FeedStateLoadedImpl;
|
||||
const factory FeedStateLoaded({required final List<FeedBlogPostModel> feedBlogPostList}) = _$FeedStateLoadedImpl;
|
||||
|
||||
List<FeedBlogPostModel> get feedBlogPostList;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FeedStateErrorImplCopyWith<$Res> {
|
||||
factory _$$FeedStateErrorImplCopyWith(_$FeedStateErrorImpl value,
|
||||
$Res Function(_$FeedStateErrorImpl) then) =
|
||||
__$$FeedStateErrorImplCopyWithImpl<$Res>;
|
||||
factory _$$FeedStateErrorImplCopyWith(_$FeedStateErrorImpl value, $Res Function(_$FeedStateErrorImpl) then) = __$$FeedStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateErrorImpl>
|
||||
implements _$$FeedStateErrorImplCopyWith<$Res> {
|
||||
__$$FeedStateErrorImplCopyWithImpl(
|
||||
_$FeedStateErrorImpl _value, $Res Function(_$FeedStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$FeedStateErrorImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateErrorImpl> implements _$$FeedStateErrorImplCopyWith<$Res> {
|
||||
__$$FeedStateErrorImplCopyWithImpl(_$FeedStateErrorImpl _value, $Res Function(_$FeedStateErrorImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -520,8 +490,7 @@ class _$FeedStateErrorImpl implements FeedStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$FeedStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -530,9 +499,7 @@ class _$FeedStateErrorImpl implements FeedStateError {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith =>
|
||||
__$$FeedStateErrorImplCopyWithImpl<_$FeedStateErrorImpl>(
|
||||
this, _$identity);
|
||||
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith => __$$FeedStateErrorImplCopyWithImpl<_$FeedStateErrorImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -610,11 +577,10 @@ class _$FeedStateErrorImpl implements FeedStateError {
|
||||
}
|
||||
|
||||
abstract class FeedStateError implements FeedState {
|
||||
const factory FeedStateError({required final String errorMessage}) =
|
||||
_$FeedStateErrorImpl;
|
||||
const factory FeedStateError({required final String errorMessage}) = _$FeedStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -15,4 +15,4 @@ class RecipesCubit extends Cubit<RecipesState> {
|
||||
emit(RecipesState.error(errorMessage: e.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ mixin _$RecipesState {
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
@@ -70,36 +71,28 @@ mixin _$RecipesState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $RecipesStateCopyWith<$Res> {
|
||||
factory $RecipesStateCopyWith(
|
||||
RecipesState value, $Res Function(RecipesState) then) =
|
||||
_$RecipesStateCopyWithImpl<$Res, RecipesState>;
|
||||
factory $RecipesStateCopyWith(RecipesState value, $Res Function(RecipesState) then) = _$RecipesStateCopyWithImpl<$Res, RecipesState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$RecipesStateCopyWithImpl<$Res, $Val extends RecipesState>
|
||||
implements $RecipesStateCopyWith<$Res> {
|
||||
class _$RecipesStateCopyWithImpl<$Res, $Val extends RecipesState> implements $RecipesStateCopyWith<$Res> {
|
||||
_$RecipesStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipesStateImplCopyWith<$Res> {
|
||||
factory _$$RecipesStateImplCopyWith(
|
||||
_$RecipesStateImpl value, $Res Function(_$RecipesStateImpl) then) =
|
||||
__$$RecipesStateImplCopyWithImpl<$Res>;
|
||||
factory _$$RecipesStateImplCopyWith(_$RecipesStateImpl value, $Res Function(_$RecipesStateImpl) then) = __$$RecipesStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipesStateImplCopyWithImpl<$Res>
|
||||
extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateImpl>
|
||||
implements _$$RecipesStateImplCopyWith<$Res> {
|
||||
__$$RecipesStateImplCopyWithImpl(
|
||||
_$RecipesStateImpl _value, $Res Function(_$RecipesStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$RecipesStateImplCopyWithImpl<$Res> extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateImpl> implements _$$RecipesStateImplCopyWith<$Res> {
|
||||
__$$RecipesStateImplCopyWithImpl(_$RecipesStateImpl _value, $Res Function(_$RecipesStateImpl) _then) : super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -114,8 +107,7 @@ class _$RecipesStateImpl implements _RecipesState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$RecipesStateImpl);
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$RecipesStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -202,18 +194,14 @@ abstract class _RecipesState implements RecipesState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipesStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$RecipesStateLoadingImplCopyWith(_$RecipesStateLoadingImpl value,
|
||||
$Res Function(_$RecipesStateLoadingImpl) then) =
|
||||
factory _$$RecipesStateLoadingImplCopyWith(_$RecipesStateLoadingImpl value, $Res Function(_$RecipesStateLoadingImpl) then) =
|
||||
__$$RecipesStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipesStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateLoadingImpl>
|
||||
class __$$RecipesStateLoadingImplCopyWithImpl<$Res> extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateLoadingImpl>
|
||||
implements _$$RecipesStateLoadingImplCopyWith<$Res> {
|
||||
__$$RecipesStateLoadingImplCopyWithImpl(_$RecipesStateLoadingImpl _value,
|
||||
$Res Function(_$RecipesStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$RecipesStateLoadingImplCopyWithImpl(_$RecipesStateLoadingImpl _value, $Res Function(_$RecipesStateLoadingImpl) _then) : super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -228,9 +216,7 @@ class _$RecipesStateLoadingImpl implements RecipesStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipesStateLoadingImpl);
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$RecipesStateLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -317,20 +303,17 @@ abstract class RecipesStateLoading implements RecipesState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipesStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$RecipesStateLoadedImplCopyWith(_$RecipesStateLoadedImpl value,
|
||||
$Res Function(_$RecipesStateLoadedImpl) then) =
|
||||
factory _$$RecipesStateLoadedImplCopyWith(_$RecipesStateLoadedImpl value, $Res Function(_$RecipesStateLoadedImpl) then) =
|
||||
__$$RecipesStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({List<Recipes> recipesList});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipesStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateLoadedImpl>
|
||||
class __$$RecipesStateLoadedImplCopyWithImpl<$Res> extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateLoadedImpl>
|
||||
implements _$$RecipesStateLoadedImplCopyWith<$Res> {
|
||||
__$$RecipesStateLoadedImplCopyWithImpl(_$RecipesStateLoadedImpl _value,
|
||||
$Res Function(_$RecipesStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$RecipesStateLoadedImplCopyWithImpl(_$RecipesStateLoadedImpl _value, $Res Function(_$RecipesStateLoadedImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -349,10 +332,10 @@ class __$$RecipesStateLoadedImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
|
||||
class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
||||
const _$RecipesStateLoadedImpl({required final List<Recipes> recipesList})
|
||||
: _recipesList = recipesList;
|
||||
const _$RecipesStateLoadedImpl({required final List<Recipes> recipesList}) : _recipesList = recipesList;
|
||||
|
||||
final List<Recipes> _recipesList;
|
||||
|
||||
@override
|
||||
List<Recipes> get recipesList {
|
||||
if (_recipesList is EqualUnmodifiableListView) return _recipesList;
|
||||
@@ -368,22 +351,17 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipesStateLoadedImpl &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._recipesList, _recipesList));
|
||||
(other.runtimeType == runtimeType && other is _$RecipesStateLoadedImpl && const DeepCollectionEquality().equals(other._recipesList, _recipesList));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_recipesList));
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_recipesList));
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith =>
|
||||
__$$RecipesStateLoadedImplCopyWithImpl<_$RecipesStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
__$$RecipesStateLoadedImplCopyWithImpl<_$RecipesStateLoadedImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -461,31 +439,27 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
||||
}
|
||||
|
||||
abstract class RecipesStateLoaded implements RecipesState {
|
||||
const factory RecipesStateLoaded({required final List<Recipes> recipesList}) =
|
||||
_$RecipesStateLoadedImpl;
|
||||
const factory RecipesStateLoaded({required final List<Recipes> recipesList}) = _$RecipesStateLoadedImpl;
|
||||
|
||||
List<Recipes> get recipesList;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
_$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipesStateErrorImplCopyWith<$Res> {
|
||||
factory _$$RecipesStateErrorImplCopyWith(_$RecipesStateErrorImpl value,
|
||||
$Res Function(_$RecipesStateErrorImpl) then) =
|
||||
factory _$$RecipesStateErrorImplCopyWith(_$RecipesStateErrorImpl value, $Res Function(_$RecipesStateErrorImpl) then) =
|
||||
__$$RecipesStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipesStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateErrorImpl>
|
||||
class __$$RecipesStateErrorImplCopyWithImpl<$Res> extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateErrorImpl>
|
||||
implements _$$RecipesStateErrorImplCopyWith<$Res> {
|
||||
__$$RecipesStateErrorImplCopyWithImpl(_$RecipesStateErrorImpl _value,
|
||||
$Res Function(_$RecipesStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$RecipesStateErrorImplCopyWithImpl(_$RecipesStateErrorImpl _value, $Res Function(_$RecipesStateErrorImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -519,8 +493,7 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipesStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -529,9 +502,7 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith =>
|
||||
__$$RecipesStateErrorImplCopyWithImpl<_$RecipesStateErrorImpl>(
|
||||
this, _$identity);
|
||||
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith => __$$RecipesStateErrorImplCopyWithImpl<_$RecipesStateErrorImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -609,11 +580,10 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
|
||||
}
|
||||
|
||||
abstract class RecipesStateError implements RecipesState {
|
||||
const factory RecipesStateError({required final String errorMessage}) =
|
||||
_$RecipesStateErrorImpl;
|
||||
const factory RecipesStateError({required final String errorMessage}) = _$RecipesStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -20,10 +20,11 @@ class _BlogPostWidgetState extends State<BlogPostWidget> {
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
onTap: () => GoRouter.of(context).pushNamed(
|
||||
'blogPostScreen',
|
||||
extra: widget.feedBlogPostModel.id.toString(),
|
||||
),
|
||||
onTap: () =>
|
||||
GoRouter.of(context).pushNamed(
|
||||
'blogPostScreen',
|
||||
extra: widget.feedBlogPostModel.id.toString(),
|
||||
),
|
||||
child: Ink(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/features/chat/presentation/pages/photo_view_screen.dart';
|
||||
import 'package:eatvio_app/features/feed/models/recipes_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
class RecipesWidget extends StatefulWidget {
|
||||
final Recipes recipes;
|
||||
@@ -19,7 +20,7 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
onTap: () {},
|
||||
onTap: () => GoRouter.of(context).pushNamed('aboutRecipesScreen', extra: widget.recipes),
|
||||
child: Ink(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
@@ -30,7 +31,6 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Stack(
|
||||
alignment: Alignment.bottomLeft,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(12)),
|
||||
@@ -52,64 +52,78 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
Positioned(
|
||||
left: 8,
|
||||
bottom: 8,
|
||||
child: Wrap(
|
||||
runSpacing: 8,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white54,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.visibility_rounded,
|
||||
size: 20,
|
||||
color: Colors.black,
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
'0',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
_iconButton(Icons.fastfood, '139.9 ккал'),
|
||||
SizedBox(width: 8),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white54,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.favorite_border_rounded,
|
||||
size: 20,
|
||||
color: Colors.black,
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
'0',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
_iconButton(Icons.timer_rounded, widget.recipes.cookingTime.toString() + ' минут'),
|
||||
SizedBox(width: 8),
|
||||
_iconButton(Icons.fast_forward_rounded, widget.recipes.steps.length.toString() + ' этапов'),
|
||||
],
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 8,
|
||||
top: 8,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.8),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.favorite_rounded,
|
||||
size: 16,
|
||||
color: Colors.black,
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
'0',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
right: 8,
|
||||
top: 8,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.8),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.visibility_rounded,
|
||||
size: 16,
|
||||
color: Colors.black,
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
'0',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
@@ -134,20 +148,6 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
child: Wrap(
|
||||
runSpacing: 8,
|
||||
children: [
|
||||
_iconButton(Icons.fastfood, '139.9 ккал'),
|
||||
SizedBox(width: 8),
|
||||
_iconButton(Icons.timer_rounded, widget.recipes.cookingTime.toString() + ' минут'),
|
||||
SizedBox(width: 8),
|
||||
_iconButton(Icons.fast_forward_rounded, widget.recipes.steps.length.toString() + ' этапов'),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -155,10 +155,10 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
}
|
||||
|
||||
_iconButton(IconData icon, [String? text]) {
|
||||
return Ink(
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.gray100,
|
||||
color: Colors.white.withOpacity(0.8),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
height: 32,
|
||||
@@ -167,16 +167,16 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
children: [
|
||||
Icon(
|
||||
icon,
|
||||
size: 20,
|
||||
color: appTheme.gray600,
|
||||
size: 16,
|
||||
color: Colors.black,
|
||||
),
|
||||
if (text != null) SizedBox(width: 8),
|
||||
if (text != null)
|
||||
Text(
|
||||
text,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: appTheme.gray600,
|
||||
fontSize: 12,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user