forked from eatvio/eatvio_app
feat(profile): add profile charts models, requests. Max length of description in posts, recipes, diets = 200
This commit is contained in:
@@ -24,7 +24,6 @@ mixin _$InitializationState {
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
@@ -71,17 +70,18 @@ mixin _$InitializationState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $InitializationStateCopyWith<$Res> {
|
||||
factory $InitializationStateCopyWith(InitializationState value, $Res Function(InitializationState) then) =
|
||||
factory $InitializationStateCopyWith(
|
||||
InitializationState value, $Res Function(InitializationState) then) =
|
||||
_$InitializationStateCopyWithImpl<$Res, InitializationState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$InitializationStateCopyWithImpl<$Res, $Val extends InitializationState> implements $InitializationStateCopyWith<$Res> {
|
||||
class _$InitializationStateCopyWithImpl<$Res, $Val extends InitializationState>
|
||||
implements $InitializationStateCopyWith<$Res> {
|
||||
_$InitializationStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -91,14 +91,18 @@ class _$InitializationStateCopyWithImpl<$Res, $Val extends InitializationState>
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$InitializationStateImplCopyWith<$Res> {
|
||||
factory _$$InitializationStateImplCopyWith(_$InitializationStateImpl value, $Res Function(_$InitializationStateImpl) then) =
|
||||
factory _$$InitializationStateImplCopyWith(_$InitializationStateImpl value,
|
||||
$Res Function(_$InitializationStateImpl) then) =
|
||||
__$$InitializationStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$InitializationStateImplCopyWithImpl<$Res> extends _$InitializationStateCopyWithImpl<$Res, _$InitializationStateImpl>
|
||||
class __$$InitializationStateImplCopyWithImpl<$Res>
|
||||
extends _$InitializationStateCopyWithImpl<$Res, _$InitializationStateImpl>
|
||||
implements _$$InitializationStateImplCopyWith<$Res> {
|
||||
__$$InitializationStateImplCopyWithImpl(_$InitializationStateImpl _value, $Res Function(_$InitializationStateImpl) _then) : super(_value, _then);
|
||||
__$$InitializationStateImplCopyWithImpl(_$InitializationStateImpl _value,
|
||||
$Res Function(_$InitializationStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of InitializationState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -116,7 +120,9 @@ class _$InitializationStateImpl implements _InitializationState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$InitializationStateImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$InitializationStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -203,14 +209,20 @@ abstract class _InitializationState implements InitializationState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$InitializationStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$InitializationStateLoadingImplCopyWith(_$InitializationStateLoadingImpl value, $Res Function(_$InitializationStateLoadingImpl) then) =
|
||||
factory _$$InitializationStateLoadingImplCopyWith(
|
||||
_$InitializationStateLoadingImpl value,
|
||||
$Res Function(_$InitializationStateLoadingImpl) then) =
|
||||
__$$InitializationStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$InitializationStateLoadingImplCopyWithImpl<$Res> extends _$InitializationStateCopyWithImpl<$Res, _$InitializationStateLoadingImpl>
|
||||
class __$$InitializationStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$InitializationStateCopyWithImpl<$Res,
|
||||
_$InitializationStateLoadingImpl>
|
||||
implements _$$InitializationStateLoadingImplCopyWith<$Res> {
|
||||
__$$InitializationStateLoadingImplCopyWithImpl(_$InitializationStateLoadingImpl _value, $Res Function(_$InitializationStateLoadingImpl) _then)
|
||||
__$$InitializationStateLoadingImplCopyWithImpl(
|
||||
_$InitializationStateLoadingImpl _value,
|
||||
$Res Function(_$InitializationStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of InitializationState
|
||||
@@ -229,7 +241,9 @@ class _$InitializationStateLoadingImpl implements InitializationStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$InitializationStateLoadingImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$InitializationStateLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -316,17 +330,22 @@ abstract class InitializationStateLoading implements InitializationState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$InitializationStateSuccessImplCopyWith<$Res> {
|
||||
factory _$$InitializationStateSuccessImplCopyWith(_$InitializationStateSuccessImpl value, $Res Function(_$InitializationStateSuccessImpl) then) =
|
||||
factory _$$InitializationStateSuccessImplCopyWith(
|
||||
_$InitializationStateSuccessImpl value,
|
||||
$Res Function(_$InitializationStateSuccessImpl) then) =
|
||||
__$$InitializationStateSuccessImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({PusherChannelsClient client});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$InitializationStateSuccessImplCopyWithImpl<$Res> extends _$InitializationStateCopyWithImpl<$Res, _$InitializationStateSuccessImpl>
|
||||
class __$$InitializationStateSuccessImplCopyWithImpl<$Res>
|
||||
extends _$InitializationStateCopyWithImpl<$Res,
|
||||
_$InitializationStateSuccessImpl>
|
||||
implements _$$InitializationStateSuccessImplCopyWith<$Res> {
|
||||
__$$InitializationStateSuccessImplCopyWithImpl(_$InitializationStateSuccessImpl _value, $Res Function(_$InitializationStateSuccessImpl) _then)
|
||||
__$$InitializationStateSuccessImplCopyWithImpl(
|
||||
_$InitializationStateSuccessImpl _value,
|
||||
$Res Function(_$InitializationStateSuccessImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of InitializationState
|
||||
@@ -361,7 +380,9 @@ class _$InitializationStateSuccessImpl implements InitializationStateSuccess {
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$InitializationStateSuccessImpl && (identical(other.client, client) || other.client == client));
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$InitializationStateSuccessImpl &&
|
||||
(identical(other.client, client) || other.client == client));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -372,8 +393,9 @@ class _$InitializationStateSuccessImpl implements InitializationStateSuccess {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl> get copyWith =>
|
||||
__$$InitializationStateSuccessImplCopyWithImpl<_$InitializationStateSuccessImpl>(this, _$identity);
|
||||
_$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl>
|
||||
get copyWith => __$$InitializationStateSuccessImplCopyWithImpl<
|
||||
_$InitializationStateSuccessImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -451,29 +473,37 @@ class _$InitializationStateSuccessImpl implements InitializationStateSuccess {
|
||||
}
|
||||
|
||||
abstract class InitializationStateSuccess implements InitializationState {
|
||||
const factory InitializationStateSuccess({required final PusherChannelsClient client}) = _$InitializationStateSuccessImpl;
|
||||
const factory InitializationStateSuccess(
|
||||
{required final PusherChannelsClient client}) =
|
||||
_$InitializationStateSuccessImpl;
|
||||
|
||||
PusherChannelsClient get client;
|
||||
|
||||
/// Create a copy of InitializationState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$InitializationStateErrorImplCopyWith<$Res> {
|
||||
factory _$$InitializationStateErrorImplCopyWith(_$InitializationStateErrorImpl value, $Res Function(_$InitializationStateErrorImpl) then) =
|
||||
factory _$$InitializationStateErrorImplCopyWith(
|
||||
_$InitializationStateErrorImpl value,
|
||||
$Res Function(_$InitializationStateErrorImpl) then) =
|
||||
__$$InitializationStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$InitializationStateErrorImplCopyWithImpl<$Res> extends _$InitializationStateCopyWithImpl<$Res, _$InitializationStateErrorImpl>
|
||||
class __$$InitializationStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$InitializationStateCopyWithImpl<$Res,
|
||||
_$InitializationStateErrorImpl>
|
||||
implements _$$InitializationStateErrorImplCopyWith<$Res> {
|
||||
__$$InitializationStateErrorImplCopyWithImpl(_$InitializationStateErrorImpl _value, $Res Function(_$InitializationStateErrorImpl) _then)
|
||||
__$$InitializationStateErrorImplCopyWithImpl(
|
||||
_$InitializationStateErrorImpl _value,
|
||||
$Res Function(_$InitializationStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of InitializationState
|
||||
@@ -510,7 +540,8 @@ class _$InitializationStateErrorImpl implements InitializationStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$InitializationStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -521,8 +552,9 @@ class _$InitializationStateErrorImpl implements InitializationStateError {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl> get copyWith =>
|
||||
__$$InitializationStateErrorImplCopyWithImpl<_$InitializationStateErrorImpl>(this, _$identity);
|
||||
_$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl>
|
||||
get copyWith => __$$InitializationStateErrorImplCopyWithImpl<
|
||||
_$InitializationStateErrorImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -600,12 +632,14 @@ class _$InitializationStateErrorImpl implements InitializationStateError {
|
||||
}
|
||||
|
||||
abstract class InitializationStateError implements InitializationState {
|
||||
const factory InitializationStateError({required final String errorMessage}) = _$InitializationStateErrorImpl;
|
||||
const factory InitializationStateError({required final String errorMessage}) =
|
||||
_$InitializationStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
/// Create a copy of InitializationState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -22,13 +22,10 @@ Links _$LinksFromJson(Map<String, dynamic> json) {
|
||||
mixin _$Links {
|
||||
@JsonKey(name: "first")
|
||||
String get first => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "last")
|
||||
String get last => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "prev")
|
||||
dynamic get prev => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "next")
|
||||
dynamic get next => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -43,20 +40,23 @@ mixin _$Links {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $LinksCopyWith<$Res> {
|
||||
factory $LinksCopyWith(Links value, $Res Function(Links) then) = _$LinksCopyWithImpl<$Res, Links>;
|
||||
|
||||
factory $LinksCopyWith(Links value, $Res Function(Links) then) =
|
||||
_$LinksCopyWithImpl<$Res, Links>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "first") String first, @JsonKey(name: "last") String last, @JsonKey(name: "prev") dynamic prev, @JsonKey(name: "next") dynamic next});
|
||||
{@JsonKey(name: "first") String first,
|
||||
@JsonKey(name: "last") String last,
|
||||
@JsonKey(name: "prev") dynamic prev,
|
||||
@JsonKey(name: "next") dynamic next});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$LinksCopyWithImpl<$Res, $Val extends Links> implements $LinksCopyWith<$Res> {
|
||||
class _$LinksCopyWithImpl<$Res, $Val extends Links>
|
||||
implements $LinksCopyWith<$Res> {
|
||||
_$LinksCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -93,17 +93,25 @@ class _$LinksCopyWithImpl<$Res, $Val extends Links> implements $LinksCopyWith<$R
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$LinksImplCopyWith<$Res> implements $LinksCopyWith<$Res> {
|
||||
factory _$$LinksImplCopyWith(_$LinksImpl value, $Res Function(_$LinksImpl) then) = __$$LinksImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$LinksImplCopyWith(
|
||||
_$LinksImpl value, $Res Function(_$LinksImpl) then) =
|
||||
__$$LinksImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "first") String first, @JsonKey(name: "last") String last, @JsonKey(name: "prev") dynamic prev, @JsonKey(name: "next") dynamic next});
|
||||
{@JsonKey(name: "first") String first,
|
||||
@JsonKey(name: "last") String last,
|
||||
@JsonKey(name: "prev") dynamic prev,
|
||||
@JsonKey(name: "next") dynamic next});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$LinksImplCopyWithImpl<$Res> extends _$LinksCopyWithImpl<$Res, _$LinksImpl> implements _$$LinksImplCopyWith<$Res> {
|
||||
__$$LinksImplCopyWithImpl(_$LinksImpl _value, $Res Function(_$LinksImpl) _then) : super(_value, _then);
|
||||
class __$$LinksImplCopyWithImpl<$Res>
|
||||
extends _$LinksCopyWithImpl<$Res, _$LinksImpl>
|
||||
implements _$$LinksImplCopyWith<$Res> {
|
||||
__$$LinksImplCopyWithImpl(
|
||||
_$LinksImpl _value, $Res Function(_$LinksImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Links
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -145,7 +153,8 @@ class _$LinksImpl implements _Links {
|
||||
@JsonKey(name: "prev") required this.prev,
|
||||
@JsonKey(name: "next") required this.next});
|
||||
|
||||
factory _$LinksImpl.fromJson(Map<String, dynamic> json) => _$$LinksImplFromJson(json);
|
||||
factory _$LinksImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$LinksImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "first")
|
||||
@@ -178,14 +187,20 @@ class _$LinksImpl implements _Links {
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, first, last, const DeepCollectionEquality().hash(prev), const DeepCollectionEquality().hash(next));
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
first,
|
||||
last,
|
||||
const DeepCollectionEquality().hash(prev),
|
||||
const DeepCollectionEquality().hash(next));
|
||||
|
||||
/// Create a copy of Links
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$LinksImplCopyWith<_$LinksImpl> get copyWith => __$$LinksImplCopyWithImpl<_$LinksImpl>(this, _$identity);
|
||||
_$$LinksImplCopyWith<_$LinksImpl> get copyWith =>
|
||||
__$$LinksImplCopyWithImpl<_$LinksImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -207,15 +222,12 @@ abstract class _Links implements Links {
|
||||
@override
|
||||
@JsonKey(name: "first")
|
||||
String get first;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "last")
|
||||
String get last;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "prev")
|
||||
dynamic get prev;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "next")
|
||||
dynamic get next;
|
||||
@@ -224,7 +236,8 @@ abstract class _Links implements Links {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$LinksImplCopyWith<_$LinksImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$LinksImplCopyWith<_$LinksImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Meta _$MetaFromJson(Map<String, dynamic> json) {
|
||||
@@ -235,25 +248,18 @@ Meta _$MetaFromJson(Map<String, dynamic> json) {
|
||||
mixin _$Meta {
|
||||
@JsonKey(name: "current_page")
|
||||
int get currentPage => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "from")
|
||||
dynamic get from => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "last_page")
|
||||
int get lastPage => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "links")
|
||||
List<Link> get links => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "path")
|
||||
String? get path => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "per_page")
|
||||
int get perPage => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "to")
|
||||
dynamic get to => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "total")
|
||||
int get total => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -268,8 +274,8 @@ mixin _$Meta {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $MetaCopyWith<$Res> {
|
||||
factory $MetaCopyWith(Meta value, $Res Function(Meta) then) = _$MetaCopyWithImpl<$Res, Meta>;
|
||||
|
||||
factory $MetaCopyWith(Meta value, $Res Function(Meta) then) =
|
||||
_$MetaCopyWithImpl<$Res, Meta>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "current_page") int currentPage,
|
||||
@@ -283,12 +289,12 @@ abstract class $MetaCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$MetaCopyWithImpl<$Res, $Val extends Meta> implements $MetaCopyWith<$Res> {
|
||||
class _$MetaCopyWithImpl<$Res, $Val extends Meta>
|
||||
implements $MetaCopyWith<$Res> {
|
||||
_$MetaCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -345,8 +351,9 @@ class _$MetaCopyWithImpl<$Res, $Val extends Meta> implements $MetaCopyWith<$Res>
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$MetaImplCopyWith<$Res> implements $MetaCopyWith<$Res> {
|
||||
factory _$$MetaImplCopyWith(_$MetaImpl value, $Res Function(_$MetaImpl) then) = __$$MetaImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$MetaImplCopyWith(
|
||||
_$MetaImpl value, $Res Function(_$MetaImpl) then) =
|
||||
__$$MetaImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -361,8 +368,11 @@ abstract class _$$MetaImplCopyWith<$Res> implements $MetaCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$MetaImplCopyWithImpl<$Res> extends _$MetaCopyWithImpl<$Res, _$MetaImpl> implements _$$MetaImplCopyWith<$Res> {
|
||||
__$$MetaImplCopyWithImpl(_$MetaImpl _value, $Res Function(_$MetaImpl) _then) : super(_value, _then);
|
||||
class __$$MetaImplCopyWithImpl<$Res>
|
||||
extends _$MetaCopyWithImpl<$Res, _$MetaImpl>
|
||||
implements _$$MetaImplCopyWith<$Res> {
|
||||
__$$MetaImplCopyWithImpl(_$MetaImpl _value, $Res Function(_$MetaImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Meta
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -429,7 +439,8 @@ class _$MetaImpl implements _Meta {
|
||||
@JsonKey(name: "total") required this.total})
|
||||
: _links = links;
|
||||
|
||||
factory _$MetaImpl.fromJson(Map<String, dynamic> json) => _$$MetaImplFromJson(json);
|
||||
factory _$MetaImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$MetaImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "current_page")
|
||||
@@ -441,7 +452,6 @@ class _$MetaImpl implements _Meta {
|
||||
@JsonKey(name: "last_page")
|
||||
final int lastPage;
|
||||
final List<Link> _links;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "links")
|
||||
List<Link> get links {
|
||||
@@ -473,9 +483,11 @@ class _$MetaImpl implements _Meta {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$MetaImpl &&
|
||||
(identical(other.currentPage, currentPage) || other.currentPage == currentPage) &&
|
||||
(identical(other.currentPage, currentPage) ||
|
||||
other.currentPage == currentPage) &&
|
||||
const DeepCollectionEquality().equals(other.from, from) &&
|
||||
(identical(other.lastPage, lastPage) || other.lastPage == lastPage) &&
|
||||
(identical(other.lastPage, lastPage) ||
|
||||
other.lastPage == lastPage) &&
|
||||
const DeepCollectionEquality().equals(other._links, _links) &&
|
||||
(identical(other.path, path) || other.path == path) &&
|
||||
(identical(other.perPage, perPage) || other.perPage == perPage) &&
|
||||
@@ -485,15 +497,24 @@ class _$MetaImpl implements _Meta {
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, currentPage, const DeepCollectionEquality().hash(from), lastPage, const DeepCollectionEquality().hash(_links),
|
||||
path, perPage, const DeepCollectionEquality().hash(to), total);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
currentPage,
|
||||
const DeepCollectionEquality().hash(from),
|
||||
lastPage,
|
||||
const DeepCollectionEquality().hash(_links),
|
||||
path,
|
||||
perPage,
|
||||
const DeepCollectionEquality().hash(to),
|
||||
total);
|
||||
|
||||
/// Create a copy of Meta
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$MetaImplCopyWith<_$MetaImpl> get copyWith => __$$MetaImplCopyWithImpl<_$MetaImpl>(this, _$identity);
|
||||
_$$MetaImplCopyWith<_$MetaImpl> get copyWith =>
|
||||
__$$MetaImplCopyWithImpl<_$MetaImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -519,31 +540,24 @@ abstract class _Meta implements Meta {
|
||||
@override
|
||||
@JsonKey(name: "current_page")
|
||||
int get currentPage;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "from")
|
||||
dynamic get from;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "last_page")
|
||||
int get lastPage;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "links")
|
||||
List<Link> get links;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "path")
|
||||
String? get path;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "per_page")
|
||||
int get perPage;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "to")
|
||||
dynamic get to;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "total")
|
||||
int get total;
|
||||
@@ -552,7 +566,8 @@ abstract class _Meta implements Meta {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$MetaImplCopyWith<_$MetaImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$MetaImplCopyWith<_$MetaImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Link _$LinkFromJson(Map<String, dynamic> json) {
|
||||
@@ -563,10 +578,8 @@ Link _$LinkFromJson(Map<String, dynamic> json) {
|
||||
mixin _$Link {
|
||||
@JsonKey(name: "url")
|
||||
String? get url => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "label")
|
||||
String? get label => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "active")
|
||||
bool? get active => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -581,19 +594,22 @@ mixin _$Link {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $LinkCopyWith<$Res> {
|
||||
factory $LinkCopyWith(Link value, $Res Function(Link) then) = _$LinkCopyWithImpl<$Res, Link>;
|
||||
|
||||
factory $LinkCopyWith(Link value, $Res Function(Link) then) =
|
||||
_$LinkCopyWithImpl<$Res, Link>;
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "url") String? url, @JsonKey(name: "label") String? label, @JsonKey(name: "active") bool? active});
|
||||
$Res call(
|
||||
{@JsonKey(name: "url") String? url,
|
||||
@JsonKey(name: "label") String? label,
|
||||
@JsonKey(name: "active") bool? active});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$LinkCopyWithImpl<$Res, $Val extends Link> implements $LinkCopyWith<$Res> {
|
||||
class _$LinkCopyWithImpl<$Res, $Val extends Link>
|
||||
implements $LinkCopyWith<$Res> {
|
||||
_$LinkCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -625,16 +641,23 @@ class _$LinkCopyWithImpl<$Res, $Val extends Link> implements $LinkCopyWith<$Res>
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$LinkImplCopyWith<$Res> implements $LinkCopyWith<$Res> {
|
||||
factory _$$LinkImplCopyWith(_$LinkImpl value, $Res Function(_$LinkImpl) then) = __$$LinkImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$LinkImplCopyWith(
|
||||
_$LinkImpl value, $Res Function(_$LinkImpl) then) =
|
||||
__$$LinkImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "url") String? url, @JsonKey(name: "label") String? label, @JsonKey(name: "active") bool? active});
|
||||
$Res call(
|
||||
{@JsonKey(name: "url") String? url,
|
||||
@JsonKey(name: "label") String? label,
|
||||
@JsonKey(name: "active") bool? active});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$LinkImplCopyWithImpl<$Res> extends _$LinkCopyWithImpl<$Res, _$LinkImpl> implements _$$LinkImplCopyWith<$Res> {
|
||||
__$$LinkImplCopyWithImpl(_$LinkImpl _value, $Res Function(_$LinkImpl) _then) : super(_value, _then);
|
||||
class __$$LinkImplCopyWithImpl<$Res>
|
||||
extends _$LinkCopyWithImpl<$Res, _$LinkImpl>
|
||||
implements _$$LinkImplCopyWith<$Res> {
|
||||
__$$LinkImplCopyWithImpl(_$LinkImpl _value, $Res Function(_$LinkImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Link
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -665,9 +688,13 @@ class __$$LinkImplCopyWithImpl<$Res> extends _$LinkCopyWithImpl<$Res, _$LinkImpl
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$LinkImpl implements _Link {
|
||||
const _$LinkImpl({@JsonKey(name: "url") this.url, @JsonKey(name: "label") this.label, @JsonKey(name: "active") this.active});
|
||||
const _$LinkImpl(
|
||||
{@JsonKey(name: "url") this.url,
|
||||
@JsonKey(name: "label") this.label,
|
||||
@JsonKey(name: "active") this.active});
|
||||
|
||||
factory _$LinkImpl.fromJson(Map<String, dynamic> json) => _$$LinkImplFromJson(json);
|
||||
factory _$LinkImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$LinkImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "url")
|
||||
@@ -703,7 +730,8 @@ class _$LinkImpl implements _Link {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$LinkImplCopyWith<_$LinkImpl> get copyWith => __$$LinkImplCopyWithImpl<_$LinkImpl>(this, _$identity);
|
||||
_$$LinkImplCopyWith<_$LinkImpl> get copyWith =>
|
||||
__$$LinkImplCopyWithImpl<_$LinkImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -714,19 +742,19 @@ class _$LinkImpl implements _Link {
|
||||
}
|
||||
|
||||
abstract class _Link implements Link {
|
||||
const factory _Link({@JsonKey(name: "url") final String? url, @JsonKey(name: "label") final String? label, @JsonKey(name: "active") final bool? active}) =
|
||||
_$LinkImpl;
|
||||
const factory _Link(
|
||||
{@JsonKey(name: "url") final String? url,
|
||||
@JsonKey(name: "label") final String? label,
|
||||
@JsonKey(name: "active") final bool? active}) = _$LinkImpl;
|
||||
|
||||
factory _Link.fromJson(Map<String, dynamic> json) = _$LinkImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "url")
|
||||
String? get url;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "label")
|
||||
String? get label;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "active")
|
||||
bool? get active;
|
||||
@@ -735,5 +763,6 @@ abstract class _Link implements Link {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$LinkImplCopyWith<_$LinkImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$LinkImplCopyWith<_$LinkImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,8 @@ _$LinksImpl _$$LinksImplFromJson(Map<String, dynamic> json) => _$LinksImpl(
|
||||
next: json['next'],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$LinksImplToJson(_$LinksImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$LinksImplToJson(_$LinksImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'first': instance.first,
|
||||
'last': instance.last,
|
||||
'prev': instance.prev,
|
||||
@@ -24,14 +25,17 @@ _$MetaImpl _$$MetaImplFromJson(Map<String, dynamic> json) => _$MetaImpl(
|
||||
currentPage: (json['current_page'] as num).toInt(),
|
||||
from: json['from'],
|
||||
lastPage: (json['last_page'] as num).toInt(),
|
||||
links: (json['links'] as List<dynamic>).map((e) => Link.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
links: (json['links'] as List<dynamic>)
|
||||
.map((e) => Link.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
path: json['path'] as String?,
|
||||
perPage: (json['per_page'] as num).toInt(),
|
||||
to: json['to'],
|
||||
total: (json['total'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$MetaImplToJson(_$MetaImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$MetaImplToJson(_$MetaImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'current_page': instance.currentPage,
|
||||
'from': instance.from,
|
||||
'last_page': instance.lastPage,
|
||||
@@ -48,7 +52,8 @@ _$LinkImpl _$$LinkImplFromJson(Map<String, dynamic> json) => _$LinkImpl(
|
||||
active: json['active'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$LinkImplToJson(_$LinkImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$LinkImplToJson(_$LinkImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'url': instance.url,
|
||||
'label': instance.label,
|
||||
'active': instance.active,
|
||||
|
||||
@@ -17,35 +17,33 @@ final _privateConstructorUsedError = UnsupportedError(
|
||||
/// @nodoc
|
||||
mixin _$SelectionPopupModel {
|
||||
int? get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get title => throw _privateConstructorUsedError;
|
||||
|
||||
dynamic get value => throw _privateConstructorUsedError;
|
||||
|
||||
bool get isSelected => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of SelectionPopupModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$SelectionPopupModelCopyWith<SelectionPopupModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$SelectionPopupModelCopyWith<SelectionPopupModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $SelectionPopupModelCopyWith<$Res> {
|
||||
factory $SelectionPopupModelCopyWith(SelectionPopupModel value, $Res Function(SelectionPopupModel) then) =
|
||||
factory $SelectionPopupModelCopyWith(
|
||||
SelectionPopupModel value, $Res Function(SelectionPopupModel) then) =
|
||||
_$SelectionPopupModelCopyWithImpl<$Res, SelectionPopupModel>;
|
||||
|
||||
@useResult
|
||||
$Res call({int? id, String title, dynamic value, bool isSelected});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$SelectionPopupModelCopyWithImpl<$Res, $Val extends SelectionPopupModel> implements $SelectionPopupModelCopyWith<$Res> {
|
||||
class _$SelectionPopupModelCopyWithImpl<$Res, $Val extends SelectionPopupModel>
|
||||
implements $SelectionPopupModelCopyWith<$Res> {
|
||||
_$SelectionPopupModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -81,19 +79,23 @@ class _$SelectionPopupModelCopyWithImpl<$Res, $Val extends SelectionPopupModel>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$SelectionPopupModelImplCopyWith<$Res> implements $SelectionPopupModelCopyWith<$Res> {
|
||||
factory _$$SelectionPopupModelImplCopyWith(_$SelectionPopupModelImpl value, $Res Function(_$SelectionPopupModelImpl) then) =
|
||||
abstract class _$$SelectionPopupModelImplCopyWith<$Res>
|
||||
implements $SelectionPopupModelCopyWith<$Res> {
|
||||
factory _$$SelectionPopupModelImplCopyWith(_$SelectionPopupModelImpl value,
|
||||
$Res Function(_$SelectionPopupModelImpl) then) =
|
||||
__$$SelectionPopupModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int? id, String title, dynamic value, bool isSelected});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$SelectionPopupModelImplCopyWithImpl<$Res> extends _$SelectionPopupModelCopyWithImpl<$Res, _$SelectionPopupModelImpl>
|
||||
class __$$SelectionPopupModelImplCopyWithImpl<$Res>
|
||||
extends _$SelectionPopupModelCopyWithImpl<$Res, _$SelectionPopupModelImpl>
|
||||
implements _$$SelectionPopupModelImplCopyWith<$Res> {
|
||||
__$$SelectionPopupModelImplCopyWithImpl(_$SelectionPopupModelImpl _value, $Res Function(_$SelectionPopupModelImpl) _then) : super(_value, _then);
|
||||
__$$SelectionPopupModelImplCopyWithImpl(_$SelectionPopupModelImpl _value,
|
||||
$Res Function(_$SelectionPopupModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of SelectionPopupModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -129,7 +131,8 @@ class __$$SelectionPopupModelImplCopyWithImpl<$Res> extends _$SelectionPopupMode
|
||||
/// @nodoc
|
||||
|
||||
class _$SelectionPopupModelImpl implements _SelectionPopupModel {
|
||||
const _$SelectionPopupModelImpl({this.id, required this.title, this.value, this.isSelected = false});
|
||||
const _$SelectionPopupModelImpl(
|
||||
{this.id, required this.title, this.value, this.isSelected = false});
|
||||
|
||||
@override
|
||||
final int? id;
|
||||
@@ -154,11 +157,13 @@ class _$SelectionPopupModelImpl implements _SelectionPopupModel {
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.title, title) || other.title == title) &&
|
||||
const DeepCollectionEquality().equals(other.value, value) &&
|
||||
(identical(other.isSelected, isSelected) || other.isSelected == isSelected));
|
||||
(identical(other.isSelected, isSelected) ||
|
||||
other.isSelected == isSelected));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, title, const DeepCollectionEquality().hash(value), isSelected);
|
||||
int get hashCode => Object.hash(runtimeType, id, title,
|
||||
const DeepCollectionEquality().hash(value), isSelected);
|
||||
|
||||
/// Create a copy of SelectionPopupModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -166,21 +171,23 @@ class _$SelectionPopupModelImpl implements _SelectionPopupModel {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith =>
|
||||
__$$SelectionPopupModelImplCopyWithImpl<_$SelectionPopupModelImpl>(this, _$identity);
|
||||
__$$SelectionPopupModelImplCopyWithImpl<_$SelectionPopupModelImpl>(
|
||||
this, _$identity);
|
||||
}
|
||||
|
||||
abstract class _SelectionPopupModel implements SelectionPopupModel {
|
||||
const factory _SelectionPopupModel({final int? id, required final String title, final dynamic value, final bool isSelected}) = _$SelectionPopupModelImpl;
|
||||
const factory _SelectionPopupModel(
|
||||
{final int? id,
|
||||
required final String title,
|
||||
final dynamic value,
|
||||
final bool isSelected}) = _$SelectionPopupModelImpl;
|
||||
|
||||
@override
|
||||
int? get id;
|
||||
|
||||
@override
|
||||
String get title;
|
||||
|
||||
@override
|
||||
dynamic get value;
|
||||
|
||||
@override
|
||||
bool get isSelected;
|
||||
|
||||
@@ -188,5 +195,6 @@ abstract class _SelectionPopupModel implements SelectionPopupModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ mixin _$NewMessagesState {
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
@@ -71,16 +70,18 @@ mixin _$NewMessagesState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $NewMessagesStateCopyWith<$Res> {
|
||||
factory $NewMessagesStateCopyWith(NewMessagesState value, $Res Function(NewMessagesState) then) = _$NewMessagesStateCopyWithImpl<$Res, NewMessagesState>;
|
||||
factory $NewMessagesStateCopyWith(
|
||||
NewMessagesState value, $Res Function(NewMessagesState) then) =
|
||||
_$NewMessagesStateCopyWithImpl<$Res, NewMessagesState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$NewMessagesStateCopyWithImpl<$Res, $Val extends NewMessagesState> implements $NewMessagesStateCopyWith<$Res> {
|
||||
class _$NewMessagesStateCopyWithImpl<$Res, $Val extends NewMessagesState>
|
||||
implements $NewMessagesStateCopyWith<$Res> {
|
||||
_$NewMessagesStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -90,14 +91,18 @@ class _$NewMessagesStateCopyWithImpl<$Res, $Val extends NewMessagesState> implem
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NewMessagesStateImplCopyWith<$Res> {
|
||||
factory _$$NewMessagesStateImplCopyWith(_$NewMessagesStateImpl value, $Res Function(_$NewMessagesStateImpl) then) =
|
||||
factory _$$NewMessagesStateImplCopyWith(_$NewMessagesStateImpl value,
|
||||
$Res Function(_$NewMessagesStateImpl) then) =
|
||||
__$$NewMessagesStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NewMessagesStateImplCopyWithImpl<$Res> extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateImpl>
|
||||
class __$$NewMessagesStateImplCopyWithImpl<$Res>
|
||||
extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateImpl>
|
||||
implements _$$NewMessagesStateImplCopyWith<$Res> {
|
||||
__$$NewMessagesStateImplCopyWithImpl(_$NewMessagesStateImpl _value, $Res Function(_$NewMessagesStateImpl) _then) : super(_value, _then);
|
||||
__$$NewMessagesStateImplCopyWithImpl(_$NewMessagesStateImpl _value,
|
||||
$Res Function(_$NewMessagesStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of NewMessagesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -115,7 +120,8 @@ class _$NewMessagesStateImpl implements _NewMessagesState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$NewMessagesStateImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$NewMessagesStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -202,14 +208,19 @@ abstract class _NewMessagesState implements NewMessagesState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NewMessagesStateEmptyImplCopyWith<$Res> {
|
||||
factory _$$NewMessagesStateEmptyImplCopyWith(_$NewMessagesStateEmptyImpl value, $Res Function(_$NewMessagesStateEmptyImpl) then) =
|
||||
factory _$$NewMessagesStateEmptyImplCopyWith(
|
||||
_$NewMessagesStateEmptyImpl value,
|
||||
$Res Function(_$NewMessagesStateEmptyImpl) then) =
|
||||
__$$NewMessagesStateEmptyImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NewMessagesStateEmptyImplCopyWithImpl<$Res> extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateEmptyImpl>
|
||||
class __$$NewMessagesStateEmptyImplCopyWithImpl<$Res>
|
||||
extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateEmptyImpl>
|
||||
implements _$$NewMessagesStateEmptyImplCopyWith<$Res> {
|
||||
__$$NewMessagesStateEmptyImplCopyWithImpl(_$NewMessagesStateEmptyImpl _value, $Res Function(_$NewMessagesStateEmptyImpl) _then) : super(_value, _then);
|
||||
__$$NewMessagesStateEmptyImplCopyWithImpl(_$NewMessagesStateEmptyImpl _value,
|
||||
$Res Function(_$NewMessagesStateEmptyImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of NewMessagesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -227,7 +238,9 @@ class _$NewMessagesStateEmptyImpl implements NewMessagesStateEmpty {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$NewMessagesStateEmptyImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$NewMessagesStateEmptyImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -314,17 +327,22 @@ abstract class NewMessagesStateEmpty implements NewMessagesState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NewMessagesStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$NewMessagesStateLoadedImplCopyWith(_$NewMessagesStateLoadedImpl value, $Res Function(_$NewMessagesStateLoadedImpl) then) =
|
||||
factory _$$NewMessagesStateLoadedImplCopyWith(
|
||||
_$NewMessagesStateLoadedImpl value,
|
||||
$Res Function(_$NewMessagesStateLoadedImpl) then) =
|
||||
__$$NewMessagesStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({int messagesCount});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NewMessagesStateLoadedImplCopyWithImpl<$Res> extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateLoadedImpl>
|
||||
class __$$NewMessagesStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateLoadedImpl>
|
||||
implements _$$NewMessagesStateLoadedImplCopyWith<$Res> {
|
||||
__$$NewMessagesStateLoadedImplCopyWithImpl(_$NewMessagesStateLoadedImpl _value, $Res Function(_$NewMessagesStateLoadedImpl) _then) : super(_value, _then);
|
||||
__$$NewMessagesStateLoadedImplCopyWithImpl(
|
||||
_$NewMessagesStateLoadedImpl _value,
|
||||
$Res Function(_$NewMessagesStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of NewMessagesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -360,7 +378,8 @@ class _$NewMessagesStateLoadedImpl implements NewMessagesStateLoaded {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$NewMessagesStateLoadedImpl &&
|
||||
(identical(other.messagesCount, messagesCount) || other.messagesCount == messagesCount));
|
||||
(identical(other.messagesCount, messagesCount) ||
|
||||
other.messagesCount == messagesCount));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -371,8 +390,9 @@ class _$NewMessagesStateLoadedImpl implements NewMessagesStateLoaded {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl> get copyWith =>
|
||||
__$$NewMessagesStateLoadedImplCopyWithImpl<_$NewMessagesStateLoadedImpl>(this, _$identity);
|
||||
_$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl>
|
||||
get copyWith => __$$NewMessagesStateLoadedImplCopyWithImpl<
|
||||
_$NewMessagesStateLoadedImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -450,29 +470,35 @@ class _$NewMessagesStateLoadedImpl implements NewMessagesStateLoaded {
|
||||
}
|
||||
|
||||
abstract class NewMessagesStateLoaded implements NewMessagesState {
|
||||
const factory NewMessagesStateLoaded({required final int messagesCount}) = _$NewMessagesStateLoadedImpl;
|
||||
const factory NewMessagesStateLoaded({required final int messagesCount}) =
|
||||
_$NewMessagesStateLoadedImpl;
|
||||
|
||||
int get messagesCount;
|
||||
|
||||
/// Create a copy of NewMessagesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NewMessagesStateErrorImplCopyWith<$Res> {
|
||||
factory _$$NewMessagesStateErrorImplCopyWith(_$NewMessagesStateErrorImpl value, $Res Function(_$NewMessagesStateErrorImpl) then) =
|
||||
factory _$$NewMessagesStateErrorImplCopyWith(
|
||||
_$NewMessagesStateErrorImpl value,
|
||||
$Res Function(_$NewMessagesStateErrorImpl) then) =
|
||||
__$$NewMessagesStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NewMessagesStateErrorImplCopyWithImpl<$Res> extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateErrorImpl>
|
||||
class __$$NewMessagesStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateErrorImpl>
|
||||
implements _$$NewMessagesStateErrorImplCopyWith<$Res> {
|
||||
__$$NewMessagesStateErrorImplCopyWithImpl(_$NewMessagesStateErrorImpl _value, $Res Function(_$NewMessagesStateErrorImpl) _then) : super(_value, _then);
|
||||
__$$NewMessagesStateErrorImplCopyWithImpl(_$NewMessagesStateErrorImpl _value,
|
||||
$Res Function(_$NewMessagesStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of NewMessagesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -508,7 +534,8 @@ class _$NewMessagesStateErrorImpl implements NewMessagesStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$NewMessagesStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -519,8 +546,9 @@ class _$NewMessagesStateErrorImpl implements NewMessagesStateError {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl> get copyWith =>
|
||||
__$$NewMessagesStateErrorImplCopyWithImpl<_$NewMessagesStateErrorImpl>(this, _$identity);
|
||||
_$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl>
|
||||
get copyWith => __$$NewMessagesStateErrorImplCopyWithImpl<
|
||||
_$NewMessagesStateErrorImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -598,12 +626,14 @@ class _$NewMessagesStateErrorImpl implements NewMessagesStateError {
|
||||
}
|
||||
|
||||
abstract class NewMessagesStateError implements NewMessagesState {
|
||||
const factory NewMessagesStateError({required final String errorMessage}) = _$NewMessagesStateErrorImpl;
|
||||
const factory NewMessagesStateError({required final String errorMessage}) =
|
||||
_$NewMessagesStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
/// Create a copy of NewMessagesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -20,16 +20,18 @@ mixin _$NotificationsState {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() empty,
|
||||
required TResult Function(List<String> notifications, int notificationsCount) loaded,
|
||||
required TResult Function(
|
||||
List<String> notifications, int notificationsCount)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? empty,
|
||||
TResult? Function(List<String> notifications, int notificationsCount)? loaded,
|
||||
TResult? Function(List<String> notifications, int notificationsCount)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@@ -37,7 +39,8 @@ mixin _$NotificationsState {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? empty,
|
||||
TResult Function(List<String> notifications, int notificationsCount)? loaded,
|
||||
TResult Function(List<String> notifications, int notificationsCount)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
@@ -71,17 +74,18 @@ mixin _$NotificationsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $NotificationsStateCopyWith<$Res> {
|
||||
factory $NotificationsStateCopyWith(NotificationsState value, $Res Function(NotificationsState) then) =
|
||||
factory $NotificationsStateCopyWith(
|
||||
NotificationsState value, $Res Function(NotificationsState) then) =
|
||||
_$NotificationsStateCopyWithImpl<$Res, NotificationsState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$NotificationsStateCopyWithImpl<$Res, $Val extends NotificationsState> implements $NotificationsStateCopyWith<$Res> {
|
||||
class _$NotificationsStateCopyWithImpl<$Res, $Val extends NotificationsState>
|
||||
implements $NotificationsStateCopyWith<$Res> {
|
||||
_$NotificationsStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -91,14 +95,18 @@ class _$NotificationsStateCopyWithImpl<$Res, $Val extends NotificationsState> im
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NotificationsStateImplCopyWith<$Res> {
|
||||
factory _$$NotificationsStateImplCopyWith(_$NotificationsStateImpl value, $Res Function(_$NotificationsStateImpl) then) =
|
||||
factory _$$NotificationsStateImplCopyWith(_$NotificationsStateImpl value,
|
||||
$Res Function(_$NotificationsStateImpl) then) =
|
||||
__$$NotificationsStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NotificationsStateImplCopyWithImpl<$Res> extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateImpl>
|
||||
class __$$NotificationsStateImplCopyWithImpl<$Res>
|
||||
extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateImpl>
|
||||
implements _$$NotificationsStateImplCopyWith<$Res> {
|
||||
__$$NotificationsStateImplCopyWithImpl(_$NotificationsStateImpl _value, $Res Function(_$NotificationsStateImpl) _then) : super(_value, _then);
|
||||
__$$NotificationsStateImplCopyWithImpl(_$NotificationsStateImpl _value,
|
||||
$Res Function(_$NotificationsStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of NotificationsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -116,7 +124,8 @@ class _$NotificationsStateImpl implements _NotificationsState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$NotificationsStateImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$NotificationsStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -127,7 +136,9 @@ class _$NotificationsStateImpl implements _NotificationsState {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() empty,
|
||||
required TResult Function(List<String> notifications, int notificationsCount) loaded,
|
||||
required TResult Function(
|
||||
List<String> notifications, int notificationsCount)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return $default();
|
||||
@@ -138,7 +149,8 @@ class _$NotificationsStateImpl implements _NotificationsState {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? empty,
|
||||
TResult? Function(List<String> notifications, int notificationsCount)? loaded,
|
||||
TResult? Function(List<String> notifications, int notificationsCount)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return $default?.call();
|
||||
@@ -149,7 +161,8 @@ class _$NotificationsStateImpl implements _NotificationsState {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? empty,
|
||||
TResult Function(List<String> notifications, int notificationsCount)? loaded,
|
||||
TResult Function(List<String> notifications, int notificationsCount)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -203,14 +216,21 @@ abstract class _NotificationsState implements NotificationsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NotificationsStateEmptyImplCopyWith<$Res> {
|
||||
factory _$$NotificationsStateEmptyImplCopyWith(_$NotificationsStateEmptyImpl value, $Res Function(_$NotificationsStateEmptyImpl) then) =
|
||||
factory _$$NotificationsStateEmptyImplCopyWith(
|
||||
_$NotificationsStateEmptyImpl value,
|
||||
$Res Function(_$NotificationsStateEmptyImpl) then) =
|
||||
__$$NotificationsStateEmptyImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NotificationsStateEmptyImplCopyWithImpl<$Res> extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateEmptyImpl>
|
||||
class __$$NotificationsStateEmptyImplCopyWithImpl<$Res>
|
||||
extends _$NotificationsStateCopyWithImpl<$Res,
|
||||
_$NotificationsStateEmptyImpl>
|
||||
implements _$$NotificationsStateEmptyImplCopyWith<$Res> {
|
||||
__$$NotificationsStateEmptyImplCopyWithImpl(_$NotificationsStateEmptyImpl _value, $Res Function(_$NotificationsStateEmptyImpl) _then) : super(_value, _then);
|
||||
__$$NotificationsStateEmptyImplCopyWithImpl(
|
||||
_$NotificationsStateEmptyImpl _value,
|
||||
$Res Function(_$NotificationsStateEmptyImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of NotificationsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -228,7 +248,9 @@ class _$NotificationsStateEmptyImpl implements NotificationsStateEmpty {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$NotificationsStateEmptyImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$NotificationsStateEmptyImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -239,7 +261,9 @@ class _$NotificationsStateEmptyImpl implements NotificationsStateEmpty {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() empty,
|
||||
required TResult Function(List<String> notifications, int notificationsCount) loaded,
|
||||
required TResult Function(
|
||||
List<String> notifications, int notificationsCount)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return empty();
|
||||
@@ -250,7 +274,8 @@ class _$NotificationsStateEmptyImpl implements NotificationsStateEmpty {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? empty,
|
||||
TResult? Function(List<String> notifications, int notificationsCount)? loaded,
|
||||
TResult? Function(List<String> notifications, int notificationsCount)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return empty?.call();
|
||||
@@ -261,7 +286,8 @@ class _$NotificationsStateEmptyImpl implements NotificationsStateEmpty {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? empty,
|
||||
TResult Function(List<String> notifications, int notificationsCount)? loaded,
|
||||
TResult Function(List<String> notifications, int notificationsCount)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -315,17 +341,22 @@ abstract class NotificationsStateEmpty implements NotificationsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NotificationsStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$NotificationsStateLoadedImplCopyWith(_$NotificationsStateLoadedImpl value, $Res Function(_$NotificationsStateLoadedImpl) then) =
|
||||
factory _$$NotificationsStateLoadedImplCopyWith(
|
||||
_$NotificationsStateLoadedImpl value,
|
||||
$Res Function(_$NotificationsStateLoadedImpl) then) =
|
||||
__$$NotificationsStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({List<String> notifications, int notificationsCount});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NotificationsStateLoadedImplCopyWithImpl<$Res> extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateLoadedImpl>
|
||||
class __$$NotificationsStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$NotificationsStateCopyWithImpl<$Res,
|
||||
_$NotificationsStateLoadedImpl>
|
||||
implements _$$NotificationsStateLoadedImplCopyWith<$Res> {
|
||||
__$$NotificationsStateLoadedImplCopyWithImpl(_$NotificationsStateLoadedImpl _value, $Res Function(_$NotificationsStateLoadedImpl) _then)
|
||||
__$$NotificationsStateLoadedImplCopyWithImpl(
|
||||
_$NotificationsStateLoadedImpl _value,
|
||||
$Res Function(_$NotificationsStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of NotificationsState
|
||||
@@ -352,10 +383,12 @@ class __$$NotificationsStateLoadedImplCopyWithImpl<$Res> extends _$Notifications
|
||||
/// @nodoc
|
||||
|
||||
class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
|
||||
const _$NotificationsStateLoadedImpl({required final List<String> notifications, required this.notificationsCount}) : _notifications = notifications;
|
||||
const _$NotificationsStateLoadedImpl(
|
||||
{required final List<String> notifications,
|
||||
required this.notificationsCount})
|
||||
: _notifications = notifications;
|
||||
|
||||
final List<String> _notifications;
|
||||
|
||||
@override
|
||||
List<String> get notifications {
|
||||
if (_notifications is EqualUnmodifiableListView) return _notifications;
|
||||
@@ -376,27 +409,33 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$NotificationsStateLoadedImpl &&
|
||||
const DeepCollectionEquality().equals(other._notifications, _notifications) &&
|
||||
(identical(other.notificationsCount, notificationsCount) || other.notificationsCount == notificationsCount));
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._notifications, _notifications) &&
|
||||
(identical(other.notificationsCount, notificationsCount) ||
|
||||
other.notificationsCount == notificationsCount));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_notifications), notificationsCount);
|
||||
int get hashCode => Object.hash(runtimeType,
|
||||
const DeepCollectionEquality().hash(_notifications), notificationsCount);
|
||||
|
||||
/// Create a copy of NotificationsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl> get copyWith =>
|
||||
__$$NotificationsStateLoadedImplCopyWithImpl<_$NotificationsStateLoadedImpl>(this, _$identity);
|
||||
_$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl>
|
||||
get copyWith => __$$NotificationsStateLoadedImplCopyWithImpl<
|
||||
_$NotificationsStateLoadedImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() empty,
|
||||
required TResult Function(List<String> notifications, int notificationsCount) loaded,
|
||||
required TResult Function(
|
||||
List<String> notifications, int notificationsCount)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loaded(notifications, notificationsCount);
|
||||
@@ -407,7 +446,8 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? empty,
|
||||
TResult? Function(List<String> notifications, int notificationsCount)? loaded,
|
||||
TResult? Function(List<String> notifications, int notificationsCount)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loaded?.call(notifications, notificationsCount);
|
||||
@@ -418,7 +458,8 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? empty,
|
||||
TResult Function(List<String> notifications, int notificationsCount)? loaded,
|
||||
TResult Function(List<String> notifications, int notificationsCount)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -467,31 +508,39 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
|
||||
}
|
||||
|
||||
abstract class NotificationsStateLoaded implements NotificationsState {
|
||||
const factory NotificationsStateLoaded({required final List<String> notifications, required final int notificationsCount}) = _$NotificationsStateLoadedImpl;
|
||||
const factory NotificationsStateLoaded(
|
||||
{required final List<String> notifications,
|
||||
required final int notificationsCount}) = _$NotificationsStateLoadedImpl;
|
||||
|
||||
List<String> get notifications;
|
||||
|
||||
int get notificationsCount;
|
||||
|
||||
/// Create a copy of NotificationsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NotificationsStateErrorImplCopyWith<$Res> {
|
||||
factory _$$NotificationsStateErrorImplCopyWith(_$NotificationsStateErrorImpl value, $Res Function(_$NotificationsStateErrorImpl) then) =
|
||||
factory _$$NotificationsStateErrorImplCopyWith(
|
||||
_$NotificationsStateErrorImpl value,
|
||||
$Res Function(_$NotificationsStateErrorImpl) then) =
|
||||
__$$NotificationsStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NotificationsStateErrorImplCopyWithImpl<$Res> extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateErrorImpl>
|
||||
class __$$NotificationsStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$NotificationsStateCopyWithImpl<$Res,
|
||||
_$NotificationsStateErrorImpl>
|
||||
implements _$$NotificationsStateErrorImplCopyWith<$Res> {
|
||||
__$$NotificationsStateErrorImplCopyWithImpl(_$NotificationsStateErrorImpl _value, $Res Function(_$NotificationsStateErrorImpl) _then) : super(_value, _then);
|
||||
__$$NotificationsStateErrorImplCopyWithImpl(
|
||||
_$NotificationsStateErrorImpl _value,
|
||||
$Res Function(_$NotificationsStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of NotificationsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -527,7 +576,8 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$NotificationsStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -538,15 +588,18 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl> get copyWith =>
|
||||
__$$NotificationsStateErrorImplCopyWithImpl<_$NotificationsStateErrorImpl>(this, _$identity);
|
||||
_$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl>
|
||||
get copyWith => __$$NotificationsStateErrorImplCopyWithImpl<
|
||||
_$NotificationsStateErrorImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() empty,
|
||||
required TResult Function(List<String> notifications, int notificationsCount) loaded,
|
||||
required TResult Function(
|
||||
List<String> notifications, int notificationsCount)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return error(errorMessage);
|
||||
@@ -557,7 +610,8 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? empty,
|
||||
TResult? Function(List<String> notifications, int notificationsCount)? loaded,
|
||||
TResult? Function(List<String> notifications, int notificationsCount)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return error?.call(errorMessage);
|
||||
@@ -568,7 +622,8 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? empty,
|
||||
TResult Function(List<String> notifications, int notificationsCount)? loaded,
|
||||
TResult Function(List<String> notifications, int notificationsCount)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -617,12 +672,14 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
|
||||
}
|
||||
|
||||
abstract class NotificationsStateError implements NotificationsState {
|
||||
const factory NotificationsStateError({required final String errorMessage}) = _$NotificationsStateErrorImpl;
|
||||
const factory NotificationsStateError({required final String errorMessage}) =
|
||||
_$NotificationsStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
/// Create a copy of NotificationsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ mixin _$ProfileAvatarState {
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
@@ -71,17 +70,18 @@ mixin _$ProfileAvatarState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ProfileAvatarStateCopyWith<$Res> {
|
||||
factory $ProfileAvatarStateCopyWith(ProfileAvatarState value, $Res Function(ProfileAvatarState) then) =
|
||||
factory $ProfileAvatarStateCopyWith(
|
||||
ProfileAvatarState value, $Res Function(ProfileAvatarState) then) =
|
||||
_$ProfileAvatarStateCopyWithImpl<$Res, ProfileAvatarState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ProfileAvatarStateCopyWithImpl<$Res, $Val extends ProfileAvatarState> implements $ProfileAvatarStateCopyWith<$Res> {
|
||||
class _$ProfileAvatarStateCopyWithImpl<$Res, $Val extends ProfileAvatarState>
|
||||
implements $ProfileAvatarStateCopyWith<$Res> {
|
||||
_$ProfileAvatarStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -91,14 +91,18 @@ class _$ProfileAvatarStateCopyWithImpl<$Res, $Val extends ProfileAvatarState> im
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ProfileAvatarStateImplCopyWith<$Res> {
|
||||
factory _$$ProfileAvatarStateImplCopyWith(_$ProfileAvatarStateImpl value, $Res Function(_$ProfileAvatarStateImpl) then) =
|
||||
factory _$$ProfileAvatarStateImplCopyWith(_$ProfileAvatarStateImpl value,
|
||||
$Res Function(_$ProfileAvatarStateImpl) then) =
|
||||
__$$ProfileAvatarStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ProfileAvatarStateImplCopyWithImpl<$Res> extends _$ProfileAvatarStateCopyWithImpl<$Res, _$ProfileAvatarStateImpl>
|
||||
class __$$ProfileAvatarStateImplCopyWithImpl<$Res>
|
||||
extends _$ProfileAvatarStateCopyWithImpl<$Res, _$ProfileAvatarStateImpl>
|
||||
implements _$$ProfileAvatarStateImplCopyWith<$Res> {
|
||||
__$$ProfileAvatarStateImplCopyWithImpl(_$ProfileAvatarStateImpl _value, $Res Function(_$ProfileAvatarStateImpl) _then) : super(_value, _then);
|
||||
__$$ProfileAvatarStateImplCopyWithImpl(_$ProfileAvatarStateImpl _value,
|
||||
$Res Function(_$ProfileAvatarStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ProfileAvatarState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -116,7 +120,8 @@ class _$ProfileAvatarStateImpl implements _ProfileAvatarState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ProfileAvatarStateImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$ProfileAvatarStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -203,14 +208,20 @@ abstract class _ProfileAvatarState implements ProfileAvatarState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ProfileAvatarStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$ProfileAvatarStateLoadingImplCopyWith(_$ProfileAvatarStateLoadingImpl value, $Res Function(_$ProfileAvatarStateLoadingImpl) then) =
|
||||
factory _$$ProfileAvatarStateLoadingImplCopyWith(
|
||||
_$ProfileAvatarStateLoadingImpl value,
|
||||
$Res Function(_$ProfileAvatarStateLoadingImpl) then) =
|
||||
__$$ProfileAvatarStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ProfileAvatarStateLoadingImplCopyWithImpl<$Res> extends _$ProfileAvatarStateCopyWithImpl<$Res, _$ProfileAvatarStateLoadingImpl>
|
||||
class __$$ProfileAvatarStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$ProfileAvatarStateCopyWithImpl<$Res,
|
||||
_$ProfileAvatarStateLoadingImpl>
|
||||
implements _$$ProfileAvatarStateLoadingImplCopyWith<$Res> {
|
||||
__$$ProfileAvatarStateLoadingImplCopyWithImpl(_$ProfileAvatarStateLoadingImpl _value, $Res Function(_$ProfileAvatarStateLoadingImpl) _then)
|
||||
__$$ProfileAvatarStateLoadingImplCopyWithImpl(
|
||||
_$ProfileAvatarStateLoadingImpl _value,
|
||||
$Res Function(_$ProfileAvatarStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ProfileAvatarState
|
||||
@@ -229,7 +240,9 @@ class _$ProfileAvatarStateLoadingImpl implements ProfileAvatarStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ProfileAvatarStateLoadingImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ProfileAvatarStateLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -316,9 +329,10 @@ abstract class ProfileAvatarStateLoading implements ProfileAvatarState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ProfileAvatarStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$ProfileAvatarStateLoadedImplCopyWith(_$ProfileAvatarStateLoadedImpl value, $Res Function(_$ProfileAvatarStateLoadedImpl) then) =
|
||||
factory _$$ProfileAvatarStateLoadedImplCopyWith(
|
||||
_$ProfileAvatarStateLoadedImpl value,
|
||||
$Res Function(_$ProfileAvatarStateLoadedImpl) then) =
|
||||
__$$ProfileAvatarStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({ProfileModel profile});
|
||||
|
||||
@@ -326,9 +340,13 @@ abstract class _$$ProfileAvatarStateLoadedImplCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ProfileAvatarStateLoadedImplCopyWithImpl<$Res> extends _$ProfileAvatarStateCopyWithImpl<$Res, _$ProfileAvatarStateLoadedImpl>
|
||||
class __$$ProfileAvatarStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$ProfileAvatarStateCopyWithImpl<$Res,
|
||||
_$ProfileAvatarStateLoadedImpl>
|
||||
implements _$$ProfileAvatarStateLoadedImplCopyWith<$Res> {
|
||||
__$$ProfileAvatarStateLoadedImplCopyWithImpl(_$ProfileAvatarStateLoadedImpl _value, $Res Function(_$ProfileAvatarStateLoadedImpl) _then)
|
||||
__$$ProfileAvatarStateLoadedImplCopyWithImpl(
|
||||
_$ProfileAvatarStateLoadedImpl _value,
|
||||
$Res Function(_$ProfileAvatarStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ProfileAvatarState
|
||||
@@ -373,7 +391,9 @@ class _$ProfileAvatarStateLoadedImpl implements ProfileAvatarStateLoaded {
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$ProfileAvatarStateLoadedImpl && (identical(other.profile, profile) || other.profile == profile));
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ProfileAvatarStateLoadedImpl &&
|
||||
(identical(other.profile, profile) || other.profile == profile));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -384,8 +404,9 @@ class _$ProfileAvatarStateLoadedImpl implements ProfileAvatarStateLoaded {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ProfileAvatarStateLoadedImplCopyWith<_$ProfileAvatarStateLoadedImpl> get copyWith =>
|
||||
__$$ProfileAvatarStateLoadedImplCopyWithImpl<_$ProfileAvatarStateLoadedImpl>(this, _$identity);
|
||||
_$$ProfileAvatarStateLoadedImplCopyWith<_$ProfileAvatarStateLoadedImpl>
|
||||
get copyWith => __$$ProfileAvatarStateLoadedImplCopyWithImpl<
|
||||
_$ProfileAvatarStateLoadedImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -463,29 +484,37 @@ class _$ProfileAvatarStateLoadedImpl implements ProfileAvatarStateLoaded {
|
||||
}
|
||||
|
||||
abstract class ProfileAvatarStateLoaded implements ProfileAvatarState {
|
||||
const factory ProfileAvatarStateLoaded({required final ProfileModel profile}) = _$ProfileAvatarStateLoadedImpl;
|
||||
const factory ProfileAvatarStateLoaded(
|
||||
{required final ProfileModel profile}) = _$ProfileAvatarStateLoadedImpl;
|
||||
|
||||
ProfileModel get profile;
|
||||
|
||||
/// Create a copy of ProfileAvatarState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ProfileAvatarStateLoadedImplCopyWith<_$ProfileAvatarStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$ProfileAvatarStateLoadedImplCopyWith<_$ProfileAvatarStateLoadedImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ProfileAvatarStateErrorImplCopyWith<$Res> {
|
||||
factory _$$ProfileAvatarStateErrorImplCopyWith(_$ProfileAvatarStateErrorImpl value, $Res Function(_$ProfileAvatarStateErrorImpl) then) =
|
||||
factory _$$ProfileAvatarStateErrorImplCopyWith(
|
||||
_$ProfileAvatarStateErrorImpl value,
|
||||
$Res Function(_$ProfileAvatarStateErrorImpl) then) =
|
||||
__$$ProfileAvatarStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ProfileAvatarStateErrorImplCopyWithImpl<$Res> extends _$ProfileAvatarStateCopyWithImpl<$Res, _$ProfileAvatarStateErrorImpl>
|
||||
class __$$ProfileAvatarStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$ProfileAvatarStateCopyWithImpl<$Res,
|
||||
_$ProfileAvatarStateErrorImpl>
|
||||
implements _$$ProfileAvatarStateErrorImplCopyWith<$Res> {
|
||||
__$$ProfileAvatarStateErrorImplCopyWithImpl(_$ProfileAvatarStateErrorImpl _value, $Res Function(_$ProfileAvatarStateErrorImpl) _then) : super(_value, _then);
|
||||
__$$ProfileAvatarStateErrorImplCopyWithImpl(
|
||||
_$ProfileAvatarStateErrorImpl _value,
|
||||
$Res Function(_$ProfileAvatarStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ProfileAvatarState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -521,7 +550,8 @@ class _$ProfileAvatarStateErrorImpl implements ProfileAvatarStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ProfileAvatarStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -532,8 +562,9 @@ class _$ProfileAvatarStateErrorImpl implements ProfileAvatarStateError {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ProfileAvatarStateErrorImplCopyWith<_$ProfileAvatarStateErrorImpl> get copyWith =>
|
||||
__$$ProfileAvatarStateErrorImplCopyWithImpl<_$ProfileAvatarStateErrorImpl>(this, _$identity);
|
||||
_$$ProfileAvatarStateErrorImplCopyWith<_$ProfileAvatarStateErrorImpl>
|
||||
get copyWith => __$$ProfileAvatarStateErrorImplCopyWithImpl<
|
||||
_$ProfileAvatarStateErrorImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -611,12 +642,14 @@ class _$ProfileAvatarStateErrorImpl implements ProfileAvatarStateError {
|
||||
}
|
||||
|
||||
abstract class ProfileAvatarStateError implements ProfileAvatarState {
|
||||
const factory ProfileAvatarStateError({required final String errorMessage}) = _$ProfileAvatarStateErrorImpl;
|
||||
const factory ProfileAvatarStateError({required final String errorMessage}) =
|
||||
_$ProfileAvatarStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
/// Create a copy of ProfileAvatarState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ProfileAvatarStateErrorImplCopyWith<_$ProfileAvatarStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$ProfileAvatarStateErrorImplCopyWith<_$ProfileAvatarStateErrorImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -21,9 +21,8 @@ CalendarModel _$CalendarModelFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$CalendarModel {
|
||||
String get date => throw _privateConstructorUsedError;
|
||||
|
||||
bool get is_current_day_included_in_the_chosen_diet_progression => throw _privateConstructorUsedError;
|
||||
|
||||
bool get is_current_day_included_in_the_chosen_diet_progression =>
|
||||
throw _privateConstructorUsedError;
|
||||
Object? get diary => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this CalendarModel to a JSON map.
|
||||
@@ -32,24 +31,29 @@ mixin _$CalendarModel {
|
||||
/// Create a copy of CalendarModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$CalendarModelCopyWith<CalendarModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$CalendarModelCopyWith<CalendarModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $CalendarModelCopyWith<$Res> {
|
||||
factory $CalendarModelCopyWith(CalendarModel value, $Res Function(CalendarModel) then) = _$CalendarModelCopyWithImpl<$Res, CalendarModel>;
|
||||
|
||||
factory $CalendarModelCopyWith(
|
||||
CalendarModel value, $Res Function(CalendarModel) then) =
|
||||
_$CalendarModelCopyWithImpl<$Res, CalendarModel>;
|
||||
@useResult
|
||||
$Res call({String date, bool is_current_day_included_in_the_chosen_diet_progression, Object? diary});
|
||||
$Res call(
|
||||
{String date,
|
||||
bool is_current_day_included_in_the_chosen_diet_progression,
|
||||
Object? diary});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$CalendarModelCopyWithImpl<$Res, $Val extends CalendarModel> implements $CalendarModelCopyWith<$Res> {
|
||||
class _$CalendarModelCopyWithImpl<$Res, $Val extends CalendarModel>
|
||||
implements $CalendarModelCopyWith<$Res> {
|
||||
_$CalendarModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -67,7 +71,8 @@ class _$CalendarModelCopyWithImpl<$Res, $Val extends CalendarModel> implements $
|
||||
? _value.date
|
||||
: date // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
is_current_day_included_in_the_chosen_diet_progression: null == is_current_day_included_in_the_chosen_diet_progression
|
||||
is_current_day_included_in_the_chosen_diet_progression: null ==
|
||||
is_current_day_included_in_the_chosen_diet_progression
|
||||
? _value.is_current_day_included_in_the_chosen_diet_progression
|
||||
: is_current_day_included_in_the_chosen_diet_progression // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
@@ -77,17 +82,26 @@ class _$CalendarModelCopyWithImpl<$Res, $Val extends CalendarModel> implements $
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CalendarModelImplCopyWith<$Res> implements $CalendarModelCopyWith<$Res> {
|
||||
factory _$$CalendarModelImplCopyWith(_$CalendarModelImpl value, $Res Function(_$CalendarModelImpl) then) = __$$CalendarModelImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$CalendarModelImplCopyWith<$Res>
|
||||
implements $CalendarModelCopyWith<$Res> {
|
||||
factory _$$CalendarModelImplCopyWith(
|
||||
_$CalendarModelImpl value, $Res Function(_$CalendarModelImpl) then) =
|
||||
__$$CalendarModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String date, bool is_current_day_included_in_the_chosen_diet_progression, Object? diary});
|
||||
$Res call(
|
||||
{String date,
|
||||
bool is_current_day_included_in_the_chosen_diet_progression,
|
||||
Object? diary});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CalendarModelImplCopyWithImpl<$Res> extends _$CalendarModelCopyWithImpl<$Res, _$CalendarModelImpl> implements _$$CalendarModelImplCopyWith<$Res> {
|
||||
__$$CalendarModelImplCopyWithImpl(_$CalendarModelImpl _value, $Res Function(_$CalendarModelImpl) _then) : super(_value, _then);
|
||||
class __$$CalendarModelImplCopyWithImpl<$Res>
|
||||
extends _$CalendarModelCopyWithImpl<$Res, _$CalendarModelImpl>
|
||||
implements _$$CalendarModelImplCopyWith<$Res> {
|
||||
__$$CalendarModelImplCopyWithImpl(
|
||||
_$CalendarModelImpl _value, $Res Function(_$CalendarModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of CalendarModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -103,7 +117,8 @@ class __$$CalendarModelImplCopyWithImpl<$Res> extends _$CalendarModelCopyWithImp
|
||||
? _value.date
|
||||
: date // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
is_current_day_included_in_the_chosen_diet_progression: null == is_current_day_included_in_the_chosen_diet_progression
|
||||
is_current_day_included_in_the_chosen_diet_progression: null ==
|
||||
is_current_day_included_in_the_chosen_diet_progression
|
||||
? _value.is_current_day_included_in_the_chosen_diet_progression
|
||||
: is_current_day_included_in_the_chosen_diet_progression // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
@@ -115,9 +130,13 @@ class __$$CalendarModelImplCopyWithImpl<$Res> extends _$CalendarModelCopyWithImp
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$CalendarModelImpl implements _CalendarModel {
|
||||
const _$CalendarModelImpl({required this.date, required this.is_current_day_included_in_the_chosen_diet_progression, this.diary});
|
||||
const _$CalendarModelImpl(
|
||||
{required this.date,
|
||||
required this.is_current_day_included_in_the_chosen_diet_progression,
|
||||
this.diary});
|
||||
|
||||
factory _$CalendarModelImpl.fromJson(Map<String, dynamic> json) => _$$CalendarModelImplFromJson(json);
|
||||
factory _$CalendarModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$CalendarModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String date;
|
||||
@@ -137,21 +156,30 @@ class _$CalendarModelImpl implements _CalendarModel {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$CalendarModelImpl &&
|
||||
(identical(other.date, date) || other.date == date) &&
|
||||
(identical(other.is_current_day_included_in_the_chosen_diet_progression, is_current_day_included_in_the_chosen_diet_progression) ||
|
||||
other.is_current_day_included_in_the_chosen_diet_progression == is_current_day_included_in_the_chosen_diet_progression) &&
|
||||
(identical(
|
||||
other
|
||||
.is_current_day_included_in_the_chosen_diet_progression,
|
||||
is_current_day_included_in_the_chosen_diet_progression) ||
|
||||
other.is_current_day_included_in_the_chosen_diet_progression ==
|
||||
is_current_day_included_in_the_chosen_diet_progression) &&
|
||||
const DeepCollectionEquality().equals(other.diary, diary));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, date, is_current_day_included_in_the_chosen_diet_progression, const DeepCollectionEquality().hash(diary));
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
date,
|
||||
is_current_day_included_in_the_chosen_diet_progression,
|
||||
const DeepCollectionEquality().hash(diary));
|
||||
|
||||
/// Create a copy of CalendarModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$CalendarModelImplCopyWith<_$CalendarModelImpl> get copyWith => __$$CalendarModelImplCopyWithImpl<_$CalendarModelImpl>(this, _$identity);
|
||||
_$$CalendarModelImplCopyWith<_$CalendarModelImpl> get copyWith =>
|
||||
__$$CalendarModelImplCopyWithImpl<_$CalendarModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -162,17 +190,19 @@ class _$CalendarModelImpl implements _CalendarModel {
|
||||
}
|
||||
|
||||
abstract class _CalendarModel implements CalendarModel {
|
||||
const factory _CalendarModel({required final String date, required final bool is_current_day_included_in_the_chosen_diet_progression, final Object? diary}) =
|
||||
_$CalendarModelImpl;
|
||||
const factory _CalendarModel(
|
||||
{required final String date,
|
||||
required final bool
|
||||
is_current_day_included_in_the_chosen_diet_progression,
|
||||
final Object? diary}) = _$CalendarModelImpl;
|
||||
|
||||
factory _CalendarModel.fromJson(Map<String, dynamic> json) = _$CalendarModelImpl.fromJson;
|
||||
factory _CalendarModel.fromJson(Map<String, dynamic> json) =
|
||||
_$CalendarModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get date;
|
||||
|
||||
@override
|
||||
bool get is_current_day_included_in_the_chosen_diet_progression;
|
||||
|
||||
@override
|
||||
Object? get diary;
|
||||
|
||||
@@ -180,5 +210,6 @@ abstract class _CalendarModel implements CalendarModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$CalendarModelImplCopyWith<_$CalendarModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$CalendarModelImplCopyWith<_$CalendarModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,14 +6,19 @@ part of 'calendar_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$CalendarModelImpl _$$CalendarModelImplFromJson(Map<String, dynamic> json) => _$CalendarModelImpl(
|
||||
_$CalendarModelImpl _$$CalendarModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$CalendarModelImpl(
|
||||
date: json['date'] as String,
|
||||
is_current_day_included_in_the_chosen_diet_progression: json['is_current_day_included_in_the_chosen_diet_progression'] as bool,
|
||||
is_current_day_included_in_the_chosen_diet_progression:
|
||||
json['is_current_day_included_in_the_chosen_diet_progression']
|
||||
as bool,
|
||||
diary: json['diary'],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$CalendarModelImplToJson(_$CalendarModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$CalendarModelImplToJson(_$CalendarModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'date': instance.date,
|
||||
'is_current_day_included_in_the_chosen_diet_progression': instance.is_current_day_included_in_the_chosen_diet_progression,
|
||||
'is_current_day_included_in_the_chosen_diet_progression':
|
||||
instance.is_current_day_included_in_the_chosen_diet_progression,
|
||||
'diary': instance.diary,
|
||||
};
|
||||
|
||||
@@ -24,7 +24,6 @@ mixin _$CalendarState {
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
@@ -71,16 +70,18 @@ mixin _$CalendarState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $CalendarStateCopyWith<$Res> {
|
||||
factory $CalendarStateCopyWith(CalendarState value, $Res Function(CalendarState) then) = _$CalendarStateCopyWithImpl<$Res, CalendarState>;
|
||||
factory $CalendarStateCopyWith(
|
||||
CalendarState value, $Res Function(CalendarState) then) =
|
||||
_$CalendarStateCopyWithImpl<$Res, CalendarState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$CalendarStateCopyWithImpl<$Res, $Val extends CalendarState> implements $CalendarStateCopyWith<$Res> {
|
||||
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;
|
||||
|
||||
@@ -90,12 +91,18 @@ class _$CalendarStateCopyWithImpl<$Res, $Val extends CalendarState> implements $
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CalendarStateImplCopyWith<$Res> {
|
||||
factory _$$CalendarStateImplCopyWith(_$CalendarStateImpl value, $Res Function(_$CalendarStateImpl) then) = __$$CalendarStateImplCopyWithImpl<$Res>;
|
||||
factory _$$CalendarStateImplCopyWith(
|
||||
_$CalendarStateImpl value, $Res Function(_$CalendarStateImpl) then) =
|
||||
__$$CalendarStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CalendarStateImplCopyWithImpl<$Res> extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateImpl> implements _$$CalendarStateImplCopyWith<$Res> {
|
||||
__$$CalendarStateImplCopyWithImpl(_$CalendarStateImpl _value, $Res Function(_$CalendarStateImpl) _then) : super(_value, _then);
|
||||
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.
|
||||
@@ -113,7 +120,8 @@ class _$CalendarStateImpl implements _CalendarState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$CalendarStateImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$CalendarStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -200,14 +208,18 @@ abstract class _CalendarState implements CalendarState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CalendarStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$CalendarStateLoadingImplCopyWith(_$CalendarStateLoadingImpl value, $Res Function(_$CalendarStateLoadingImpl) then) =
|
||||
factory _$$CalendarStateLoadingImplCopyWith(_$CalendarStateLoadingImpl value,
|
||||
$Res Function(_$CalendarStateLoadingImpl) then) =
|
||||
__$$CalendarStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CalendarStateLoadingImplCopyWithImpl<$Res> extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateLoadingImpl>
|
||||
class __$$CalendarStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateLoadingImpl>
|
||||
implements _$$CalendarStateLoadingImplCopyWith<$Res> {
|
||||
__$$CalendarStateLoadingImplCopyWithImpl(_$CalendarStateLoadingImpl _value, $Res Function(_$CalendarStateLoadingImpl) _then) : super(_value, _then);
|
||||
__$$CalendarStateLoadingImplCopyWithImpl(_$CalendarStateLoadingImpl _value,
|
||||
$Res Function(_$CalendarStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of CalendarState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -225,7 +237,9 @@ class _$CalendarStateLoadingImpl implements CalendarStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$CalendarStateLoadingImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$CalendarStateLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -312,17 +326,20 @@ abstract class CalendarStateLoading implements CalendarState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CalendarStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$CalendarStateLoadedImplCopyWith(_$CalendarStateLoadedImpl value, $Res Function(_$CalendarStateLoadedImpl) then) =
|
||||
factory _$$CalendarStateLoadedImplCopyWith(_$CalendarStateLoadedImpl value,
|
||||
$Res Function(_$CalendarStateLoadedImpl) then) =
|
||||
__$$CalendarStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({List<CalendarModel> calendarList});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CalendarStateLoadedImplCopyWithImpl<$Res> extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateLoadedImpl>
|
||||
class __$$CalendarStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateLoadedImpl>
|
||||
implements _$$CalendarStateLoadedImplCopyWith<$Res> {
|
||||
__$$CalendarStateLoadedImplCopyWithImpl(_$CalendarStateLoadedImpl _value, $Res Function(_$CalendarStateLoadedImpl) _then) : super(_value, _then);
|
||||
__$$CalendarStateLoadedImplCopyWithImpl(_$CalendarStateLoadedImpl _value,
|
||||
$Res Function(_$CalendarStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of CalendarState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -343,10 +360,11 @@ class __$$CalendarStateLoadedImplCopyWithImpl<$Res> extends _$CalendarStateCopyW
|
||||
/// @nodoc
|
||||
|
||||
class _$CalendarStateLoadedImpl implements CalendarStateLoaded {
|
||||
const _$CalendarStateLoadedImpl({required final List<CalendarModel> calendarList}) : _calendarList = calendarList;
|
||||
const _$CalendarStateLoadedImpl(
|
||||
{required final List<CalendarModel> calendarList})
|
||||
: _calendarList = calendarList;
|
||||
|
||||
final List<CalendarModel> _calendarList;
|
||||
|
||||
@override
|
||||
List<CalendarModel> get calendarList {
|
||||
if (_calendarList is EqualUnmodifiableListView) return _calendarList;
|
||||
@@ -362,11 +380,15 @@ class _$CalendarStateLoadedImpl implements CalendarStateLoaded {
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$CalendarStateLoadedImpl && const DeepCollectionEquality().equals(other._calendarList, _calendarList));
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$CalendarStateLoadedImpl &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._calendarList, _calendarList));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_calendarList));
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_calendarList));
|
||||
|
||||
/// Create a copy of CalendarState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -374,7 +396,8 @@ class _$CalendarStateLoadedImpl implements CalendarStateLoaded {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$CalendarStateLoadedImplCopyWith<_$CalendarStateLoadedImpl> get copyWith =>
|
||||
__$$CalendarStateLoadedImplCopyWithImpl<_$CalendarStateLoadedImpl>(this, _$identity);
|
||||
__$$CalendarStateLoadedImplCopyWithImpl<_$CalendarStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -452,29 +475,35 @@ class _$CalendarStateLoadedImpl implements CalendarStateLoaded {
|
||||
}
|
||||
|
||||
abstract class CalendarStateLoaded implements CalendarState {
|
||||
const factory CalendarStateLoaded({required final List<CalendarModel> calendarList}) = _$CalendarStateLoadedImpl;
|
||||
const factory CalendarStateLoaded(
|
||||
{required final List<CalendarModel> calendarList}) =
|
||||
_$CalendarStateLoadedImpl;
|
||||
|
||||
List<CalendarModel> get calendarList;
|
||||
|
||||
/// Create a copy of CalendarState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$CalendarStateLoadedImplCopyWith<_$CalendarStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$CalendarStateLoadedImplCopyWith<_$CalendarStateLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CalendarStateErrorImplCopyWith<$Res> {
|
||||
factory _$$CalendarStateErrorImplCopyWith(_$CalendarStateErrorImpl value, $Res Function(_$CalendarStateErrorImpl) then) =
|
||||
factory _$$CalendarStateErrorImplCopyWith(_$CalendarStateErrorImpl value,
|
||||
$Res Function(_$CalendarStateErrorImpl) then) =
|
||||
__$$CalendarStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CalendarStateErrorImplCopyWithImpl<$Res> extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateErrorImpl>
|
||||
class __$$CalendarStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateErrorImpl>
|
||||
implements _$$CalendarStateErrorImplCopyWith<$Res> {
|
||||
__$$CalendarStateErrorImplCopyWithImpl(_$CalendarStateErrorImpl _value, $Res Function(_$CalendarStateErrorImpl) _then) : super(_value, _then);
|
||||
__$$CalendarStateErrorImplCopyWithImpl(_$CalendarStateErrorImpl _value,
|
||||
$Res Function(_$CalendarStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of CalendarState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -510,7 +539,8 @@ class _$CalendarStateErrorImpl implements CalendarStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$CalendarStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -522,7 +552,8 @@ class _$CalendarStateErrorImpl implements CalendarStateError {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$CalendarStateErrorImplCopyWith<_$CalendarStateErrorImpl> get copyWith =>
|
||||
__$$CalendarStateErrorImplCopyWithImpl<_$CalendarStateErrorImpl>(this, _$identity);
|
||||
__$$CalendarStateErrorImplCopyWithImpl<_$CalendarStateErrorImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -600,12 +631,14 @@ class _$CalendarStateErrorImpl implements CalendarStateError {
|
||||
}
|
||||
|
||||
abstract class CalendarStateError implements CalendarState {
|
||||
const factory CalendarStateError({required final String errorMessage}) = _$CalendarStateErrorImpl;
|
||||
const factory CalendarStateError({required final String errorMessage}) =
|
||||
_$CalendarStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
/// Create a copy of CalendarState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$CalendarStateErrorImplCopyWith<_$CalendarStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$CalendarStateErrorImplCopyWith<_$CalendarStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
import 'package:eatvio_app/features/calendar/presentation/bloc/calendar_cubit.dart';
|
||||
import 'package:eatvio_app/features/calendar/presentation/bloc/calendar_state.dart';
|
||||
|
||||
import 'package:eatvio_app/locator_service.dart';
|
||||
import 'package:eatvio_app/theme/app_decoration.dart';
|
||||
import 'package:eatvio_app/theme/custom_text_style.dart';
|
||||
import 'package:eatvio_app/theme/theme_helper.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
||||
|
||||
class CalendarScreen extends StatelessWidget {
|
||||
CalendarScreen({Key? key}) : super(key: key);
|
||||
|
||||
@@ -46,7 +46,9 @@ class _CalendarService implements CalendarService {
|
||||
final _result = await _dio.fetch<List<dynamic>>(_options);
|
||||
late List<CalendarModel> _value;
|
||||
try {
|
||||
_value = _result.data!.map((dynamic i) => CalendarModel.fromJson(i as Map<String, dynamic>)).toList();
|
||||
_value = _result.data!
|
||||
.map((dynamic i) => CalendarModel.fromJson(i as Map<String, dynamic>))
|
||||
.toList();
|
||||
} on Object catch (e, s) {
|
||||
errorLogger?.logError(e, s, _options);
|
||||
rethrow;
|
||||
@@ -55,7 +57,9 @@ class _CalendarService implements CalendarService {
|
||||
}
|
||||
|
||||
RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
|
||||
if (T != dynamic && !(requestOptions.responseType == ResponseType.bytes || requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T != dynamic &&
|
||||
!(requestOptions.responseType == ResponseType.bytes ||
|
||||
requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T == String) {
|
||||
requestOptions.responseType = ResponseType.plain;
|
||||
} else {
|
||||
|
||||
@@ -21,15 +21,11 @@ ChatMessageModel _$ChatMessageModelFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$ChatMessageModel {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get data => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'media_data')
|
||||
List<dynamic>? get mediaData => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'author_id')
|
||||
int get authorId => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'updated_at')
|
||||
String get updatedAt => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -39,13 +35,15 @@ mixin _$ChatMessageModel {
|
||||
/// Create a copy of ChatMessageModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatMessageModelCopyWith<ChatMessageModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$ChatMessageModelCopyWith<ChatMessageModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatMessageModelCopyWith<$Res> {
|
||||
factory $ChatMessageModelCopyWith(ChatMessageModel value, $Res Function(ChatMessageModel) then) = _$ChatMessageModelCopyWithImpl<$Res, ChatMessageModel>;
|
||||
|
||||
factory $ChatMessageModelCopyWith(
|
||||
ChatMessageModel value, $Res Function(ChatMessageModel) then) =
|
||||
_$ChatMessageModelCopyWithImpl<$Res, ChatMessageModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
@@ -56,12 +54,12 @@ abstract class $ChatMessageModelCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatMessageModelCopyWithImpl<$Res, $Val extends ChatMessageModel> implements $ChatMessageModelCopyWith<$Res> {
|
||||
class _$ChatMessageModelCopyWithImpl<$Res, $Val extends ChatMessageModel>
|
||||
implements $ChatMessageModelCopyWith<$Res> {
|
||||
_$ChatMessageModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -102,10 +100,11 @@ class _$ChatMessageModelCopyWithImpl<$Res, $Val extends ChatMessageModel> implem
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatMessageModelImplCopyWith<$Res> implements $ChatMessageModelCopyWith<$Res> {
|
||||
factory _$$ChatMessageModelImplCopyWith(_$ChatMessageModelImpl value, $Res Function(_$ChatMessageModelImpl) then) =
|
||||
abstract class _$$ChatMessageModelImplCopyWith<$Res>
|
||||
implements $ChatMessageModelCopyWith<$Res> {
|
||||
factory _$$ChatMessageModelImplCopyWith(_$ChatMessageModelImpl value,
|
||||
$Res Function(_$ChatMessageModelImpl) then) =
|
||||
__$$ChatMessageModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -117,9 +116,12 @@ abstract class _$$ChatMessageModelImplCopyWith<$Res> implements $ChatMessageMode
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatMessageModelImplCopyWithImpl<$Res> extends _$ChatMessageModelCopyWithImpl<$Res, _$ChatMessageModelImpl>
|
||||
class __$$ChatMessageModelImplCopyWithImpl<$Res>
|
||||
extends _$ChatMessageModelCopyWithImpl<$Res, _$ChatMessageModelImpl>
|
||||
implements _$$ChatMessageModelImplCopyWith<$Res> {
|
||||
__$$ChatMessageModelImplCopyWithImpl(_$ChatMessageModelImpl _value, $Res Function(_$ChatMessageModelImpl) _then) : super(_value, _then);
|
||||
__$$ChatMessageModelImplCopyWithImpl(_$ChatMessageModelImpl _value,
|
||||
$Res Function(_$ChatMessageModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatMessageModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -168,14 +170,14 @@ class _$ChatMessageModelImpl implements _ChatMessageModel {
|
||||
@JsonKey(name: 'updated_at') required this.updatedAt})
|
||||
: _mediaData = mediaData;
|
||||
|
||||
factory _$ChatMessageModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatMessageModelImplFromJson(json);
|
||||
factory _$ChatMessageModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatMessageModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@override
|
||||
final String data;
|
||||
final List<dynamic>? _mediaData;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'media_data')
|
||||
List<dynamic>? get mediaData {
|
||||
@@ -205,21 +207,27 @@ class _$ChatMessageModelImpl implements _ChatMessageModel {
|
||||
other is _$ChatMessageModelImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.data, data) || other.data == data) &&
|
||||
const DeepCollectionEquality().equals(other._mediaData, _mediaData) &&
|
||||
(identical(other.authorId, authorId) || other.authorId == authorId) &&
|
||||
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._mediaData, _mediaData) &&
|
||||
(identical(other.authorId, authorId) ||
|
||||
other.authorId == authorId) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, data, const DeepCollectionEquality().hash(_mediaData), authorId, updatedAt);
|
||||
int get hashCode => Object.hash(runtimeType, id, data,
|
||||
const DeepCollectionEquality().hash(_mediaData), authorId, updatedAt);
|
||||
|
||||
/// Create a copy of ChatMessageModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith => __$$ChatMessageModelImplCopyWithImpl<_$ChatMessageModelImpl>(this, _$identity);
|
||||
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith =>
|
||||
__$$ChatMessageModelImplCopyWithImpl<_$ChatMessageModelImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -231,28 +239,26 @@ class _$ChatMessageModelImpl implements _ChatMessageModel {
|
||||
|
||||
abstract class _ChatMessageModel implements ChatMessageModel {
|
||||
const factory _ChatMessageModel(
|
||||
{required final int id,
|
||||
required final String data,
|
||||
@JsonKey(name: 'media_data') required final List<dynamic>? mediaData,
|
||||
@JsonKey(name: 'author_id') required final int authorId,
|
||||
@JsonKey(name: 'updated_at') required final String updatedAt}) = _$ChatMessageModelImpl;
|
||||
{required final int id,
|
||||
required final String data,
|
||||
@JsonKey(name: 'media_data') required final List<dynamic>? mediaData,
|
||||
@JsonKey(name: 'author_id') required final int authorId,
|
||||
@JsonKey(name: 'updated_at') required final String updatedAt}) =
|
||||
_$ChatMessageModelImpl;
|
||||
|
||||
factory _ChatMessageModel.fromJson(Map<String, dynamic> json) = _$ChatMessageModelImpl.fromJson;
|
||||
factory _ChatMessageModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatMessageModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
String get data;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'media_data')
|
||||
List<dynamic>? get mediaData;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'author_id')
|
||||
int get authorId;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'updated_at')
|
||||
String get updatedAt;
|
||||
@@ -261,5 +267,6 @@ abstract class _ChatMessageModel implements ChatMessageModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ part of 'chat_message_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatMessageModelImpl _$$ChatMessageModelImplFromJson(Map<String, dynamic> json) => _$ChatMessageModelImpl(
|
||||
_$ChatMessageModelImpl _$$ChatMessageModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ChatMessageModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
data: json['data'] as String,
|
||||
mediaData: json['media_data'] as List<dynamic>?,
|
||||
@@ -14,7 +16,9 @@ _$ChatMessageModelImpl _$$ChatMessageModelImplFromJson(Map<String, dynamic> json
|
||||
updatedAt: json['updated_at'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatMessageModelImplToJson(_$ChatMessageModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$ChatMessageModelImplToJson(
|
||||
_$ChatMessageModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'data': instance.data,
|
||||
'media_data': instance.mediaData,
|
||||
|
||||
@@ -22,7 +22,6 @@ ChatMessagesModel _$ChatMessagesModelFromJson(Map<String, dynamic> json) {
|
||||
mixin _$ChatMessagesModel {
|
||||
@JsonKey(name: 'data')
|
||||
List<ChatMessageModel> get messagesList => throw _privateConstructorUsedError;
|
||||
|
||||
ChatMetaModel get meta => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ChatMessagesModel to a JSON map.
|
||||
@@ -31,26 +30,30 @@ mixin _$ChatMessagesModel {
|
||||
/// Create a copy of ChatMessagesModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatMessagesModelCopyWith<ChatMessagesModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$ChatMessagesModelCopyWith<ChatMessagesModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatMessagesModelCopyWith<$Res> {
|
||||
factory $ChatMessagesModelCopyWith(ChatMessagesModel value, $Res Function(ChatMessagesModel) then) = _$ChatMessagesModelCopyWithImpl<$Res, ChatMessagesModel>;
|
||||
|
||||
factory $ChatMessagesModelCopyWith(
|
||||
ChatMessagesModel value, $Res Function(ChatMessagesModel) then) =
|
||||
_$ChatMessagesModelCopyWithImpl<$Res, ChatMessagesModel>;
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: 'data') List<ChatMessageModel> messagesList, ChatMetaModel meta});
|
||||
$Res call(
|
||||
{@JsonKey(name: 'data') List<ChatMessageModel> messagesList,
|
||||
ChatMetaModel meta});
|
||||
|
||||
$ChatMetaModelCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatMessagesModelCopyWithImpl<$Res, $Val extends ChatMessagesModel> implements $ChatMessagesModelCopyWith<$Res> {
|
||||
class _$ChatMessagesModelCopyWithImpl<$Res, $Val extends ChatMessagesModel>
|
||||
implements $ChatMessagesModelCopyWith<$Res> {
|
||||
_$ChatMessagesModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -86,22 +89,28 @@ class _$ChatMessagesModelCopyWithImpl<$Res, $Val extends ChatMessagesModel> impl
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatMessagesModelImplCopyWith<$Res> implements $ChatMessagesModelCopyWith<$Res> {
|
||||
factory _$$ChatMessagesModelImplCopyWith(_$ChatMessagesModelImpl value, $Res Function(_$ChatMessagesModelImpl) then) =
|
||||
abstract class _$$ChatMessagesModelImplCopyWith<$Res>
|
||||
implements $ChatMessagesModelCopyWith<$Res> {
|
||||
factory _$$ChatMessagesModelImplCopyWith(_$ChatMessagesModelImpl value,
|
||||
$Res Function(_$ChatMessagesModelImpl) then) =
|
||||
__$$ChatMessagesModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: 'data') List<ChatMessageModel> messagesList, ChatMetaModel meta});
|
||||
$Res call(
|
||||
{@JsonKey(name: 'data') List<ChatMessageModel> messagesList,
|
||||
ChatMetaModel meta});
|
||||
|
||||
@override
|
||||
$ChatMetaModelCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatMessagesModelImplCopyWithImpl<$Res> extends _$ChatMessagesModelCopyWithImpl<$Res, _$ChatMessagesModelImpl>
|
||||
class __$$ChatMessagesModelImplCopyWithImpl<$Res>
|
||||
extends _$ChatMessagesModelCopyWithImpl<$Res, _$ChatMessagesModelImpl>
|
||||
implements _$$ChatMessagesModelImplCopyWith<$Res> {
|
||||
__$$ChatMessagesModelImplCopyWithImpl(_$ChatMessagesModelImpl _value, $Res Function(_$ChatMessagesModelImpl) _then) : super(_value, _then);
|
||||
__$$ChatMessagesModelImplCopyWithImpl(_$ChatMessagesModelImpl _value,
|
||||
$Res Function(_$ChatMessagesModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatMessagesModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -127,12 +136,16 @@ class __$$ChatMessagesModelImplCopyWithImpl<$Res> extends _$ChatMessagesModelCop
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$ChatMessagesModelImpl implements _ChatMessagesModel {
|
||||
const _$ChatMessagesModelImpl({@JsonKey(name: 'data') required final List<ChatMessageModel> messagesList, required this.meta}) : _messagesList = messagesList;
|
||||
const _$ChatMessagesModelImpl(
|
||||
{@JsonKey(name: 'data')
|
||||
required final List<ChatMessageModel> messagesList,
|
||||
required this.meta})
|
||||
: _messagesList = messagesList;
|
||||
|
||||
factory _$ChatMessagesModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatMessagesModelImplFromJson(json);
|
||||
factory _$ChatMessagesModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatMessagesModelImplFromJson(json);
|
||||
|
||||
final List<ChatMessageModel> _messagesList;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'data')
|
||||
List<ChatMessageModel> get messagesList {
|
||||
@@ -154,20 +167,24 @@ class _$ChatMessagesModelImpl implements _ChatMessagesModel {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatMessagesModelImpl &&
|
||||
const DeepCollectionEquality().equals(other._messagesList, _messagesList) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._messagesList, _messagesList) &&
|
||||
(identical(other.meta, meta) || other.meta == meta));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_messagesList), meta);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_messagesList), meta);
|
||||
|
||||
/// Create a copy of ChatMessagesModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith => __$$ChatMessagesModelImplCopyWithImpl<_$ChatMessagesModelImpl>(this, _$identity);
|
||||
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith =>
|
||||
__$$ChatMessagesModelImplCopyWithImpl<_$ChatMessagesModelImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -178,15 +195,17 @@ class _$ChatMessagesModelImpl implements _ChatMessagesModel {
|
||||
}
|
||||
|
||||
abstract class _ChatMessagesModel implements ChatMessagesModel {
|
||||
const factory _ChatMessagesModel({@JsonKey(name: 'data') required final List<ChatMessageModel> messagesList, required final ChatMetaModel meta}) =
|
||||
_$ChatMessagesModelImpl;
|
||||
const factory _ChatMessagesModel(
|
||||
{@JsonKey(name: 'data')
|
||||
required final List<ChatMessageModel> messagesList,
|
||||
required final ChatMetaModel meta}) = _$ChatMessagesModelImpl;
|
||||
|
||||
factory _ChatMessagesModel.fromJson(Map<String, dynamic> json) = _$ChatMessagesModelImpl.fromJson;
|
||||
factory _ChatMessagesModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatMessagesModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'data')
|
||||
List<ChatMessageModel> get messagesList;
|
||||
|
||||
@override
|
||||
ChatMetaModel get meta;
|
||||
|
||||
@@ -194,5 +213,6 @@ abstract class _ChatMessagesModel implements ChatMessagesModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,12 +6,18 @@ part of 'chat_messages_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatMessagesModelImpl _$$ChatMessagesModelImplFromJson(Map<String, dynamic> json) => _$ChatMessagesModelImpl(
|
||||
messagesList: (json['data'] as List<dynamic>).map((e) => ChatMessageModel.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
_$ChatMessagesModelImpl _$$ChatMessagesModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ChatMessagesModelImpl(
|
||||
messagesList: (json['data'] as List<dynamic>)
|
||||
.map((e) => ChatMessageModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
meta: ChatMetaModel.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatMessagesModelImplToJson(_$ChatMessagesModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$ChatMessagesModelImplToJson(
|
||||
_$ChatMessagesModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.messagesList,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
@@ -29,24 +29,26 @@ mixin _$ChatMetaModel {
|
||||
/// Create a copy of ChatMetaModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatMetaModelCopyWith<ChatMetaModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$ChatMetaModelCopyWith<ChatMetaModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatMetaModelCopyWith<$Res> {
|
||||
factory $ChatMetaModelCopyWith(ChatMetaModel value, $Res Function(ChatMetaModel) then) = _$ChatMetaModelCopyWithImpl<$Res, ChatMetaModel>;
|
||||
|
||||
factory $ChatMetaModelCopyWith(
|
||||
ChatMetaModel value, $Res Function(ChatMetaModel) then) =
|
||||
_$ChatMetaModelCopyWithImpl<$Res, ChatMetaModel>;
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "last_page") int lastPage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatMetaModelCopyWithImpl<$Res, $Val extends ChatMetaModel> implements $ChatMetaModelCopyWith<$Res> {
|
||||
class _$ChatMetaModelCopyWithImpl<$Res, $Val extends ChatMetaModel>
|
||||
implements $ChatMetaModelCopyWith<$Res> {
|
||||
_$ChatMetaModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -67,17 +69,23 @@ class _$ChatMetaModelCopyWithImpl<$Res, $Val extends ChatMetaModel> implements $
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatMetaModelImplCopyWith<$Res> implements $ChatMetaModelCopyWith<$Res> {
|
||||
factory _$$ChatMetaModelImplCopyWith(_$ChatMetaModelImpl value, $Res Function(_$ChatMetaModelImpl) then) = __$$ChatMetaModelImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$ChatMetaModelImplCopyWith<$Res>
|
||||
implements $ChatMetaModelCopyWith<$Res> {
|
||||
factory _$$ChatMetaModelImplCopyWith(
|
||||
_$ChatMetaModelImpl value, $Res Function(_$ChatMetaModelImpl) then) =
|
||||
__$$ChatMetaModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "last_page") int lastPage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatMetaModelImplCopyWithImpl<$Res> extends _$ChatMetaModelCopyWithImpl<$Res, _$ChatMetaModelImpl> implements _$$ChatMetaModelImplCopyWith<$Res> {
|
||||
__$$ChatMetaModelImplCopyWithImpl(_$ChatMetaModelImpl _value, $Res Function(_$ChatMetaModelImpl) _then) : super(_value, _then);
|
||||
class __$$ChatMetaModelImplCopyWithImpl<$Res>
|
||||
extends _$ChatMetaModelCopyWithImpl<$Res, _$ChatMetaModelImpl>
|
||||
implements _$$ChatMetaModelImplCopyWith<$Res> {
|
||||
__$$ChatMetaModelImplCopyWithImpl(
|
||||
_$ChatMetaModelImpl _value, $Res Function(_$ChatMetaModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatMetaModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -98,9 +106,11 @@ class __$$ChatMetaModelImplCopyWithImpl<$Res> extends _$ChatMetaModelCopyWithImp
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$ChatMetaModelImpl implements _ChatMetaModel {
|
||||
const _$ChatMetaModelImpl({@JsonKey(name: "last_page") required this.lastPage});
|
||||
const _$ChatMetaModelImpl(
|
||||
{@JsonKey(name: "last_page") required this.lastPage});
|
||||
|
||||
factory _$ChatMetaModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatMetaModelImplFromJson(json);
|
||||
factory _$ChatMetaModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatMetaModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "last_page")
|
||||
@@ -114,7 +124,10 @@ class _$ChatMetaModelImpl implements _ChatMetaModel {
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$ChatMetaModelImpl && (identical(other.lastPage, lastPage) || other.lastPage == lastPage));
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatMetaModelImpl &&
|
||||
(identical(other.lastPage, lastPage) ||
|
||||
other.lastPage == lastPage));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -126,7 +139,8 @@ class _$ChatMetaModelImpl implements _ChatMetaModel {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith => __$$ChatMetaModelImplCopyWithImpl<_$ChatMetaModelImpl>(this, _$identity);
|
||||
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith =>
|
||||
__$$ChatMetaModelImplCopyWithImpl<_$ChatMetaModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -137,9 +151,12 @@ class _$ChatMetaModelImpl implements _ChatMetaModel {
|
||||
}
|
||||
|
||||
abstract class _ChatMetaModel implements ChatMetaModel {
|
||||
const factory _ChatMetaModel({@JsonKey(name: "last_page") required final int lastPage}) = _$ChatMetaModelImpl;
|
||||
const factory _ChatMetaModel(
|
||||
{@JsonKey(name: "last_page") required final int lastPage}) =
|
||||
_$ChatMetaModelImpl;
|
||||
|
||||
factory _ChatMetaModel.fromJson(Map<String, dynamic> json) = _$ChatMetaModelImpl.fromJson;
|
||||
factory _ChatMetaModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatMetaModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "last_page")
|
||||
@@ -149,5 +166,6 @@ abstract class _ChatMetaModel implements ChatMetaModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,10 +6,12 @@ part of 'chat_meta_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatMetaModelImpl _$$ChatMetaModelImplFromJson(Map<String, dynamic> json) => _$ChatMetaModelImpl(
|
||||
_$ChatMetaModelImpl _$$ChatMetaModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ChatMetaModelImpl(
|
||||
lastPage: (json['last_page'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatMetaModelImplToJson(_$ChatMetaModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$ChatMetaModelImplToJson(_$ChatMetaModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'last_page': instance.lastPage,
|
||||
};
|
||||
|
||||
@@ -21,10 +21,9 @@ ChatRoomModel _$ChatRoomModelFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$ChatRoomModel {
|
||||
String get id => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'chat_room_setting')
|
||||
ChatRoomSettingsModel get chatRoomSettings => throw _privateConstructorUsedError;
|
||||
|
||||
ChatRoomSettingsModel get chatRoomSettings =>
|
||||
throw _privateConstructorUsedError;
|
||||
Map<String, ChatUserModel> get users => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ChatRoomModel to a JSON map.
|
||||
@@ -33,26 +32,32 @@ mixin _$ChatRoomModel {
|
||||
/// Create a copy of ChatRoomModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatRoomModelCopyWith<ChatRoomModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$ChatRoomModelCopyWith<ChatRoomModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatRoomModelCopyWith<$Res> {
|
||||
factory $ChatRoomModelCopyWith(ChatRoomModel value, $Res Function(ChatRoomModel) then) = _$ChatRoomModelCopyWithImpl<$Res, ChatRoomModel>;
|
||||
|
||||
factory $ChatRoomModelCopyWith(
|
||||
ChatRoomModel value, $Res Function(ChatRoomModel) then) =
|
||||
_$ChatRoomModelCopyWithImpl<$Res, ChatRoomModel>;
|
||||
@useResult
|
||||
$Res call({String id, @JsonKey(name: 'chat_room_setting') ChatRoomSettingsModel chatRoomSettings, Map<String, ChatUserModel> users});
|
||||
$Res call(
|
||||
{String id,
|
||||
@JsonKey(name: 'chat_room_setting')
|
||||
ChatRoomSettingsModel chatRoomSettings,
|
||||
Map<String, ChatUserModel> users});
|
||||
|
||||
$ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel> implements $ChatRoomModelCopyWith<$Res> {
|
||||
class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel>
|
||||
implements $ChatRoomModelCopyWith<$Res> {
|
||||
_$ChatRoomModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -86,27 +91,38 @@ class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel> implements $
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings {
|
||||
return $ChatRoomSettingsModelCopyWith<$Res>(_value.chatRoomSettings, (value) {
|
||||
return $ChatRoomSettingsModelCopyWith<$Res>(_value.chatRoomSettings,
|
||||
(value) {
|
||||
return _then(_value.copyWith(chatRoomSettings: value) as $Val);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomModelImplCopyWith<$Res> implements $ChatRoomModelCopyWith<$Res> {
|
||||
factory _$$ChatRoomModelImplCopyWith(_$ChatRoomModelImpl value, $Res Function(_$ChatRoomModelImpl) then) = __$$ChatRoomModelImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$ChatRoomModelImplCopyWith<$Res>
|
||||
implements $ChatRoomModelCopyWith<$Res> {
|
||||
factory _$$ChatRoomModelImplCopyWith(
|
||||
_$ChatRoomModelImpl value, $Res Function(_$ChatRoomModelImpl) then) =
|
||||
__$$ChatRoomModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String id, @JsonKey(name: 'chat_room_setting') ChatRoomSettingsModel chatRoomSettings, Map<String, ChatUserModel> users});
|
||||
$Res call(
|
||||
{String id,
|
||||
@JsonKey(name: 'chat_room_setting')
|
||||
ChatRoomSettingsModel chatRoomSettings,
|
||||
Map<String, ChatUserModel> users});
|
||||
|
||||
@override
|
||||
$ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomModelImplCopyWithImpl<$Res> extends _$ChatRoomModelCopyWithImpl<$Res, _$ChatRoomModelImpl> implements _$$ChatRoomModelImplCopyWith<$Res> {
|
||||
__$$ChatRoomModelImplCopyWithImpl(_$ChatRoomModelImpl _value, $Res Function(_$ChatRoomModelImpl) _then) : super(_value, _then);
|
||||
class __$$ChatRoomModelImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomModelCopyWithImpl<$Res, _$ChatRoomModelImpl>
|
||||
implements _$$ChatRoomModelImplCopyWith<$Res> {
|
||||
__$$ChatRoomModelImplCopyWithImpl(
|
||||
_$ChatRoomModelImpl _value, $Res Function(_$ChatRoomModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatRoomModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -138,10 +154,13 @@ class __$$ChatRoomModelImplCopyWithImpl<$Res> extends _$ChatRoomModelCopyWithImp
|
||||
@JsonSerializable()
|
||||
class _$ChatRoomModelImpl implements _ChatRoomModel {
|
||||
const _$ChatRoomModelImpl(
|
||||
{required this.id, @JsonKey(name: 'chat_room_setting') required this.chatRoomSettings, required final Map<String, ChatUserModel> users})
|
||||
{required this.id,
|
||||
@JsonKey(name: 'chat_room_setting') required this.chatRoomSettings,
|
||||
required final Map<String, ChatUserModel> users})
|
||||
: _users = users;
|
||||
|
||||
factory _$ChatRoomModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatRoomModelImplFromJson(json);
|
||||
factory _$ChatRoomModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatRoomModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String id;
|
||||
@@ -149,7 +168,6 @@ class _$ChatRoomModelImpl implements _ChatRoomModel {
|
||||
@JsonKey(name: 'chat_room_setting')
|
||||
final ChatRoomSettingsModel chatRoomSettings;
|
||||
final Map<String, ChatUserModel> _users;
|
||||
|
||||
@override
|
||||
Map<String, ChatUserModel> get users {
|
||||
if (_users is EqualUnmodifiableMapView) return _users;
|
||||
@@ -168,20 +186,23 @@ class _$ChatRoomModelImpl implements _ChatRoomModel {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatRoomModelImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.chatRoomSettings, chatRoomSettings) || other.chatRoomSettings == chatRoomSettings) &&
|
||||
(identical(other.chatRoomSettings, chatRoomSettings) ||
|
||||
other.chatRoomSettings == chatRoomSettings) &&
|
||||
const DeepCollectionEquality().equals(other._users, _users));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, chatRoomSettings, const DeepCollectionEquality().hash(_users));
|
||||
int get hashCode => Object.hash(runtimeType, id, chatRoomSettings,
|
||||
const DeepCollectionEquality().hash(_users));
|
||||
|
||||
/// Create a copy of ChatRoomModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith => __$$ChatRoomModelImplCopyWithImpl<_$ChatRoomModelImpl>(this, _$identity);
|
||||
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith =>
|
||||
__$$ChatRoomModelImplCopyWithImpl<_$ChatRoomModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -194,18 +215,18 @@ class _$ChatRoomModelImpl implements _ChatRoomModel {
|
||||
abstract class _ChatRoomModel implements ChatRoomModel {
|
||||
const factory _ChatRoomModel(
|
||||
{required final String id,
|
||||
@JsonKey(name: 'chat_room_setting') required final ChatRoomSettingsModel chatRoomSettings,
|
||||
@JsonKey(name: 'chat_room_setting')
|
||||
required final ChatRoomSettingsModel chatRoomSettings,
|
||||
required final Map<String, ChatUserModel> users}) = _$ChatRoomModelImpl;
|
||||
|
||||
factory _ChatRoomModel.fromJson(Map<String, dynamic> json) = _$ChatRoomModelImpl.fromJson;
|
||||
factory _ChatRoomModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatRoomModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get id;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'chat_room_setting')
|
||||
ChatRoomSettingsModel get chatRoomSettings;
|
||||
|
||||
@override
|
||||
Map<String, ChatUserModel> get users;
|
||||
|
||||
@@ -213,5 +234,6 @@ abstract class _ChatRoomModel implements ChatRoomModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,15 +6,19 @@ part of 'chat_room_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatRoomModelImpl _$$ChatRoomModelImplFromJson(Map<String, dynamic> json) => _$ChatRoomModelImpl(
|
||||
_$ChatRoomModelImpl _$$ChatRoomModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ChatRoomModelImpl(
|
||||
id: json['id'] as String,
|
||||
chatRoomSettings: ChatRoomSettingsModel.fromJson(json['chat_room_setting'] as Map<String, dynamic>),
|
||||
chatRoomSettings: ChatRoomSettingsModel.fromJson(
|
||||
json['chat_room_setting'] as Map<String, dynamic>),
|
||||
users: (json['users'] as Map<String, dynamic>).map(
|
||||
(k, e) => MapEntry(k, ChatUserModel.fromJson(e as Map<String, dynamic>)),
|
||||
(k, e) =>
|
||||
MapEntry(k, ChatUserModel.fromJson(e as Map<String, dynamic>)),
|
||||
),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatRoomModelImplToJson(_$ChatRoomModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$ChatRoomModelImplToJson(_$ChatRoomModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'chat_room_setting': instance.chatRoomSettings,
|
||||
'users': instance.users,
|
||||
|
||||
@@ -29,25 +29,27 @@ mixin _$ChatRoomPreviewModel {
|
||||
/// Create a copy of ChatRoomPreviewModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatRoomPreviewModelCopyWith<ChatRoomPreviewModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$ChatRoomPreviewModelCopyWith<ChatRoomPreviewModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatRoomPreviewModelCopyWith<$Res> {
|
||||
factory $ChatRoomPreviewModelCopyWith(ChatRoomPreviewModel value, $Res Function(ChatRoomPreviewModel) then) =
|
||||
factory $ChatRoomPreviewModelCopyWith(ChatRoomPreviewModel value,
|
||||
$Res Function(ChatRoomPreviewModel) then) =
|
||||
_$ChatRoomPreviewModelCopyWithImpl<$Res, ChatRoomPreviewModel>;
|
||||
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "chatRooms") List<ChatRoom> chatRooms});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatRoomPreviewModelCopyWithImpl<$Res, $Val extends ChatRoomPreviewModel> implements $ChatRoomPreviewModelCopyWith<$Res> {
|
||||
class _$ChatRoomPreviewModelCopyWithImpl<$Res,
|
||||
$Val extends ChatRoomPreviewModel>
|
||||
implements $ChatRoomPreviewModelCopyWith<$Res> {
|
||||
_$ChatRoomPreviewModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -68,19 +70,23 @@ class _$ChatRoomPreviewModelCopyWithImpl<$Res, $Val extends ChatRoomPreviewModel
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomPreviewModelImplCopyWith<$Res> implements $ChatRoomPreviewModelCopyWith<$Res> {
|
||||
factory _$$ChatRoomPreviewModelImplCopyWith(_$ChatRoomPreviewModelImpl value, $Res Function(_$ChatRoomPreviewModelImpl) then) =
|
||||
abstract class _$$ChatRoomPreviewModelImplCopyWith<$Res>
|
||||
implements $ChatRoomPreviewModelCopyWith<$Res> {
|
||||
factory _$$ChatRoomPreviewModelImplCopyWith(_$ChatRoomPreviewModelImpl value,
|
||||
$Res Function(_$ChatRoomPreviewModelImpl) then) =
|
||||
__$$ChatRoomPreviewModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "chatRooms") List<ChatRoom> chatRooms});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomPreviewModelImplCopyWithImpl<$Res> extends _$ChatRoomPreviewModelCopyWithImpl<$Res, _$ChatRoomPreviewModelImpl>
|
||||
class __$$ChatRoomPreviewModelImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomPreviewModelCopyWithImpl<$Res, _$ChatRoomPreviewModelImpl>
|
||||
implements _$$ChatRoomPreviewModelImplCopyWith<$Res> {
|
||||
__$$ChatRoomPreviewModelImplCopyWithImpl(_$ChatRoomPreviewModelImpl _value, $Res Function(_$ChatRoomPreviewModelImpl) _then) : super(_value, _then);
|
||||
__$$ChatRoomPreviewModelImplCopyWithImpl(_$ChatRoomPreviewModelImpl _value,
|
||||
$Res Function(_$ChatRoomPreviewModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatRoomPreviewModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -101,12 +107,14 @@ class __$$ChatRoomPreviewModelImplCopyWithImpl<$Res> extends _$ChatRoomPreviewMo
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$ChatRoomPreviewModelImpl implements _ChatRoomPreviewModel {
|
||||
const _$ChatRoomPreviewModelImpl({@JsonKey(name: "chatRooms") required final List<ChatRoom> chatRooms}) : _chatRooms = chatRooms;
|
||||
const _$ChatRoomPreviewModelImpl(
|
||||
{@JsonKey(name: "chatRooms") required final List<ChatRoom> chatRooms})
|
||||
: _chatRooms = chatRooms;
|
||||
|
||||
factory _$ChatRoomPreviewModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatRoomPreviewModelImplFromJson(json);
|
||||
factory _$ChatRoomPreviewModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatRoomPreviewModelImplFromJson(json);
|
||||
|
||||
final List<ChatRoom> _chatRooms;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "chatRooms")
|
||||
List<ChatRoom> get chatRooms {
|
||||
@@ -123,20 +131,26 @@ class _$ChatRoomPreviewModelImpl implements _ChatRoomPreviewModel {
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$ChatRoomPreviewModelImpl && const DeepCollectionEquality().equals(other._chatRooms, _chatRooms));
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatRoomPreviewModelImpl &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._chatRooms, _chatRooms));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_chatRooms));
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, const DeepCollectionEquality().hash(_chatRooms));
|
||||
|
||||
/// Create a copy of ChatRoomPreviewModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatRoomPreviewModelImplCopyWith<_$ChatRoomPreviewModelImpl> get copyWith =>
|
||||
__$$ChatRoomPreviewModelImplCopyWithImpl<_$ChatRoomPreviewModelImpl>(this, _$identity);
|
||||
_$$ChatRoomPreviewModelImplCopyWith<_$ChatRoomPreviewModelImpl>
|
||||
get copyWith =>
|
||||
__$$ChatRoomPreviewModelImplCopyWithImpl<_$ChatRoomPreviewModelImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -147,9 +161,12 @@ class _$ChatRoomPreviewModelImpl implements _ChatRoomPreviewModel {
|
||||
}
|
||||
|
||||
abstract class _ChatRoomPreviewModel implements ChatRoomPreviewModel {
|
||||
const factory _ChatRoomPreviewModel({@JsonKey(name: "chatRooms") required final List<ChatRoom> chatRooms}) = _$ChatRoomPreviewModelImpl;
|
||||
const factory _ChatRoomPreviewModel(
|
||||
{@JsonKey(name: "chatRooms")
|
||||
required final List<ChatRoom> chatRooms}) = _$ChatRoomPreviewModelImpl;
|
||||
|
||||
factory _ChatRoomPreviewModel.fromJson(Map<String, dynamic> json) = _$ChatRoomPreviewModelImpl.fromJson;
|
||||
factory _ChatRoomPreviewModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatRoomPreviewModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "chatRooms")
|
||||
@@ -159,7 +176,8 @@ abstract class _ChatRoomPreviewModel implements ChatRoomPreviewModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ChatRoomPreviewModelImplCopyWith<_$ChatRoomPreviewModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$ChatRoomPreviewModelImplCopyWith<_$ChatRoomPreviewModelImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
ChatRoom _$ChatRoomFromJson(Map<String, dynamic> json) {
|
||||
@@ -170,13 +188,10 @@ ChatRoom _$ChatRoomFromJson(Map<String, dynamic> json) {
|
||||
mixin _$ChatRoom {
|
||||
@JsonKey(name: "id")
|
||||
String get id => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "room_name")
|
||||
String get roomName => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "last_message")
|
||||
dynamic get lastMessage => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "users")
|
||||
Users get users => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -186,13 +201,14 @@ mixin _$ChatRoom {
|
||||
/// Create a copy of ChatRoom
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatRoomCopyWith<ChatRoom> get copyWith => throw _privateConstructorUsedError;
|
||||
$ChatRoomCopyWith<ChatRoom> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatRoomCopyWith<$Res> {
|
||||
factory $ChatRoomCopyWith(ChatRoom value, $Res Function(ChatRoom) then) = _$ChatRoomCopyWithImpl<$Res, ChatRoom>;
|
||||
|
||||
factory $ChatRoomCopyWith(ChatRoom value, $Res Function(ChatRoom) then) =
|
||||
_$ChatRoomCopyWithImpl<$Res, ChatRoom>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "id") String id,
|
||||
@@ -204,12 +220,12 @@ abstract class $ChatRoomCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatRoomCopyWithImpl<$Res, $Val extends ChatRoom> implements $ChatRoomCopyWith<$Res> {
|
||||
class _$ChatRoomCopyWithImpl<$Res, $Val extends ChatRoom>
|
||||
implements $ChatRoomCopyWith<$Res> {
|
||||
_$ChatRoomCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -255,9 +271,11 @@ class _$ChatRoomCopyWithImpl<$Res, $Val extends ChatRoom> implements $ChatRoomCo
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomImplCopyWith<$Res> implements $ChatRoomCopyWith<$Res> {
|
||||
factory _$$ChatRoomImplCopyWith(_$ChatRoomImpl value, $Res Function(_$ChatRoomImpl) then) = __$$ChatRoomImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$ChatRoomImplCopyWith<$Res>
|
||||
implements $ChatRoomCopyWith<$Res> {
|
||||
factory _$$ChatRoomImplCopyWith(
|
||||
_$ChatRoomImpl value, $Res Function(_$ChatRoomImpl) then) =
|
||||
__$$ChatRoomImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -271,8 +289,12 @@ abstract class _$$ChatRoomImplCopyWith<$Res> implements $ChatRoomCopyWith<$Res>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomImplCopyWithImpl<$Res> extends _$ChatRoomCopyWithImpl<$Res, _$ChatRoomImpl> implements _$$ChatRoomImplCopyWith<$Res> {
|
||||
__$$ChatRoomImplCopyWithImpl(_$ChatRoomImpl _value, $Res Function(_$ChatRoomImpl) _then) : super(_value, _then);
|
||||
class __$$ChatRoomImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomCopyWithImpl<$Res, _$ChatRoomImpl>
|
||||
implements _$$ChatRoomImplCopyWith<$Res> {
|
||||
__$$ChatRoomImplCopyWithImpl(
|
||||
_$ChatRoomImpl _value, $Res Function(_$ChatRoomImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatRoom
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -314,7 +336,8 @@ class _$ChatRoomImpl implements _ChatRoom {
|
||||
@JsonKey(name: "last_message") required this.lastMessage,
|
||||
@JsonKey(name: "users") required this.users});
|
||||
|
||||
factory _$ChatRoomImpl.fromJson(Map<String, dynamic> json) => _$$ChatRoomImplFromJson(json);
|
||||
factory _$ChatRoomImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatRoomImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
@@ -340,21 +363,25 @@ class _$ChatRoomImpl implements _ChatRoom {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatRoomImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.roomName, roomName) || other.roomName == roomName) &&
|
||||
const DeepCollectionEquality().equals(other.lastMessage, lastMessage) &&
|
||||
(identical(other.roomName, roomName) ||
|
||||
other.roomName == roomName) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other.lastMessage, lastMessage) &&
|
||||
(identical(other.users, users) || other.users == users));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, roomName, const DeepCollectionEquality().hash(lastMessage), users);
|
||||
int get hashCode => Object.hash(runtimeType, id, roomName,
|
||||
const DeepCollectionEquality().hash(lastMessage), users);
|
||||
|
||||
/// Create a copy of ChatRoom
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatRoomImplCopyWith<_$ChatRoomImpl> get copyWith => __$$ChatRoomImplCopyWithImpl<_$ChatRoomImpl>(this, _$identity);
|
||||
_$$ChatRoomImplCopyWith<_$ChatRoomImpl> get copyWith =>
|
||||
__$$ChatRoomImplCopyWithImpl<_$ChatRoomImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -371,20 +398,18 @@ abstract class _ChatRoom implements ChatRoom {
|
||||
@JsonKey(name: "last_message") required final dynamic lastMessage,
|
||||
@JsonKey(name: "users") required final Users users}) = _$ChatRoomImpl;
|
||||
|
||||
factory _ChatRoom.fromJson(Map<String, dynamic> json) = _$ChatRoomImpl.fromJson;
|
||||
factory _ChatRoom.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatRoomImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
String get id;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "room_name")
|
||||
String get roomName;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "last_message")
|
||||
dynamic get lastMessage;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "users")
|
||||
Users get users;
|
||||
@@ -393,7 +418,8 @@ abstract class _ChatRoom implements ChatRoom {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ChatRoomImplCopyWith<_$ChatRoomImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$ChatRoomImplCopyWith<_$ChatRoomImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
LastMessageClass _$LastMessageClassFromJson(Map<String, dynamic> json) {
|
||||
@@ -404,22 +430,16 @@ LastMessageClass _$LastMessageClassFromJson(Map<String, dynamic> json) {
|
||||
mixin _$LastMessageClass {
|
||||
@JsonKey(name: "id")
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "data")
|
||||
String get data => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "media_data")
|
||||
List<dynamic> get mediaData => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "author_id")
|
||||
int get authorId => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "is_author_message_auth_user")
|
||||
bool get isAuthorMessageAuthUser => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "read_by_to_user")
|
||||
bool get readByToUser => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -429,31 +449,34 @@ mixin _$LastMessageClass {
|
||||
/// Create a copy of LastMessageClass
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$LastMessageClassCopyWith<LastMessageClass> get copyWith => throw _privateConstructorUsedError;
|
||||
$LastMessageClassCopyWith<LastMessageClass> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $LastMessageClassCopyWith<$Res> {
|
||||
factory $LastMessageClassCopyWith(LastMessageClass value, $Res Function(LastMessageClass) then) = _$LastMessageClassCopyWithImpl<$Res, LastMessageClass>;
|
||||
|
||||
factory $LastMessageClassCopyWith(
|
||||
LastMessageClass value, $Res Function(LastMessageClass) then) =
|
||||
_$LastMessageClassCopyWithImpl<$Res, LastMessageClass>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "id") int id,
|
||||
@JsonKey(name: "data") String data,
|
||||
@JsonKey(name: "media_data") List<dynamic> mediaData,
|
||||
@JsonKey(name: "author_id") int authorId,
|
||||
@JsonKey(name: "is_author_message_auth_user") bool isAuthorMessageAuthUser,
|
||||
@JsonKey(name: "is_author_message_auth_user")
|
||||
bool isAuthorMessageAuthUser,
|
||||
@JsonKey(name: "read_by_to_user") bool readByToUser,
|
||||
@JsonKey(name: "updated_at") DateTime updatedAt});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$LastMessageClassCopyWithImpl<$Res, $Val extends LastMessageClass> implements $LastMessageClassCopyWith<$Res> {
|
||||
class _$LastMessageClassCopyWithImpl<$Res, $Val extends LastMessageClass>
|
||||
implements $LastMessageClassCopyWith<$Res> {
|
||||
_$LastMessageClassCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -504,10 +527,11 @@ class _$LastMessageClassCopyWithImpl<$Res, $Val extends LastMessageClass> implem
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$LastMessageClassImplCopyWith<$Res> implements $LastMessageClassCopyWith<$Res> {
|
||||
factory _$$LastMessageClassImplCopyWith(_$LastMessageClassImpl value, $Res Function(_$LastMessageClassImpl) then) =
|
||||
abstract class _$$LastMessageClassImplCopyWith<$Res>
|
||||
implements $LastMessageClassCopyWith<$Res> {
|
||||
factory _$$LastMessageClassImplCopyWith(_$LastMessageClassImpl value,
|
||||
$Res Function(_$LastMessageClassImpl) then) =
|
||||
__$$LastMessageClassImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -515,15 +539,19 @@ abstract class _$$LastMessageClassImplCopyWith<$Res> implements $LastMessageClas
|
||||
@JsonKey(name: "data") String data,
|
||||
@JsonKey(name: "media_data") List<dynamic> mediaData,
|
||||
@JsonKey(name: "author_id") int authorId,
|
||||
@JsonKey(name: "is_author_message_auth_user") bool isAuthorMessageAuthUser,
|
||||
@JsonKey(name: "is_author_message_auth_user")
|
||||
bool isAuthorMessageAuthUser,
|
||||
@JsonKey(name: "read_by_to_user") bool readByToUser,
|
||||
@JsonKey(name: "updated_at") DateTime updatedAt});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$LastMessageClassImplCopyWithImpl<$Res> extends _$LastMessageClassCopyWithImpl<$Res, _$LastMessageClassImpl>
|
||||
class __$$LastMessageClassImplCopyWithImpl<$Res>
|
||||
extends _$LastMessageClassCopyWithImpl<$Res, _$LastMessageClassImpl>
|
||||
implements _$$LastMessageClassImplCopyWith<$Res> {
|
||||
__$$LastMessageClassImplCopyWithImpl(_$LastMessageClassImpl _value, $Res Function(_$LastMessageClassImpl) _then) : super(_value, _then);
|
||||
__$$LastMessageClassImplCopyWithImpl(_$LastMessageClassImpl _value,
|
||||
$Res Function(_$LastMessageClassImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of LastMessageClass
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -579,12 +607,14 @@ class _$LastMessageClassImpl implements _LastMessageClass {
|
||||
@JsonKey(name: "data") required this.data,
|
||||
@JsonKey(name: "media_data") required final List<dynamic> mediaData,
|
||||
@JsonKey(name: "author_id") required this.authorId,
|
||||
@JsonKey(name: "is_author_message_auth_user") required this.isAuthorMessageAuthUser,
|
||||
@JsonKey(name: "is_author_message_auth_user")
|
||||
required this.isAuthorMessageAuthUser,
|
||||
@JsonKey(name: "read_by_to_user") required this.readByToUser,
|
||||
@JsonKey(name: "updated_at") required this.updatedAt})
|
||||
: _mediaData = mediaData;
|
||||
|
||||
factory _$LastMessageClassImpl.fromJson(Map<String, dynamic> json) => _$$LastMessageClassImplFromJson(json);
|
||||
factory _$LastMessageClassImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$LastMessageClassImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
@@ -593,7 +623,6 @@ class _$LastMessageClassImpl implements _LastMessageClass {
|
||||
@JsonKey(name: "data")
|
||||
final String data;
|
||||
final List<dynamic> _mediaData;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "media_data")
|
||||
List<dynamic> get mediaData {
|
||||
@@ -627,24 +656,39 @@ class _$LastMessageClassImpl implements _LastMessageClass {
|
||||
other is _$LastMessageClassImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.data, data) || other.data == data) &&
|
||||
const DeepCollectionEquality().equals(other._mediaData, _mediaData) &&
|
||||
(identical(other.authorId, authorId) || other.authorId == authorId) &&
|
||||
(identical(other.isAuthorMessageAuthUser, isAuthorMessageAuthUser) || other.isAuthorMessageAuthUser == isAuthorMessageAuthUser) &&
|
||||
(identical(other.readByToUser, readByToUser) || other.readByToUser == readByToUser) &&
|
||||
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._mediaData, _mediaData) &&
|
||||
(identical(other.authorId, authorId) ||
|
||||
other.authorId == authorId) &&
|
||||
(identical(
|
||||
other.isAuthorMessageAuthUser, isAuthorMessageAuthUser) ||
|
||||
other.isAuthorMessageAuthUser == isAuthorMessageAuthUser) &&
|
||||
(identical(other.readByToUser, readByToUser) ||
|
||||
other.readByToUser == readByToUser) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, id, data, const DeepCollectionEquality().hash(_mediaData), authorId, isAuthorMessageAuthUser, readByToUser, updatedAt);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
data,
|
||||
const DeepCollectionEquality().hash(_mediaData),
|
||||
authorId,
|
||||
isAuthorMessageAuthUser,
|
||||
readByToUser,
|
||||
updatedAt);
|
||||
|
||||
/// Create a copy of LastMessageClass
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$LastMessageClassImplCopyWith<_$LastMessageClassImpl> get copyWith => __$$LastMessageClassImplCopyWithImpl<_$LastMessageClassImpl>(this, _$identity);
|
||||
_$$LastMessageClassImplCopyWith<_$LastMessageClassImpl> get copyWith =>
|
||||
__$$LastMessageClassImplCopyWithImpl<_$LastMessageClassImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -656,40 +700,37 @@ class _$LastMessageClassImpl implements _LastMessageClass {
|
||||
|
||||
abstract class _LastMessageClass implements LastMessageClass {
|
||||
const factory _LastMessageClass(
|
||||
{@JsonKey(name: "id") required final int id,
|
||||
@JsonKey(name: "data") required final String data,
|
||||
@JsonKey(name: "media_data") required final List<dynamic> mediaData,
|
||||
@JsonKey(name: "author_id") required final int authorId,
|
||||
@JsonKey(name: "is_author_message_auth_user") required final bool isAuthorMessageAuthUser,
|
||||
@JsonKey(name: "read_by_to_user") required final bool readByToUser,
|
||||
@JsonKey(name: "updated_at") required final DateTime updatedAt}) = _$LastMessageClassImpl;
|
||||
{@JsonKey(name: "id") required final int id,
|
||||
@JsonKey(name: "data") required final String data,
|
||||
@JsonKey(name: "media_data") required final List<dynamic> mediaData,
|
||||
@JsonKey(name: "author_id") required final int authorId,
|
||||
@JsonKey(name: "is_author_message_auth_user")
|
||||
required final bool isAuthorMessageAuthUser,
|
||||
@JsonKey(name: "read_by_to_user") required final bool readByToUser,
|
||||
@JsonKey(name: "updated_at") required final DateTime updatedAt}) =
|
||||
_$LastMessageClassImpl;
|
||||
|
||||
factory _LastMessageClass.fromJson(Map<String, dynamic> json) = _$LastMessageClassImpl.fromJson;
|
||||
factory _LastMessageClass.fromJson(Map<String, dynamic> json) =
|
||||
_$LastMessageClassImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
int get id;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "data")
|
||||
String get data;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "media_data")
|
||||
List<dynamic> get mediaData;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "author_id")
|
||||
int get authorId;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "is_author_message_auth_user")
|
||||
bool get isAuthorMessageAuthUser;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "read_by_to_user")
|
||||
bool get readByToUser;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt;
|
||||
@@ -698,7 +739,8 @@ abstract class _LastMessageClass implements LastMessageClass {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$LastMessageClassImplCopyWith<_$LastMessageClassImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$LastMessageClassImplCopyWith<_$LastMessageClassImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Users _$UsersFromJson(Map<String, dynamic> json) {
|
||||
@@ -709,7 +751,6 @@ Users _$UsersFromJson(Map<String, dynamic> json) {
|
||||
mixin _$Users {
|
||||
@JsonKey(name: "from_chat_user")
|
||||
ChatUser get fromChatUser => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "to_chat_user")
|
||||
ChatUser get toChatUser => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -724,23 +765,24 @@ mixin _$Users {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $UsersCopyWith<$Res> {
|
||||
factory $UsersCopyWith(Users value, $Res Function(Users) then) = _$UsersCopyWithImpl<$Res, Users>;
|
||||
|
||||
factory $UsersCopyWith(Users value, $Res Function(Users) then) =
|
||||
_$UsersCopyWithImpl<$Res, Users>;
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "from_chat_user") ChatUser fromChatUser, @JsonKey(name: "to_chat_user") ChatUser toChatUser});
|
||||
$Res call(
|
||||
{@JsonKey(name: "from_chat_user") ChatUser fromChatUser,
|
||||
@JsonKey(name: "to_chat_user") ChatUser toChatUser});
|
||||
|
||||
$ChatUserCopyWith<$Res> get fromChatUser;
|
||||
|
||||
$ChatUserCopyWith<$Res> get toChatUser;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$UsersCopyWithImpl<$Res, $Val extends Users> implements $UsersCopyWith<$Res> {
|
||||
class _$UsersCopyWithImpl<$Res, $Val extends Users>
|
||||
implements $UsersCopyWith<$Res> {
|
||||
_$UsersCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -787,22 +829,28 @@ class _$UsersCopyWithImpl<$Res, $Val extends Users> implements $UsersCopyWith<$R
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$UsersImplCopyWith<$Res> implements $UsersCopyWith<$Res> {
|
||||
factory _$$UsersImplCopyWith(_$UsersImpl value, $Res Function(_$UsersImpl) then) = __$$UsersImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$UsersImplCopyWith(
|
||||
_$UsersImpl value, $Res Function(_$UsersImpl) then) =
|
||||
__$$UsersImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "from_chat_user") ChatUser fromChatUser, @JsonKey(name: "to_chat_user") ChatUser toChatUser});
|
||||
$Res call(
|
||||
{@JsonKey(name: "from_chat_user") ChatUser fromChatUser,
|
||||
@JsonKey(name: "to_chat_user") ChatUser toChatUser});
|
||||
|
||||
@override
|
||||
$ChatUserCopyWith<$Res> get fromChatUser;
|
||||
|
||||
@override
|
||||
$ChatUserCopyWith<$Res> get toChatUser;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$UsersImplCopyWithImpl<$Res> extends _$UsersCopyWithImpl<$Res, _$UsersImpl> implements _$$UsersImplCopyWith<$Res> {
|
||||
__$$UsersImplCopyWithImpl(_$UsersImpl _value, $Res Function(_$UsersImpl) _then) : super(_value, _then);
|
||||
class __$$UsersImplCopyWithImpl<$Res>
|
||||
extends _$UsersCopyWithImpl<$Res, _$UsersImpl>
|
||||
implements _$$UsersImplCopyWith<$Res> {
|
||||
__$$UsersImplCopyWithImpl(
|
||||
_$UsersImpl _value, $Res Function(_$UsersImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Users
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -828,9 +876,12 @@ class __$$UsersImplCopyWithImpl<$Res> extends _$UsersCopyWithImpl<$Res, _$UsersI
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$UsersImpl implements _Users {
|
||||
const _$UsersImpl({@JsonKey(name: "from_chat_user") required this.fromChatUser, @JsonKey(name: "to_chat_user") required this.toChatUser});
|
||||
const _$UsersImpl(
|
||||
{@JsonKey(name: "from_chat_user") required this.fromChatUser,
|
||||
@JsonKey(name: "to_chat_user") required this.toChatUser});
|
||||
|
||||
factory _$UsersImpl.fromJson(Map<String, dynamic> json) => _$$UsersImplFromJson(json);
|
||||
factory _$UsersImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$UsersImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "from_chat_user")
|
||||
@@ -849,8 +900,10 @@ class _$UsersImpl implements _Users {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$UsersImpl &&
|
||||
(identical(other.fromChatUser, fromChatUser) || other.fromChatUser == fromChatUser) &&
|
||||
(identical(other.toChatUser, toChatUser) || other.toChatUser == toChatUser));
|
||||
(identical(other.fromChatUser, fromChatUser) ||
|
||||
other.fromChatUser == fromChatUser) &&
|
||||
(identical(other.toChatUser, toChatUser) ||
|
||||
other.toChatUser == toChatUser));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -862,7 +915,8 @@ class _$UsersImpl implements _Users {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$UsersImplCopyWith<_$UsersImpl> get copyWith => __$$UsersImplCopyWithImpl<_$UsersImpl>(this, _$identity);
|
||||
_$$UsersImplCopyWith<_$UsersImpl> get copyWith =>
|
||||
__$$UsersImplCopyWithImpl<_$UsersImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -874,14 +928,15 @@ class _$UsersImpl implements _Users {
|
||||
|
||||
abstract class _Users implements Users {
|
||||
const factory _Users(
|
||||
{@JsonKey(name: "from_chat_user") required final ChatUser fromChatUser, @JsonKey(name: "to_chat_user") required final ChatUser toChatUser}) = _$UsersImpl;
|
||||
{@JsonKey(name: "from_chat_user") required final ChatUser fromChatUser,
|
||||
@JsonKey(name: "to_chat_user")
|
||||
required final ChatUser toChatUser}) = _$UsersImpl;
|
||||
|
||||
factory _Users.fromJson(Map<String, dynamic> json) = _$UsersImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "from_chat_user")
|
||||
ChatUser get fromChatUser;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "to_chat_user")
|
||||
ChatUser get toChatUser;
|
||||
@@ -890,7 +945,8 @@ abstract class _Users implements Users {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$UsersImplCopyWith<_$UsersImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$UsersImplCopyWith<_$UsersImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
ChatUser _$ChatUserFromJson(Map<String, dynamic> json) {
|
||||
@@ -901,13 +957,10 @@ ChatUser _$ChatUserFromJson(Map<String, dynamic> json) {
|
||||
mixin _$ChatUser {
|
||||
@JsonKey(name: "id")
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "name")
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "profile_photo_path")
|
||||
String? get profilePhotoPath => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "profile_photo_url")
|
||||
String get profilePhotoUrl => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -917,13 +970,14 @@ mixin _$ChatUser {
|
||||
/// Create a copy of ChatUser
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatUserCopyWith<ChatUser> get copyWith => throw _privateConstructorUsedError;
|
||||
$ChatUserCopyWith<ChatUser> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatUserCopyWith<$Res> {
|
||||
factory $ChatUserCopyWith(ChatUser value, $Res Function(ChatUser) then) = _$ChatUserCopyWithImpl<$Res, ChatUser>;
|
||||
|
||||
factory $ChatUserCopyWith(ChatUser value, $Res Function(ChatUser) then) =
|
||||
_$ChatUserCopyWithImpl<$Res, ChatUser>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "id") int id,
|
||||
@@ -933,12 +987,12 @@ abstract class $ChatUserCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatUserCopyWithImpl<$Res, $Val extends ChatUser> implements $ChatUserCopyWith<$Res> {
|
||||
class _$ChatUserCopyWithImpl<$Res, $Val extends ChatUser>
|
||||
implements $ChatUserCopyWith<$Res> {
|
||||
_$ChatUserCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -974,9 +1028,11 @@ class _$ChatUserCopyWithImpl<$Res, $Val extends ChatUser> implements $ChatUserCo
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatUserImplCopyWith<$Res> implements $ChatUserCopyWith<$Res> {
|
||||
factory _$$ChatUserImplCopyWith(_$ChatUserImpl value, $Res Function(_$ChatUserImpl) then) = __$$ChatUserImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$ChatUserImplCopyWith<$Res>
|
||||
implements $ChatUserCopyWith<$Res> {
|
||||
factory _$$ChatUserImplCopyWith(
|
||||
_$ChatUserImpl value, $Res Function(_$ChatUserImpl) then) =
|
||||
__$$ChatUserImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -987,8 +1043,12 @@ abstract class _$$ChatUserImplCopyWith<$Res> implements $ChatUserCopyWith<$Res>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatUserImplCopyWithImpl<$Res> extends _$ChatUserCopyWithImpl<$Res, _$ChatUserImpl> implements _$$ChatUserImplCopyWith<$Res> {
|
||||
__$$ChatUserImplCopyWithImpl(_$ChatUserImpl _value, $Res Function(_$ChatUserImpl) _then) : super(_value, _then);
|
||||
class __$$ChatUserImplCopyWithImpl<$Res>
|
||||
extends _$ChatUserCopyWithImpl<$Res, _$ChatUserImpl>
|
||||
implements _$$ChatUserImplCopyWith<$Res> {
|
||||
__$$ChatUserImplCopyWithImpl(
|
||||
_$ChatUserImpl _value, $Res Function(_$ChatUserImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatUser
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -1030,7 +1090,8 @@ class _$ChatUserImpl implements _ChatUser {
|
||||
@JsonKey(name: "profile_photo_path") required this.profilePhotoPath,
|
||||
@JsonKey(name: "profile_photo_url") required this.profilePhotoUrl});
|
||||
|
||||
factory _$ChatUserImpl.fromJson(Map<String, dynamic> json) => _$$ChatUserImplFromJson(json);
|
||||
factory _$ChatUserImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatUserImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
@@ -1057,20 +1118,24 @@ class _$ChatUserImpl implements _ChatUser {
|
||||
other is _$ChatUserImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
(identical(other.profilePhotoPath, profilePhotoPath) || other.profilePhotoPath == profilePhotoPath) &&
|
||||
(identical(other.profilePhotoUrl, profilePhotoUrl) || other.profilePhotoUrl == profilePhotoUrl));
|
||||
(identical(other.profilePhotoPath, profilePhotoPath) ||
|
||||
other.profilePhotoPath == profilePhotoPath) &&
|
||||
(identical(other.profilePhotoUrl, profilePhotoUrl) ||
|
||||
other.profilePhotoUrl == profilePhotoUrl));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl);
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl);
|
||||
|
||||
/// Create a copy of ChatUser
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatUserImplCopyWith<_$ChatUserImpl> get copyWith => __$$ChatUserImplCopyWithImpl<_$ChatUserImpl>(this, _$identity);
|
||||
_$$ChatUserImplCopyWith<_$ChatUserImpl> get copyWith =>
|
||||
__$$ChatUserImplCopyWithImpl<_$ChatUserImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -1084,23 +1149,23 @@ abstract class _ChatUser implements ChatUser {
|
||||
const factory _ChatUser(
|
||||
{@JsonKey(name: "id") required final int id,
|
||||
@JsonKey(name: "name") required final String name,
|
||||
@JsonKey(name: "profile_photo_path") required final String? profilePhotoPath,
|
||||
@JsonKey(name: "profile_photo_url") required final String profilePhotoUrl}) = _$ChatUserImpl;
|
||||
@JsonKey(name: "profile_photo_path")
|
||||
required final String? profilePhotoPath,
|
||||
@JsonKey(name: "profile_photo_url")
|
||||
required final String profilePhotoUrl}) = _$ChatUserImpl;
|
||||
|
||||
factory _ChatUser.fromJson(Map<String, dynamic> json) = _$ChatUserImpl.fromJson;
|
||||
factory _ChatUser.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatUserImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
int get id;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "name")
|
||||
String get name;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "profile_photo_path")
|
||||
String? get profilePhotoPath;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "profile_photo_url")
|
||||
String get profilePhotoUrl;
|
||||
@@ -1109,5 +1174,6 @@ abstract class _ChatUser implements ChatUser {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ChatUserImplCopyWith<_$ChatUserImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$ChatUserImplCopyWith<_$ChatUserImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,29 +6,39 @@ part of 'chat_room_preview_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatRoomPreviewModelImpl _$$ChatRoomPreviewModelImplFromJson(Map<String, dynamic> json) => _$ChatRoomPreviewModelImpl(
|
||||
chatRooms: (json['chatRooms'] as List<dynamic>).map((e) => ChatRoom.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
_$ChatRoomPreviewModelImpl _$$ChatRoomPreviewModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ChatRoomPreviewModelImpl(
|
||||
chatRooms: (json['chatRooms'] as List<dynamic>)
|
||||
.map((e) => ChatRoom.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatRoomPreviewModelImplToJson(_$ChatRoomPreviewModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$ChatRoomPreviewModelImplToJson(
|
||||
_$ChatRoomPreviewModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'chatRooms': instance.chatRooms,
|
||||
};
|
||||
|
||||
_$ChatRoomImpl _$$ChatRoomImplFromJson(Map<String, dynamic> json) => _$ChatRoomImpl(
|
||||
_$ChatRoomImpl _$$ChatRoomImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ChatRoomImpl(
|
||||
id: json['id'] as String,
|
||||
roomName: json['room_name'] as String,
|
||||
lastMessage: json['last_message'],
|
||||
users: Users.fromJson(json['users'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatRoomImplToJson(_$ChatRoomImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$ChatRoomImplToJson(_$ChatRoomImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'room_name': instance.roomName,
|
||||
'last_message': instance.lastMessage,
|
||||
'users': instance.users,
|
||||
};
|
||||
|
||||
_$LastMessageClassImpl _$$LastMessageClassImplFromJson(Map<String, dynamic> json) => _$LastMessageClassImpl(
|
||||
_$LastMessageClassImpl _$$LastMessageClassImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$LastMessageClassImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
data: json['data'] as String,
|
||||
mediaData: json['media_data'] as List<dynamic>,
|
||||
@@ -38,7 +48,9 @@ _$LastMessageClassImpl _$$LastMessageClassImplFromJson(Map<String, dynamic> json
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$LastMessageClassImplToJson(_$LastMessageClassImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$LastMessageClassImplToJson(
|
||||
_$LastMessageClassImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'data': instance.data,
|
||||
'media_data': instance.mediaData,
|
||||
@@ -49,23 +61,28 @@ Map<String, dynamic> _$$LastMessageClassImplToJson(_$LastMessageClassImpl instan
|
||||
};
|
||||
|
||||
_$UsersImpl _$$UsersImplFromJson(Map<String, dynamic> json) => _$UsersImpl(
|
||||
fromChatUser: ChatUser.fromJson(json['from_chat_user'] as Map<String, dynamic>),
|
||||
toChatUser: ChatUser.fromJson(json['to_chat_user'] as Map<String, dynamic>),
|
||||
fromChatUser:
|
||||
ChatUser.fromJson(json['from_chat_user'] as Map<String, dynamic>),
|
||||
toChatUser:
|
||||
ChatUser.fromJson(json['to_chat_user'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$UsersImplToJson(_$UsersImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$UsersImplToJson(_$UsersImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'from_chat_user': instance.fromChatUser,
|
||||
'to_chat_user': instance.toChatUser,
|
||||
};
|
||||
|
||||
_$ChatUserImpl _$$ChatUserImplFromJson(Map<String, dynamic> json) => _$ChatUserImpl(
|
||||
_$ChatUserImpl _$$ChatUserImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ChatUserImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
name: json['name'] as String,
|
||||
profilePhotoPath: json['profile_photo_path'] as String?,
|
||||
profilePhotoUrl: json['profile_photo_url'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatUserImplToJson(_$ChatUserImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$ChatUserImplToJson(_$ChatUserImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'profile_photo_path': instance.profilePhotoPath,
|
||||
|
||||
@@ -14,22 +14,19 @@ T _$identity<T>(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');
|
||||
|
||||
ChatRoomSettingsModel _$ChatRoomSettingsModelFromJson(Map<String, dynamic> json) {
|
||||
ChatRoomSettingsModel _$ChatRoomSettingsModelFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return _ChatRoomSettingsModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$ChatRoomSettingsModel {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'room_name')
|
||||
String get roomName => throw _privateConstructorUsedError;
|
||||
|
||||
String get state => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'access_level')
|
||||
String get accessLevel => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'updated_at')
|
||||
String get updatedAt => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -39,14 +36,15 @@ mixin _$ChatRoomSettingsModel {
|
||||
/// Create a copy of ChatRoomSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatRoomSettingsModelCopyWith<ChatRoomSettingsModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$ChatRoomSettingsModelCopyWith<ChatRoomSettingsModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatRoomSettingsModelCopyWith<$Res> {
|
||||
factory $ChatRoomSettingsModelCopyWith(ChatRoomSettingsModel value, $Res Function(ChatRoomSettingsModel) then) =
|
||||
factory $ChatRoomSettingsModelCopyWith(ChatRoomSettingsModel value,
|
||||
$Res Function(ChatRoomSettingsModel) then) =
|
||||
_$ChatRoomSettingsModelCopyWithImpl<$Res, ChatRoomSettingsModel>;
|
||||
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
@@ -57,12 +55,13 @@ abstract class $ChatRoomSettingsModelCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatRoomSettingsModelCopyWithImpl<$Res, $Val extends ChatRoomSettingsModel> implements $ChatRoomSettingsModelCopyWith<$Res> {
|
||||
class _$ChatRoomSettingsModelCopyWithImpl<$Res,
|
||||
$Val extends ChatRoomSettingsModel>
|
||||
implements $ChatRoomSettingsModelCopyWith<$Res> {
|
||||
_$ChatRoomSettingsModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -103,10 +102,12 @@ class _$ChatRoomSettingsModelCopyWithImpl<$Res, $Val extends ChatRoomSettingsMod
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomSettingsModelImplCopyWith<$Res> implements $ChatRoomSettingsModelCopyWith<$Res> {
|
||||
factory _$$ChatRoomSettingsModelImplCopyWith(_$ChatRoomSettingsModelImpl value, $Res Function(_$ChatRoomSettingsModelImpl) then) =
|
||||
abstract class _$$ChatRoomSettingsModelImplCopyWith<$Res>
|
||||
implements $ChatRoomSettingsModelCopyWith<$Res> {
|
||||
factory _$$ChatRoomSettingsModelImplCopyWith(
|
||||
_$ChatRoomSettingsModelImpl value,
|
||||
$Res Function(_$ChatRoomSettingsModelImpl) then) =
|
||||
__$$ChatRoomSettingsModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -118,9 +119,13 @@ abstract class _$$ChatRoomSettingsModelImplCopyWith<$Res> implements $ChatRoomSe
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomSettingsModelImplCopyWithImpl<$Res> extends _$ChatRoomSettingsModelCopyWithImpl<$Res, _$ChatRoomSettingsModelImpl>
|
||||
class __$$ChatRoomSettingsModelImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomSettingsModelCopyWithImpl<$Res,
|
||||
_$ChatRoomSettingsModelImpl>
|
||||
implements _$$ChatRoomSettingsModelImplCopyWith<$Res> {
|
||||
__$$ChatRoomSettingsModelImplCopyWithImpl(_$ChatRoomSettingsModelImpl _value, $Res Function(_$ChatRoomSettingsModelImpl) _then) : super(_value, _then);
|
||||
__$$ChatRoomSettingsModelImplCopyWithImpl(_$ChatRoomSettingsModelImpl _value,
|
||||
$Res Function(_$ChatRoomSettingsModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatRoomSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -168,7 +173,8 @@ class _$ChatRoomSettingsModelImpl implements _ChatRoomSettingsModel {
|
||||
@JsonKey(name: 'access_level') required this.accessLevel,
|
||||
@JsonKey(name: 'updated_at') required this.updatedAt});
|
||||
|
||||
factory _$ChatRoomSettingsModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatRoomSettingsModelImplFromJson(json);
|
||||
factory _$ChatRoomSettingsModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatRoomSettingsModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -195,23 +201,28 @@ class _$ChatRoomSettingsModelImpl implements _ChatRoomSettingsModel {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatRoomSettingsModelImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.roomName, roomName) || other.roomName == roomName) &&
|
||||
(identical(other.roomName, roomName) ||
|
||||
other.roomName == roomName) &&
|
||||
(identical(other.state, state) || other.state == state) &&
|
||||
(identical(other.accessLevel, accessLevel) || other.accessLevel == accessLevel) &&
|
||||
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
|
||||
(identical(other.accessLevel, accessLevel) ||
|
||||
other.accessLevel == accessLevel) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, roomName, state, accessLevel, updatedAt);
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, id, roomName, state, accessLevel, updatedAt);
|
||||
|
||||
/// Create a copy of ChatRoomSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl> get copyWith =>
|
||||
__$$ChatRoomSettingsModelImplCopyWithImpl<_$ChatRoomSettingsModelImpl>(this, _$identity);
|
||||
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl>
|
||||
get copyWith => __$$ChatRoomSettingsModelImplCopyWithImpl<
|
||||
_$ChatRoomSettingsModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -223,28 +234,26 @@ class _$ChatRoomSettingsModelImpl implements _ChatRoomSettingsModel {
|
||||
|
||||
abstract class _ChatRoomSettingsModel implements ChatRoomSettingsModel {
|
||||
const factory _ChatRoomSettingsModel(
|
||||
{required final int id,
|
||||
@JsonKey(name: 'room_name') required final String roomName,
|
||||
required final String state,
|
||||
@JsonKey(name: 'access_level') required final String accessLevel,
|
||||
@JsonKey(name: 'updated_at') required final String updatedAt}) = _$ChatRoomSettingsModelImpl;
|
||||
{required final int id,
|
||||
@JsonKey(name: 'room_name') required final String roomName,
|
||||
required final String state,
|
||||
@JsonKey(name: 'access_level') required final String accessLevel,
|
||||
@JsonKey(name: 'updated_at') required final String updatedAt}) =
|
||||
_$ChatRoomSettingsModelImpl;
|
||||
|
||||
factory _ChatRoomSettingsModel.fromJson(Map<String, dynamic> json) = _$ChatRoomSettingsModelImpl.fromJson;
|
||||
factory _ChatRoomSettingsModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatRoomSettingsModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'room_name')
|
||||
String get roomName;
|
||||
|
||||
@override
|
||||
String get state;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'access_level')
|
||||
String get accessLevel;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'updated_at')
|
||||
String get updatedAt;
|
||||
@@ -253,5 +262,6 @@ abstract class _ChatRoomSettingsModel implements ChatRoomSettingsModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ part of 'chat_room_settings_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatRoomSettingsModelImpl _$$ChatRoomSettingsModelImplFromJson(Map<String, dynamic> json) => _$ChatRoomSettingsModelImpl(
|
||||
_$ChatRoomSettingsModelImpl _$$ChatRoomSettingsModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ChatRoomSettingsModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
roomName: json['room_name'] as String,
|
||||
state: json['state'] as String,
|
||||
@@ -14,7 +16,9 @@ _$ChatRoomSettingsModelImpl _$$ChatRoomSettingsModelImplFromJson(Map<String, dyn
|
||||
updatedAt: json['updated_at'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatRoomSettingsModelImplToJson(_$ChatRoomSettingsModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$ChatRoomSettingsModelImplToJson(
|
||||
_$ChatRoomSettingsModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'room_name': instance.roomName,
|
||||
'state': instance.state,
|
||||
|
||||
@@ -21,12 +21,9 @@ ChatUserModel _$ChatUserModelFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$ChatUserModel {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'profile_photo_path')
|
||||
String? get profilePhotoPath => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'profile_photo_url')
|
||||
String? get profilePhotoUrl => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -36,24 +33,30 @@ mixin _$ChatUserModel {
|
||||
/// Create a copy of ChatUserModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatUserModelCopyWith<ChatUserModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$ChatUserModelCopyWith<ChatUserModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatUserModelCopyWith<$Res> {
|
||||
factory $ChatUserModelCopyWith(ChatUserModel value, $Res Function(ChatUserModel) then) = _$ChatUserModelCopyWithImpl<$Res, ChatUserModel>;
|
||||
|
||||
factory $ChatUserModelCopyWith(
|
||||
ChatUserModel value, $Res Function(ChatUserModel) then) =
|
||||
_$ChatUserModelCopyWithImpl<$Res, ChatUserModel>;
|
||||
@useResult
|
||||
$Res call({int id, String name, @JsonKey(name: 'profile_photo_path') String? profilePhotoPath, @JsonKey(name: 'profile_photo_url') String? profilePhotoUrl});
|
||||
$Res call(
|
||||
{int id,
|
||||
String name,
|
||||
@JsonKey(name: 'profile_photo_path') String? profilePhotoPath,
|
||||
@JsonKey(name: 'profile_photo_url') String? profilePhotoUrl});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatUserModelCopyWithImpl<$Res, $Val extends ChatUserModel> implements $ChatUserModelCopyWith<$Res> {
|
||||
class _$ChatUserModelCopyWithImpl<$Res, $Val extends ChatUserModel>
|
||||
implements $ChatUserModelCopyWith<$Res> {
|
||||
_$ChatUserModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -89,17 +92,27 @@ class _$ChatUserModelCopyWithImpl<$Res, $Val extends ChatUserModel> implements $
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatUserModelImplCopyWith<$Res> implements $ChatUserModelCopyWith<$Res> {
|
||||
factory _$$ChatUserModelImplCopyWith(_$ChatUserModelImpl value, $Res Function(_$ChatUserModelImpl) then) = __$$ChatUserModelImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$ChatUserModelImplCopyWith<$Res>
|
||||
implements $ChatUserModelCopyWith<$Res> {
|
||||
factory _$$ChatUserModelImplCopyWith(
|
||||
_$ChatUserModelImpl value, $Res Function(_$ChatUserModelImpl) then) =
|
||||
__$$ChatUserModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int id, String name, @JsonKey(name: 'profile_photo_path') String? profilePhotoPath, @JsonKey(name: 'profile_photo_url') String? profilePhotoUrl});
|
||||
$Res call(
|
||||
{int id,
|
||||
String name,
|
||||
@JsonKey(name: 'profile_photo_path') String? profilePhotoPath,
|
||||
@JsonKey(name: 'profile_photo_url') String? profilePhotoUrl});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatUserModelImplCopyWithImpl<$Res> extends _$ChatUserModelCopyWithImpl<$Res, _$ChatUserModelImpl> implements _$$ChatUserModelImplCopyWith<$Res> {
|
||||
__$$ChatUserModelImplCopyWithImpl(_$ChatUserModelImpl _value, $Res Function(_$ChatUserModelImpl) _then) : super(_value, _then);
|
||||
class __$$ChatUserModelImplCopyWithImpl<$Res>
|
||||
extends _$ChatUserModelCopyWithImpl<$Res, _$ChatUserModelImpl>
|
||||
implements _$$ChatUserModelImplCopyWith<$Res> {
|
||||
__$$ChatUserModelImplCopyWithImpl(
|
||||
_$ChatUserModelImpl _value, $Res Function(_$ChatUserModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatUserModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -141,7 +154,8 @@ class _$ChatUserModelImpl implements _ChatUserModel {
|
||||
@JsonKey(name: 'profile_photo_path') this.profilePhotoPath,
|
||||
@JsonKey(name: 'profile_photo_url') this.profilePhotoUrl});
|
||||
|
||||
factory _$ChatUserModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatUserModelImplFromJson(json);
|
||||
factory _$ChatUserModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatUserModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -166,20 +180,24 @@ class _$ChatUserModelImpl implements _ChatUserModel {
|
||||
other is _$ChatUserModelImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
(identical(other.profilePhotoPath, profilePhotoPath) || other.profilePhotoPath == profilePhotoPath) &&
|
||||
(identical(other.profilePhotoUrl, profilePhotoUrl) || other.profilePhotoUrl == profilePhotoUrl));
|
||||
(identical(other.profilePhotoPath, profilePhotoPath) ||
|
||||
other.profilePhotoPath == profilePhotoPath) &&
|
||||
(identical(other.profilePhotoUrl, profilePhotoUrl) ||
|
||||
other.profilePhotoUrl == profilePhotoUrl));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl);
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl);
|
||||
|
||||
/// Create a copy of ChatUserModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith => __$$ChatUserModelImplCopyWithImpl<_$ChatUserModelImpl>(this, _$identity);
|
||||
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith =>
|
||||
__$$ChatUserModelImplCopyWithImpl<_$ChatUserModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -191,23 +209,22 @@ class _$ChatUserModelImpl implements _ChatUserModel {
|
||||
|
||||
abstract class _ChatUserModel implements ChatUserModel {
|
||||
const factory _ChatUserModel(
|
||||
{required final int id,
|
||||
required final String name,
|
||||
@JsonKey(name: 'profile_photo_path') final String? profilePhotoPath,
|
||||
@JsonKey(name: 'profile_photo_url') final String? profilePhotoUrl}) = _$ChatUserModelImpl;
|
||||
{required final int id,
|
||||
required final String name,
|
||||
@JsonKey(name: 'profile_photo_path') final String? profilePhotoPath,
|
||||
@JsonKey(name: 'profile_photo_url') final String? profilePhotoUrl}) =
|
||||
_$ChatUserModelImpl;
|
||||
|
||||
factory _ChatUserModel.fromJson(Map<String, dynamic> json) = _$ChatUserModelImpl.fromJson;
|
||||
factory _ChatUserModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatUserModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
String get name;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'profile_photo_path')
|
||||
String? get profilePhotoPath;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'profile_photo_url')
|
||||
String? get profilePhotoUrl;
|
||||
@@ -216,5 +233,6 @@ abstract class _ChatUserModel implements ChatUserModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,14 +6,16 @@ part of 'chat_user_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatUserModelImpl _$$ChatUserModelImplFromJson(Map<String, dynamic> json) => _$ChatUserModelImpl(
|
||||
_$ChatUserModelImpl _$$ChatUserModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ChatUserModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
name: json['name'] as String,
|
||||
profilePhotoPath: json['profile_photo_path'] as String?,
|
||||
profilePhotoUrl: json['profile_photo_url'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatUserModelImplToJson(_$ChatUserModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$ChatUserModelImplToJson(_$ChatUserModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'profile_photo_path': instance.profilePhotoPath,
|
||||
|
||||
@@ -21,13 +21,9 @@ WebsocketInfoModel _$WebsocketInfoModelFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$WebsocketInfoModel {
|
||||
String get key => throw _privateConstructorUsedError;
|
||||
|
||||
String get host => throw _privateConstructorUsedError;
|
||||
|
||||
String get port => throw _privateConstructorUsedError;
|
||||
|
||||
String get cluster => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'user_id')
|
||||
int get userId => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -37,25 +33,31 @@ mixin _$WebsocketInfoModel {
|
||||
/// Create a copy of WebsocketInfoModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$WebsocketInfoModelCopyWith<WebsocketInfoModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$WebsocketInfoModelCopyWith<WebsocketInfoModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $WebsocketInfoModelCopyWith<$Res> {
|
||||
factory $WebsocketInfoModelCopyWith(WebsocketInfoModel value, $Res Function(WebsocketInfoModel) then) =
|
||||
factory $WebsocketInfoModelCopyWith(
|
||||
WebsocketInfoModel value, $Res Function(WebsocketInfoModel) then) =
|
||||
_$WebsocketInfoModelCopyWithImpl<$Res, WebsocketInfoModel>;
|
||||
|
||||
@useResult
|
||||
$Res call({String key, String host, String port, String cluster, @JsonKey(name: 'user_id') int userId});
|
||||
$Res call(
|
||||
{String key,
|
||||
String host,
|
||||
String port,
|
||||
String cluster,
|
||||
@JsonKey(name: 'user_id') int userId});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$WebsocketInfoModelCopyWithImpl<$Res, $Val extends WebsocketInfoModel> implements $WebsocketInfoModelCopyWith<$Res> {
|
||||
class _$WebsocketInfoModelCopyWithImpl<$Res, $Val extends WebsocketInfoModel>
|
||||
implements $WebsocketInfoModelCopyWith<$Res> {
|
||||
_$WebsocketInfoModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -96,19 +98,28 @@ class _$WebsocketInfoModelCopyWithImpl<$Res, $Val extends WebsocketInfoModel> im
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$WebsocketInfoModelImplCopyWith<$Res> implements $WebsocketInfoModelCopyWith<$Res> {
|
||||
factory _$$WebsocketInfoModelImplCopyWith(_$WebsocketInfoModelImpl value, $Res Function(_$WebsocketInfoModelImpl) then) =
|
||||
abstract class _$$WebsocketInfoModelImplCopyWith<$Res>
|
||||
implements $WebsocketInfoModelCopyWith<$Res> {
|
||||
factory _$$WebsocketInfoModelImplCopyWith(_$WebsocketInfoModelImpl value,
|
||||
$Res Function(_$WebsocketInfoModelImpl) then) =
|
||||
__$$WebsocketInfoModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String key, String host, String port, String cluster, @JsonKey(name: 'user_id') int userId});
|
||||
$Res call(
|
||||
{String key,
|
||||
String host,
|
||||
String port,
|
||||
String cluster,
|
||||
@JsonKey(name: 'user_id') int userId});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$WebsocketInfoModelImplCopyWithImpl<$Res> extends _$WebsocketInfoModelCopyWithImpl<$Res, _$WebsocketInfoModelImpl>
|
||||
class __$$WebsocketInfoModelImplCopyWithImpl<$Res>
|
||||
extends _$WebsocketInfoModelCopyWithImpl<$Res, _$WebsocketInfoModelImpl>
|
||||
implements _$$WebsocketInfoModelImplCopyWith<$Res> {
|
||||
__$$WebsocketInfoModelImplCopyWithImpl(_$WebsocketInfoModelImpl _value, $Res Function(_$WebsocketInfoModelImpl) _then) : super(_value, _then);
|
||||
__$$WebsocketInfoModelImplCopyWithImpl(_$WebsocketInfoModelImpl _value,
|
||||
$Res Function(_$WebsocketInfoModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of WebsocketInfoModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -150,9 +161,14 @@ class __$$WebsocketInfoModelImplCopyWithImpl<$Res> extends _$WebsocketInfoModelC
|
||||
@JsonSerializable()
|
||||
class _$WebsocketInfoModelImpl implements _WebsocketInfoModel {
|
||||
const _$WebsocketInfoModelImpl(
|
||||
{required this.key, required this.host, required this.port, required this.cluster, @JsonKey(name: 'user_id') required this.userId});
|
||||
{required this.key,
|
||||
required this.host,
|
||||
required this.port,
|
||||
required this.cluster,
|
||||
@JsonKey(name: 'user_id') required this.userId});
|
||||
|
||||
factory _$WebsocketInfoModelImpl.fromJson(Map<String, dynamic> json) => _$$WebsocketInfoModelImplFromJson(json);
|
||||
factory _$WebsocketInfoModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$WebsocketInfoModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String key;
|
||||
@@ -185,7 +201,8 @@ class _$WebsocketInfoModelImpl implements _WebsocketInfoModel {
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, key, host, port, cluster, userId);
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, key, host, port, cluster, userId);
|
||||
|
||||
/// Create a copy of WebsocketInfoModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -193,7 +210,8 @@ class _$WebsocketInfoModelImpl implements _WebsocketInfoModel {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith =>
|
||||
__$$WebsocketInfoModelImplCopyWithImpl<_$WebsocketInfoModelImpl>(this, _$identity);
|
||||
__$$WebsocketInfoModelImplCopyWithImpl<_$WebsocketInfoModelImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -205,26 +223,24 @@ class _$WebsocketInfoModelImpl implements _WebsocketInfoModel {
|
||||
|
||||
abstract class _WebsocketInfoModel implements WebsocketInfoModel {
|
||||
const factory _WebsocketInfoModel(
|
||||
{required final String key,
|
||||
required final String host,
|
||||
required final String port,
|
||||
required final String cluster,
|
||||
@JsonKey(name: 'user_id') required final int userId}) = _$WebsocketInfoModelImpl;
|
||||
{required final String key,
|
||||
required final String host,
|
||||
required final String port,
|
||||
required final String cluster,
|
||||
@JsonKey(name: 'user_id') required final int userId}) =
|
||||
_$WebsocketInfoModelImpl;
|
||||
|
||||
factory _WebsocketInfoModel.fromJson(Map<String, dynamic> json) = _$WebsocketInfoModelImpl.fromJson;
|
||||
factory _WebsocketInfoModel.fromJson(Map<String, dynamic> json) =
|
||||
_$WebsocketInfoModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get key;
|
||||
|
||||
@override
|
||||
String get host;
|
||||
|
||||
@override
|
||||
String get port;
|
||||
|
||||
@override
|
||||
String get cluster;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'user_id')
|
||||
int get userId;
|
||||
@@ -233,5 +249,6 @@ abstract class _WebsocketInfoModel implements WebsocketInfoModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ part of 'websocket_info_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$WebsocketInfoModelImpl _$$WebsocketInfoModelImplFromJson(Map<String, dynamic> json) => _$WebsocketInfoModelImpl(
|
||||
_$WebsocketInfoModelImpl _$$WebsocketInfoModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$WebsocketInfoModelImpl(
|
||||
key: json['key'] as String,
|
||||
host: json['host'] as String,
|
||||
port: json['port'] as String,
|
||||
@@ -14,7 +16,9 @@ _$WebsocketInfoModelImpl _$$WebsocketInfoModelImplFromJson(Map<String, dynamic>
|
||||
userId: (json['user_id'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$WebsocketInfoModelImplToJson(_$WebsocketInfoModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$WebsocketInfoModelImplToJson(
|
||||
_$WebsocketInfoModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'key': instance.key,
|
||||
'host': instance.host,
|
||||
'port': instance.port,
|
||||
|
||||
@@ -20,16 +20,19 @@ mixin _$ChatRoomState {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading) loaded,
|
||||
required TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult? Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@@ -37,7 +40,9 @@ mixin _$ChatRoomState {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
@@ -71,16 +76,18 @@ mixin _$ChatRoomState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatRoomStateCopyWith<$Res> {
|
||||
factory $ChatRoomStateCopyWith(ChatRoomState value, $Res Function(ChatRoomState) then) = _$ChatRoomStateCopyWithImpl<$Res, ChatRoomState>;
|
||||
factory $ChatRoomStateCopyWith(
|
||||
ChatRoomState value, $Res Function(ChatRoomState) then) =
|
||||
_$ChatRoomStateCopyWithImpl<$Res, ChatRoomState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatRoomStateCopyWithImpl<$Res, $Val extends ChatRoomState> implements $ChatRoomStateCopyWith<$Res> {
|
||||
class _$ChatRoomStateCopyWithImpl<$Res, $Val extends ChatRoomState>
|
||||
implements $ChatRoomStateCopyWith<$Res> {
|
||||
_$ChatRoomStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -90,12 +97,18 @@ class _$ChatRoomStateCopyWithImpl<$Res, $Val extends ChatRoomState> implements $
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomStateImplCopyWith<$Res> {
|
||||
factory _$$ChatRoomStateImplCopyWith(_$ChatRoomStateImpl value, $Res Function(_$ChatRoomStateImpl) then) = __$$ChatRoomStateImplCopyWithImpl<$Res>;
|
||||
factory _$$ChatRoomStateImplCopyWith(
|
||||
_$ChatRoomStateImpl value, $Res Function(_$ChatRoomStateImpl) then) =
|
||||
__$$ChatRoomStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomStateImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateImpl> implements _$$ChatRoomStateImplCopyWith<$Res> {
|
||||
__$$ChatRoomStateImplCopyWithImpl(_$ChatRoomStateImpl _value, $Res Function(_$ChatRoomStateImpl) _then) : super(_value, _then);
|
||||
class __$$ChatRoomStateImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateImpl>
|
||||
implements _$$ChatRoomStateImplCopyWith<$Res> {
|
||||
__$$ChatRoomStateImplCopyWithImpl(
|
||||
_$ChatRoomStateImpl _value, $Res Function(_$ChatRoomStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatRoomState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -113,7 +126,8 @@ class _$ChatRoomStateImpl implements _ChatRoomState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChatRoomStateImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$ChatRoomStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -124,7 +138,9 @@ class _$ChatRoomStateImpl implements _ChatRoomState {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading) loaded,
|
||||
required TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return $default();
|
||||
@@ -135,7 +151,9 @@ class _$ChatRoomStateImpl implements _ChatRoomState {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult? Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return $default?.call();
|
||||
@@ -146,7 +164,9 @@ class _$ChatRoomStateImpl implements _ChatRoomState {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -200,14 +220,18 @@ abstract class _ChatRoomState implements ChatRoomState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$ChatRoomStateLoadingImplCopyWith(_$ChatRoomStateLoadingImpl value, $Res Function(_$ChatRoomStateLoadingImpl) then) =
|
||||
factory _$$ChatRoomStateLoadingImplCopyWith(_$ChatRoomStateLoadingImpl value,
|
||||
$Res Function(_$ChatRoomStateLoadingImpl) then) =
|
||||
__$$ChatRoomStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomStateLoadingImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateLoadingImpl>
|
||||
class __$$ChatRoomStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateLoadingImpl>
|
||||
implements _$$ChatRoomStateLoadingImplCopyWith<$Res> {
|
||||
__$$ChatRoomStateLoadingImplCopyWithImpl(_$ChatRoomStateLoadingImpl _value, $Res Function(_$ChatRoomStateLoadingImpl) _then) : super(_value, _then);
|
||||
__$$ChatRoomStateLoadingImplCopyWithImpl(_$ChatRoomStateLoadingImpl _value,
|
||||
$Res Function(_$ChatRoomStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatRoomState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -225,7 +249,9 @@ class _$ChatRoomStateLoadingImpl implements ChatRoomStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChatRoomStateLoadingImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatRoomStateLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -236,7 +262,9 @@ class _$ChatRoomStateLoadingImpl implements ChatRoomStateLoading {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading) loaded,
|
||||
required TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loading();
|
||||
@@ -247,7 +275,9 @@ class _$ChatRoomStateLoadingImpl implements ChatRoomStateLoading {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult? Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loading?.call();
|
||||
@@ -258,7 +288,9 @@ class _$ChatRoomStateLoadingImpl implements ChatRoomStateLoading {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -312,19 +344,26 @@ abstract class ChatRoomStateLoading implements ChatRoomState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$ChatRoomStateLoadedImplCopyWith(_$ChatRoomStateLoadedImpl value, $Res Function(_$ChatRoomStateLoadedImpl) then) =
|
||||
factory _$$ChatRoomStateLoadedImplCopyWith(_$ChatRoomStateLoadedImpl value,
|
||||
$Res Function(_$ChatRoomStateLoadedImpl) then) =
|
||||
__$$ChatRoomStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading});
|
||||
$Res call(
|
||||
{ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool isTyping,
|
||||
bool isLoading});
|
||||
|
||||
$ChatRoomModelCopyWith<$Res> get chatRoom;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateLoadedImpl>
|
||||
class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateLoadedImpl>
|
||||
implements _$$ChatRoomStateLoadedImplCopyWith<$Res> {
|
||||
__$$ChatRoomStateLoadedImplCopyWithImpl(_$ChatRoomStateLoadedImpl _value, $Res Function(_$ChatRoomStateLoadedImpl) _then) : super(_value, _then);
|
||||
__$$ChatRoomStateLoadedImplCopyWithImpl(_$ChatRoomStateLoadedImpl _value,
|
||||
$Res Function(_$ChatRoomStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatRoomState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -370,13 +409,16 @@ class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyW
|
||||
/// @nodoc
|
||||
|
||||
class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
|
||||
const _$ChatRoomStateLoadedImpl({required this.chatRoom, required final List<ChatMessageModel> chatMessages, required this.isTyping, required this.isLoading})
|
||||
const _$ChatRoomStateLoadedImpl(
|
||||
{required this.chatRoom,
|
||||
required final List<ChatMessageModel> chatMessages,
|
||||
required this.isTyping,
|
||||
required this.isLoading})
|
||||
: _chatMessages = chatMessages;
|
||||
|
||||
@override
|
||||
final ChatRoomModel chatRoom;
|
||||
final List<ChatMessageModel> _chatMessages;
|
||||
|
||||
@override
|
||||
List<ChatMessageModel> get chatMessages {
|
||||
if (_chatMessages is EqualUnmodifiableListView) return _chatMessages;
|
||||
@@ -399,14 +441,19 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatRoomStateLoadedImpl &&
|
||||
(identical(other.chatRoom, chatRoom) || other.chatRoom == chatRoom) &&
|
||||
const DeepCollectionEquality().equals(other._chatMessages, _chatMessages) &&
|
||||
(identical(other.isTyping, isTyping) || other.isTyping == isTyping) &&
|
||||
(identical(other.isLoading, isLoading) || other.isLoading == isLoading));
|
||||
(identical(other.chatRoom, chatRoom) ||
|
||||
other.chatRoom == chatRoom) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._chatMessages, _chatMessages) &&
|
||||
(identical(other.isTyping, isTyping) ||
|
||||
other.isTyping == isTyping) &&
|
||||
(identical(other.isLoading, isLoading) ||
|
||||
other.isLoading == isLoading));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, chatRoom, const DeepCollectionEquality().hash(_chatMessages), isTyping, isLoading);
|
||||
int get hashCode => Object.hash(runtimeType, chatRoom,
|
||||
const DeepCollectionEquality().hash(_chatMessages), isTyping, isLoading);
|
||||
|
||||
/// Create a copy of ChatRoomState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -414,14 +461,17 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith =>
|
||||
__$$ChatRoomStateLoadedImplCopyWithImpl<_$ChatRoomStateLoadedImpl>(this, _$identity);
|
||||
__$$ChatRoomStateLoadedImplCopyWithImpl<_$ChatRoomStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading) loaded,
|
||||
required TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loaded(chatRoom, chatMessages, isTyping, isLoading);
|
||||
@@ -432,7 +482,9 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult? Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loaded?.call(chatRoom, chatMessages, isTyping, isLoading);
|
||||
@@ -443,7 +495,9 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -499,32 +553,33 @@ abstract class ChatRoomStateLoaded implements ChatRoomState {
|
||||
required final bool isLoading}) = _$ChatRoomStateLoadedImpl;
|
||||
|
||||
ChatRoomModel get chatRoom;
|
||||
|
||||
List<ChatMessageModel> get chatMessages;
|
||||
|
||||
bool get isTyping;
|
||||
|
||||
bool get isLoading;
|
||||
|
||||
/// Create a copy of ChatRoomState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomStateErrorImplCopyWith<$Res> {
|
||||
factory _$$ChatRoomStateErrorImplCopyWith(_$ChatRoomStateErrorImpl value, $Res Function(_$ChatRoomStateErrorImpl) then) =
|
||||
factory _$$ChatRoomStateErrorImplCopyWith(_$ChatRoomStateErrorImpl value,
|
||||
$Res Function(_$ChatRoomStateErrorImpl) then) =
|
||||
__$$ChatRoomStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomStateErrorImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateErrorImpl>
|
||||
class __$$ChatRoomStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateErrorImpl>
|
||||
implements _$$ChatRoomStateErrorImplCopyWith<$Res> {
|
||||
__$$ChatRoomStateErrorImplCopyWithImpl(_$ChatRoomStateErrorImpl _value, $Res Function(_$ChatRoomStateErrorImpl) _then) : super(_value, _then);
|
||||
__$$ChatRoomStateErrorImplCopyWithImpl(_$ChatRoomStateErrorImpl _value,
|
||||
$Res Function(_$ChatRoomStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatRoomState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -560,7 +615,8 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatRoomStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -572,14 +628,17 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith =>
|
||||
__$$ChatRoomStateErrorImplCopyWithImpl<_$ChatRoomStateErrorImpl>(this, _$identity);
|
||||
__$$ChatRoomStateErrorImplCopyWithImpl<_$ChatRoomStateErrorImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading) loaded,
|
||||
required TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return error(errorMessage);
|
||||
@@ -590,7 +649,9 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult? Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return error?.call(errorMessage);
|
||||
@@ -601,7 +662,9 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -650,12 +713,14 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
|
||||
}
|
||||
|
||||
abstract class ChatRoomStateError implements ChatRoomState {
|
||||
const factory ChatRoomStateError({required final String errorMessage}) = _$ChatRoomStateErrorImpl;
|
||||
const factory ChatRoomStateError({required final String errorMessage}) =
|
||||
_$ChatRoomStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
/// Create a copy of ChatRoomState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ mixin _$ChatSelectState {
|
||||
required TResult Function(List<ChatRoom> chatRooms) loaded,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
@@ -71,16 +70,18 @@ mixin _$ChatSelectState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatSelectStateCopyWith<$Res> {
|
||||
factory $ChatSelectStateCopyWith(ChatSelectState value, $Res Function(ChatSelectState) then) = _$ChatSelectStateCopyWithImpl<$Res, ChatSelectState>;
|
||||
factory $ChatSelectStateCopyWith(
|
||||
ChatSelectState value, $Res Function(ChatSelectState) then) =
|
||||
_$ChatSelectStateCopyWithImpl<$Res, ChatSelectState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatSelectStateCopyWithImpl<$Res, $Val extends ChatSelectState> implements $ChatSelectStateCopyWith<$Res> {
|
||||
class _$ChatSelectStateCopyWithImpl<$Res, $Val extends ChatSelectState>
|
||||
implements $ChatSelectStateCopyWith<$Res> {
|
||||
_$ChatSelectStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -90,13 +91,18 @@ class _$ChatSelectStateCopyWithImpl<$Res, $Val extends ChatSelectState> implemen
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatSelectStateImplCopyWith<$Res> {
|
||||
factory _$$ChatSelectStateImplCopyWith(_$ChatSelectStateImpl value, $Res Function(_$ChatSelectStateImpl) then) = __$$ChatSelectStateImplCopyWithImpl<$Res>;
|
||||
factory _$$ChatSelectStateImplCopyWith(_$ChatSelectStateImpl value,
|
||||
$Res Function(_$ChatSelectStateImpl) then) =
|
||||
__$$ChatSelectStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatSelectStateImplCopyWithImpl<$Res> extends _$ChatSelectStateCopyWithImpl<$Res, _$ChatSelectStateImpl>
|
||||
class __$$ChatSelectStateImplCopyWithImpl<$Res>
|
||||
extends _$ChatSelectStateCopyWithImpl<$Res, _$ChatSelectStateImpl>
|
||||
implements _$$ChatSelectStateImplCopyWith<$Res> {
|
||||
__$$ChatSelectStateImplCopyWithImpl(_$ChatSelectStateImpl _value, $Res Function(_$ChatSelectStateImpl) _then) : super(_value, _then);
|
||||
__$$ChatSelectStateImplCopyWithImpl(
|
||||
_$ChatSelectStateImpl _value, $Res Function(_$ChatSelectStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatSelectState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -114,7 +120,8 @@ class _$ChatSelectStateImpl implements _ChatSelectState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChatSelectStateImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$ChatSelectStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -201,14 +208,20 @@ abstract class _ChatSelectState implements ChatSelectState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatSelectStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$ChatSelectStateLoadingImplCopyWith(_$ChatSelectStateLoadingImpl value, $Res Function(_$ChatSelectStateLoadingImpl) then) =
|
||||
factory _$$ChatSelectStateLoadingImplCopyWith(
|
||||
_$ChatSelectStateLoadingImpl value,
|
||||
$Res Function(_$ChatSelectStateLoadingImpl) then) =
|
||||
__$$ChatSelectStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatSelectStateLoadingImplCopyWithImpl<$Res> extends _$ChatSelectStateCopyWithImpl<$Res, _$ChatSelectStateLoadingImpl>
|
||||
class __$$ChatSelectStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$ChatSelectStateCopyWithImpl<$Res, _$ChatSelectStateLoadingImpl>
|
||||
implements _$$ChatSelectStateLoadingImplCopyWith<$Res> {
|
||||
__$$ChatSelectStateLoadingImplCopyWithImpl(_$ChatSelectStateLoadingImpl _value, $Res Function(_$ChatSelectStateLoadingImpl) _then) : super(_value, _then);
|
||||
__$$ChatSelectStateLoadingImplCopyWithImpl(
|
||||
_$ChatSelectStateLoadingImpl _value,
|
||||
$Res Function(_$ChatSelectStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatSelectState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -226,7 +239,9 @@ class _$ChatSelectStateLoadingImpl implements ChatSelectStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChatSelectStateLoadingImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatSelectStateLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -313,17 +328,20 @@ abstract class ChatSelectStateLoading implements ChatSelectState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatSelectStateErrorImplCopyWith<$Res> {
|
||||
factory _$$ChatSelectStateErrorImplCopyWith(_$ChatSelectStateErrorImpl value, $Res Function(_$ChatSelectStateErrorImpl) then) =
|
||||
factory _$$ChatSelectStateErrorImplCopyWith(_$ChatSelectStateErrorImpl value,
|
||||
$Res Function(_$ChatSelectStateErrorImpl) then) =
|
||||
__$$ChatSelectStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatSelectStateErrorImplCopyWithImpl<$Res> extends _$ChatSelectStateCopyWithImpl<$Res, _$ChatSelectStateErrorImpl>
|
||||
class __$$ChatSelectStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$ChatSelectStateCopyWithImpl<$Res, _$ChatSelectStateErrorImpl>
|
||||
implements _$$ChatSelectStateErrorImplCopyWith<$Res> {
|
||||
__$$ChatSelectStateErrorImplCopyWithImpl(_$ChatSelectStateErrorImpl _value, $Res Function(_$ChatSelectStateErrorImpl) _then) : super(_value, _then);
|
||||
__$$ChatSelectStateErrorImplCopyWithImpl(_$ChatSelectStateErrorImpl _value,
|
||||
$Res Function(_$ChatSelectStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatSelectState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -359,7 +377,8 @@ class _$ChatSelectStateErrorImpl implements ChatSelectStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatSelectStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -370,8 +389,10 @@ class _$ChatSelectStateErrorImpl implements ChatSelectStateError {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatSelectStateErrorImplCopyWith<_$ChatSelectStateErrorImpl> get copyWith =>
|
||||
__$$ChatSelectStateErrorImplCopyWithImpl<_$ChatSelectStateErrorImpl>(this, _$identity);
|
||||
_$$ChatSelectStateErrorImplCopyWith<_$ChatSelectStateErrorImpl>
|
||||
get copyWith =>
|
||||
__$$ChatSelectStateErrorImplCopyWithImpl<_$ChatSelectStateErrorImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -449,29 +470,35 @@ class _$ChatSelectStateErrorImpl implements ChatSelectStateError {
|
||||
}
|
||||
|
||||
abstract class ChatSelectStateError implements ChatSelectState {
|
||||
const factory ChatSelectStateError({required final String errorMessage}) = _$ChatSelectStateErrorImpl;
|
||||
const factory ChatSelectStateError({required final String errorMessage}) =
|
||||
_$ChatSelectStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
/// Create a copy of ChatSelectState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ChatSelectStateErrorImplCopyWith<_$ChatSelectStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$ChatSelectStateErrorImplCopyWith<_$ChatSelectStateErrorImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatSelectStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$ChatSelectStateLoadedImplCopyWith(_$ChatSelectStateLoadedImpl value, $Res Function(_$ChatSelectStateLoadedImpl) then) =
|
||||
factory _$$ChatSelectStateLoadedImplCopyWith(
|
||||
_$ChatSelectStateLoadedImpl value,
|
||||
$Res Function(_$ChatSelectStateLoadedImpl) then) =
|
||||
__$$ChatSelectStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({List<ChatRoom> chatRooms});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatSelectStateLoadedImplCopyWithImpl<$Res> extends _$ChatSelectStateCopyWithImpl<$Res, _$ChatSelectStateLoadedImpl>
|
||||
class __$$ChatSelectStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$ChatSelectStateCopyWithImpl<$Res, _$ChatSelectStateLoadedImpl>
|
||||
implements _$$ChatSelectStateLoadedImplCopyWith<$Res> {
|
||||
__$$ChatSelectStateLoadedImplCopyWithImpl(_$ChatSelectStateLoadedImpl _value, $Res Function(_$ChatSelectStateLoadedImpl) _then) : super(_value, _then);
|
||||
__$$ChatSelectStateLoadedImplCopyWithImpl(_$ChatSelectStateLoadedImpl _value,
|
||||
$Res Function(_$ChatSelectStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatSelectState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -492,10 +519,10 @@ class __$$ChatSelectStateLoadedImplCopyWithImpl<$Res> extends _$ChatSelectStateC
|
||||
/// @nodoc
|
||||
|
||||
class _$ChatSelectStateLoadedImpl implements ChatSelectStateLoaded {
|
||||
const _$ChatSelectStateLoadedImpl({required final List<ChatRoom> chatRooms}) : _chatRooms = chatRooms;
|
||||
const _$ChatSelectStateLoadedImpl({required final List<ChatRoom> chatRooms})
|
||||
: _chatRooms = chatRooms;
|
||||
|
||||
final List<ChatRoom> _chatRooms;
|
||||
|
||||
@override
|
||||
List<ChatRoom> get chatRooms {
|
||||
if (_chatRooms is EqualUnmodifiableListView) return _chatRooms;
|
||||
@@ -511,19 +538,24 @@ class _$ChatSelectStateLoadedImpl implements ChatSelectStateLoaded {
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$ChatSelectStateLoadedImpl && const DeepCollectionEquality().equals(other._chatRooms, _chatRooms));
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatSelectStateLoadedImpl &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._chatRooms, _chatRooms));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_chatRooms));
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, const DeepCollectionEquality().hash(_chatRooms));
|
||||
|
||||
/// Create a copy of ChatSelectState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatSelectStateLoadedImplCopyWith<_$ChatSelectStateLoadedImpl> get copyWith =>
|
||||
__$$ChatSelectStateLoadedImplCopyWithImpl<_$ChatSelectStateLoadedImpl>(this, _$identity);
|
||||
_$$ChatSelectStateLoadedImplCopyWith<_$ChatSelectStateLoadedImpl>
|
||||
get copyWith => __$$ChatSelectStateLoadedImplCopyWithImpl<
|
||||
_$ChatSelectStateLoadedImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -601,12 +633,14 @@ class _$ChatSelectStateLoadedImpl implements ChatSelectStateLoaded {
|
||||
}
|
||||
|
||||
abstract class ChatSelectStateLoaded implements ChatSelectState {
|
||||
const factory ChatSelectStateLoaded({required final List<ChatRoom> chatRooms}) = _$ChatSelectStateLoadedImpl;
|
||||
const factory ChatSelectStateLoaded(
|
||||
{required final List<ChatRoom> chatRooms}) = _$ChatSelectStateLoadedImpl;
|
||||
|
||||
List<ChatRoom> get chatRooms;
|
||||
|
||||
/// Create a copy of ChatSelectState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ChatSelectStateLoadedImplCopyWith<_$ChatSelectStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$ChatSelectStateLoadedImplCopyWith<_$ChatSelectStateLoadedImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -80,7 +80,8 @@ class _ChatService implements ChatService {
|
||||
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
|
||||
late Map<String, ChatRoomModel> _value;
|
||||
try {
|
||||
_value = _result.data!.map((k, dynamic v) => MapEntry(k, ChatRoomModel.fromJson(v as Map<String, dynamic>)));
|
||||
_value = _result.data!.map((k, dynamic v) =>
|
||||
MapEntry(k, ChatRoomModel.fromJson(v as Map<String, dynamic>)));
|
||||
} on Object catch (e, s) {
|
||||
errorLogger?.logError(e, s, _options);
|
||||
rethrow;
|
||||
@@ -198,7 +199,9 @@ class _ChatService implements ChatService {
|
||||
}
|
||||
|
||||
RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
|
||||
if (T != dynamic && !(requestOptions.responseType == ResponseType.bytes || requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T != dynamic &&
|
||||
!(requestOptions.responseType == ResponseType.bytes ||
|
||||
requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T == String) {
|
||||
requestOptions.responseType = ResponseType.plain;
|
||||
} else {
|
||||
|
||||
@@ -21,19 +21,12 @@ DiaryModel _$DiaryModelFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$DiaryModel {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
DateTime get date => throw _privateConstructorUsedError;
|
||||
|
||||
int get closed => throw _privateConstructorUsedError;
|
||||
|
||||
List<Meal> get meals => throw _privateConstructorUsedError;
|
||||
|
||||
State get state => throw _privateConstructorUsedError;
|
||||
|
||||
String? get comment => throw _privateConstructorUsedError;
|
||||
|
||||
DateTime? get wakeup => throw _privateConstructorUsedError;
|
||||
|
||||
DateTime? get retire => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this DiaryModel to a JSON map.
|
||||
@@ -42,26 +35,36 @@ mixin _$DiaryModel {
|
||||
/// Create a copy of DiaryModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$DiaryModelCopyWith<DiaryModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$DiaryModelCopyWith<DiaryModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $DiaryModelCopyWith<$Res> {
|
||||
factory $DiaryModelCopyWith(DiaryModel value, $Res Function(DiaryModel) then) = _$DiaryModelCopyWithImpl<$Res, DiaryModel>;
|
||||
|
||||
factory $DiaryModelCopyWith(
|
||||
DiaryModel value, $Res Function(DiaryModel) then) =
|
||||
_$DiaryModelCopyWithImpl<$Res, DiaryModel>;
|
||||
@useResult
|
||||
$Res call({int id, DateTime date, int closed, List<Meal> meals, State state, String? comment, DateTime? wakeup, DateTime? retire});
|
||||
$Res call(
|
||||
{int id,
|
||||
DateTime date,
|
||||
int closed,
|
||||
List<Meal> meals,
|
||||
State state,
|
||||
String? comment,
|
||||
DateTime? wakeup,
|
||||
DateTime? retire});
|
||||
|
||||
$StateCopyWith<$Res> get state;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$DiaryModelCopyWithImpl<$Res, $Val extends DiaryModel> implements $DiaryModelCopyWith<$Res> {
|
||||
class _$DiaryModelCopyWithImpl<$Res, $Val extends DiaryModel>
|
||||
implements $DiaryModelCopyWith<$Res> {
|
||||
_$DiaryModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -127,20 +130,34 @@ class _$DiaryModelCopyWithImpl<$Res, $Val extends DiaryModel> implements $DiaryM
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DiaryModelImplCopyWith<$Res> implements $DiaryModelCopyWith<$Res> {
|
||||
factory _$$DiaryModelImplCopyWith(_$DiaryModelImpl value, $Res Function(_$DiaryModelImpl) then) = __$$DiaryModelImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$DiaryModelImplCopyWith<$Res>
|
||||
implements $DiaryModelCopyWith<$Res> {
|
||||
factory _$$DiaryModelImplCopyWith(
|
||||
_$DiaryModelImpl value, $Res Function(_$DiaryModelImpl) then) =
|
||||
__$$DiaryModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int id, DateTime date, int closed, List<Meal> meals, State state, String? comment, DateTime? wakeup, DateTime? retire});
|
||||
$Res call(
|
||||
{int id,
|
||||
DateTime date,
|
||||
int closed,
|
||||
List<Meal> meals,
|
||||
State state,
|
||||
String? comment,
|
||||
DateTime? wakeup,
|
||||
DateTime? retire});
|
||||
|
||||
@override
|
||||
$StateCopyWith<$Res> get state;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DiaryModelImplCopyWithImpl<$Res> extends _$DiaryModelCopyWithImpl<$Res, _$DiaryModelImpl> implements _$$DiaryModelImplCopyWith<$Res> {
|
||||
__$$DiaryModelImplCopyWithImpl(_$DiaryModelImpl _value, $Res Function(_$DiaryModelImpl) _then) : super(_value, _then);
|
||||
class __$$DiaryModelImplCopyWithImpl<$Res>
|
||||
extends _$DiaryModelCopyWithImpl<$Res, _$DiaryModelImpl>
|
||||
implements _$$DiaryModelImplCopyWith<$Res> {
|
||||
__$$DiaryModelImplCopyWithImpl(
|
||||
_$DiaryModelImpl _value, $Res Function(_$DiaryModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DiaryModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -207,7 +224,8 @@ class _$DiaryModelImpl implements _DiaryModel {
|
||||
this.retire})
|
||||
: _meals = meals;
|
||||
|
||||
factory _$DiaryModelImpl.fromJson(Map<String, dynamic> json) => _$$DiaryModelImplFromJson(json);
|
||||
factory _$DiaryModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$DiaryModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -216,7 +234,6 @@ class _$DiaryModelImpl implements _DiaryModel {
|
||||
@override
|
||||
final int closed;
|
||||
final List<Meal> _meals;
|
||||
|
||||
@override
|
||||
List<Meal> get meals {
|
||||
if (_meals is EqualUnmodifiableListView) return _meals;
|
||||
@@ -255,14 +272,24 @@ class _$DiaryModelImpl implements _DiaryModel {
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, date, closed, const DeepCollectionEquality().hash(_meals), state, comment, wakeup, retire);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
date,
|
||||
closed,
|
||||
const DeepCollectionEquality().hash(_meals),
|
||||
state,
|
||||
comment,
|
||||
wakeup,
|
||||
retire);
|
||||
|
||||
/// Create a copy of DiaryModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith => __$$DiaryModelImplCopyWithImpl<_$DiaryModelImpl>(this, _$identity);
|
||||
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith =>
|
||||
__$$DiaryModelImplCopyWithImpl<_$DiaryModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -283,29 +310,23 @@ abstract class _DiaryModel implements DiaryModel {
|
||||
final DateTime? wakeup,
|
||||
final DateTime? retire}) = _$DiaryModelImpl;
|
||||
|
||||
factory _DiaryModel.fromJson(Map<String, dynamic> json) = _$DiaryModelImpl.fromJson;
|
||||
factory _DiaryModel.fromJson(Map<String, dynamic> json) =
|
||||
_$DiaryModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
DateTime get date;
|
||||
|
||||
@override
|
||||
int get closed;
|
||||
|
||||
@override
|
||||
List<Meal> get meals;
|
||||
|
||||
@override
|
||||
State get state;
|
||||
|
||||
@override
|
||||
String? get comment;
|
||||
|
||||
@override
|
||||
DateTime? get wakeup;
|
||||
|
||||
@override
|
||||
DateTime? get retire;
|
||||
|
||||
@@ -313,5 +334,6 @@ abstract class _DiaryModel implements DiaryModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,18 +6,26 @@ part of 'diary_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$DiaryModelImpl _$$DiaryModelImplFromJson(Map<String, dynamic> json) => _$DiaryModelImpl(
|
||||
_$DiaryModelImpl _$$DiaryModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$DiaryModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
date: DateTime.parse(json['date'] as String),
|
||||
closed: (json['closed'] as num).toInt(),
|
||||
meals: (json['meals'] as List<dynamic>).map((e) => Meal.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
meals: (json['meals'] as List<dynamic>)
|
||||
.map((e) => Meal.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
state: State.fromJson(json['state'] as Map<String, dynamic>),
|
||||
comment: json['comment'] as String?,
|
||||
wakeup: json['wakeup'] == null ? null : DateTime.parse(json['wakeup'] as String),
|
||||
retire: json['retire'] == null ? null : DateTime.parse(json['retire'] as String),
|
||||
wakeup: json['wakeup'] == null
|
||||
? null
|
||||
: DateTime.parse(json['wakeup'] as String),
|
||||
retire: json['retire'] == null
|
||||
? null
|
||||
: DateTime.parse(json['retire'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DiaryModelImplToJson(_$DiaryModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$DiaryModelImplToJson(_$DiaryModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'date': instance.date.toIso8601String(),
|
||||
'closed': instance.closed,
|
||||
|
||||
@@ -21,17 +21,11 @@ Meal _$MealFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Meal {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get time => throw _privateConstructorUsedError;
|
||||
|
||||
int get type => throw _privateConstructorUsedError;
|
||||
|
||||
int get satiety => throw _privateConstructorUsedError;
|
||||
|
||||
int get mood => throw _privateConstructorUsedError;
|
||||
|
||||
List<Portion> get portions => throw _privateConstructorUsedError;
|
||||
|
||||
List<Photo> get photos => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Meal to a JSON map.
|
||||
@@ -45,19 +39,26 @@ mixin _$Meal {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $MealCopyWith<$Res> {
|
||||
factory $MealCopyWith(Meal value, $Res Function(Meal) then) = _$MealCopyWithImpl<$Res, Meal>;
|
||||
|
||||
factory $MealCopyWith(Meal value, $Res Function(Meal) then) =
|
||||
_$MealCopyWithImpl<$Res, Meal>;
|
||||
@useResult
|
||||
$Res call({int id, String time, int type, int satiety, int mood, List<Portion> portions, List<Photo> photos});
|
||||
$Res call(
|
||||
{int id,
|
||||
String time,
|
||||
int type,
|
||||
int satiety,
|
||||
int mood,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$MealCopyWithImpl<$Res, $Val extends Meal> implements $MealCopyWith<$Res> {
|
||||
class _$MealCopyWithImpl<$Res, $Val extends Meal>
|
||||
implements $MealCopyWith<$Res> {
|
||||
_$MealCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -109,16 +110,27 @@ class _$MealCopyWithImpl<$Res, $Val extends Meal> implements $MealCopyWith<$Res>
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$MealImplCopyWith<$Res> implements $MealCopyWith<$Res> {
|
||||
factory _$$MealImplCopyWith(_$MealImpl value, $Res Function(_$MealImpl) then) = __$$MealImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$MealImplCopyWith(
|
||||
_$MealImpl value, $Res Function(_$MealImpl) then) =
|
||||
__$$MealImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int id, String time, int type, int satiety, int mood, List<Portion> portions, List<Photo> photos});
|
||||
$Res call(
|
||||
{int id,
|
||||
String time,
|
||||
int type,
|
||||
int satiety,
|
||||
int mood,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$MealImplCopyWithImpl<$Res> extends _$MealCopyWithImpl<$Res, _$MealImpl> implements _$$MealImplCopyWith<$Res> {
|
||||
__$$MealImplCopyWithImpl(_$MealImpl _value, $Res Function(_$MealImpl) _then) : super(_value, _then);
|
||||
class __$$MealImplCopyWithImpl<$Res>
|
||||
extends _$MealCopyWithImpl<$Res, _$MealImpl>
|
||||
implements _$$MealImplCopyWith<$Res> {
|
||||
__$$MealImplCopyWithImpl(_$MealImpl _value, $Res Function(_$MealImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Meal
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -180,7 +192,8 @@ class _$MealImpl implements _Meal {
|
||||
: _portions = portions,
|
||||
_photos = photos;
|
||||
|
||||
factory _$MealImpl.fromJson(Map<String, dynamic> json) => _$$MealImplFromJson(json);
|
||||
factory _$MealImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$MealImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -193,7 +206,6 @@ class _$MealImpl implements _Meal {
|
||||
@override
|
||||
final int mood;
|
||||
final List<Portion> _portions;
|
||||
|
||||
@override
|
||||
List<Portion> get portions {
|
||||
if (_portions is EqualUnmodifiableListView) return _portions;
|
||||
@@ -202,7 +214,6 @@ class _$MealImpl implements _Meal {
|
||||
}
|
||||
|
||||
final List<Photo> _photos;
|
||||
|
||||
@override
|
||||
List<Photo> get photos {
|
||||
if (_photos is EqualUnmodifiableListView) return _photos;
|
||||
@@ -231,15 +242,23 @@ class _$MealImpl implements _Meal {
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, id, time, type, satiety, mood, const DeepCollectionEquality().hash(_portions), const DeepCollectionEquality().hash(_photos));
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
time,
|
||||
type,
|
||||
satiety,
|
||||
mood,
|
||||
const DeepCollectionEquality().hash(_portions),
|
||||
const DeepCollectionEquality().hash(_photos));
|
||||
|
||||
/// Create a copy of Meal
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$MealImplCopyWith<_$MealImpl> get copyWith => __$$MealImplCopyWithImpl<_$MealImpl>(this, _$identity);
|
||||
_$$MealImplCopyWith<_$MealImpl> get copyWith =>
|
||||
__$$MealImplCopyWithImpl<_$MealImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -263,22 +282,16 @@ abstract class _Meal implements Meal {
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
String get time;
|
||||
|
||||
@override
|
||||
int get type;
|
||||
|
||||
@override
|
||||
int get satiety;
|
||||
|
||||
@override
|
||||
int get mood;
|
||||
|
||||
@override
|
||||
List<Portion> get portions;
|
||||
|
||||
@override
|
||||
List<Photo> get photos;
|
||||
|
||||
@@ -286,5 +299,6 @@ abstract class _Meal implements Meal {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$MealImplCopyWith<_$MealImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$MealImplCopyWith<_$MealImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -12,11 +12,16 @@ _$MealImpl _$$MealImplFromJson(Map<String, dynamic> json) => _$MealImpl(
|
||||
type: (json['type'] as num).toInt(),
|
||||
satiety: (json['satiety'] as num).toInt(),
|
||||
mood: (json['mood'] as num).toInt(),
|
||||
portions: (json['portions'] as List<dynamic>).map((e) => Portion.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
photos: (json['photos'] as List<dynamic>).map((e) => Photo.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
portions: (json['portions'] as List<dynamic>)
|
||||
.map((e) => Portion.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
photos: (json['photos'] as List<dynamic>)
|
||||
.map((e) => Photo.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$MealImplToJson(_$MealImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$MealImplToJson(_$MealImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'time': instance.time,
|
||||
'type': instance.type,
|
||||
|
||||
@@ -21,10 +21,8 @@ Photo _$PhotoFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Photo {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'original_name')
|
||||
String get originalName => throw _privateConstructorUsedError;
|
||||
|
||||
String get path => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Photo to a JSON map.
|
||||
@@ -38,19 +36,22 @@ mixin _$Photo {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $PhotoCopyWith<$Res> {
|
||||
factory $PhotoCopyWith(Photo value, $Res Function(Photo) then) = _$PhotoCopyWithImpl<$Res, Photo>;
|
||||
|
||||
factory $PhotoCopyWith(Photo value, $Res Function(Photo) then) =
|
||||
_$PhotoCopyWithImpl<$Res, Photo>;
|
||||
@useResult
|
||||
$Res call({int id, @JsonKey(name: 'original_name') String originalName, String path});
|
||||
$Res call(
|
||||
{int id,
|
||||
@JsonKey(name: 'original_name') String originalName,
|
||||
String path});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$PhotoCopyWithImpl<$Res, $Val extends Photo> implements $PhotoCopyWith<$Res> {
|
||||
class _$PhotoCopyWithImpl<$Res, $Val extends Photo>
|
||||
implements $PhotoCopyWith<$Res> {
|
||||
_$PhotoCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -82,16 +83,24 @@ class _$PhotoCopyWithImpl<$Res, $Val extends Photo> implements $PhotoCopyWith<$R
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$PhotoImplCopyWith<$Res> implements $PhotoCopyWith<$Res> {
|
||||
factory _$$PhotoImplCopyWith(_$PhotoImpl value, $Res Function(_$PhotoImpl) then) = __$$PhotoImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$PhotoImplCopyWith(
|
||||
_$PhotoImpl value, $Res Function(_$PhotoImpl) then) =
|
||||
__$$PhotoImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int id, @JsonKey(name: 'original_name') String originalName, String path});
|
||||
$Res call(
|
||||
{int id,
|
||||
@JsonKey(name: 'original_name') String originalName,
|
||||
String path});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$PhotoImplCopyWithImpl<$Res> extends _$PhotoCopyWithImpl<$Res, _$PhotoImpl> implements _$$PhotoImplCopyWith<$Res> {
|
||||
__$$PhotoImplCopyWithImpl(_$PhotoImpl _value, $Res Function(_$PhotoImpl) _then) : super(_value, _then);
|
||||
class __$$PhotoImplCopyWithImpl<$Res>
|
||||
extends _$PhotoCopyWithImpl<$Res, _$PhotoImpl>
|
||||
implements _$$PhotoImplCopyWith<$Res> {
|
||||
__$$PhotoImplCopyWithImpl(
|
||||
_$PhotoImpl _value, $Res Function(_$PhotoImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Photo
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -122,9 +131,13 @@ class __$$PhotoImplCopyWithImpl<$Res> extends _$PhotoCopyWithImpl<$Res, _$PhotoI
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$PhotoImpl implements _Photo {
|
||||
const _$PhotoImpl({required this.id, @JsonKey(name: 'original_name') required this.originalName, required this.path});
|
||||
const _$PhotoImpl(
|
||||
{required this.id,
|
||||
@JsonKey(name: 'original_name') required this.originalName,
|
||||
required this.path});
|
||||
|
||||
factory _$PhotoImpl.fromJson(Map<String, dynamic> json) => _$$PhotoImplFromJson(json);
|
||||
factory _$PhotoImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$PhotoImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -145,7 +158,8 @@ class _$PhotoImpl implements _Photo {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$PhotoImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.originalName, originalName) || other.originalName == originalName) &&
|
||||
(identical(other.originalName, originalName) ||
|
||||
other.originalName == originalName) &&
|
||||
(identical(other.path, path) || other.path == path));
|
||||
}
|
||||
|
||||
@@ -158,7 +172,8 @@ class _$PhotoImpl implements _Photo {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith => __$$PhotoImplCopyWithImpl<_$PhotoImpl>(this, _$identity);
|
||||
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith =>
|
||||
__$$PhotoImplCopyWithImpl<_$PhotoImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -169,17 +184,18 @@ class _$PhotoImpl implements _Photo {
|
||||
}
|
||||
|
||||
abstract class _Photo implements Photo {
|
||||
const factory _Photo({required final int id, @JsonKey(name: 'original_name') required final String originalName, required final String path}) = _$PhotoImpl;
|
||||
const factory _Photo(
|
||||
{required final int id,
|
||||
@JsonKey(name: 'original_name') required final String originalName,
|
||||
required final String path}) = _$PhotoImpl;
|
||||
|
||||
factory _Photo.fromJson(Map<String, dynamic> json) = _$PhotoImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'original_name')
|
||||
String get originalName;
|
||||
|
||||
@override
|
||||
String get path;
|
||||
|
||||
@@ -187,5 +203,6 @@ abstract class _Photo implements Photo {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@ _$PhotoImpl _$$PhotoImplFromJson(Map<String, dynamic> json) => _$PhotoImpl(
|
||||
path: json['path'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$PhotoImplToJson(_$PhotoImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$PhotoImplToJson(_$PhotoImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'original_name': instance.originalName,
|
||||
'path': instance.path,
|
||||
|
||||
@@ -21,13 +21,9 @@ Portion _$PortionFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Portion {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get product_name => throw _privateConstructorUsedError;
|
||||
|
||||
int get quantity => throw _privateConstructorUsedError;
|
||||
|
||||
String get portion => throw _privateConstructorUsedError;
|
||||
|
||||
bool get from_diet => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Portion to a JSON map.
|
||||
@@ -41,19 +37,24 @@ mixin _$Portion {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $PortionCopyWith<$Res> {
|
||||
factory $PortionCopyWith(Portion value, $Res Function(Portion) then) = _$PortionCopyWithImpl<$Res, Portion>;
|
||||
|
||||
factory $PortionCopyWith(Portion value, $Res Function(Portion) then) =
|
||||
_$PortionCopyWithImpl<$Res, Portion>;
|
||||
@useResult
|
||||
$Res call({int id, String product_name, int quantity, String portion, bool from_diet});
|
||||
$Res call(
|
||||
{int id,
|
||||
String product_name,
|
||||
int quantity,
|
||||
String portion,
|
||||
bool from_diet});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$PortionCopyWithImpl<$Res, $Val extends Portion> implements $PortionCopyWith<$Res> {
|
||||
class _$PortionCopyWithImpl<$Res, $Val extends Portion>
|
||||
implements $PortionCopyWith<$Res> {
|
||||
_$PortionCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -95,16 +96,26 @@ class _$PortionCopyWithImpl<$Res, $Val extends Portion> implements $PortionCopyW
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$PortionImplCopyWith<$Res> implements $PortionCopyWith<$Res> {
|
||||
factory _$$PortionImplCopyWith(_$PortionImpl value, $Res Function(_$PortionImpl) then) = __$$PortionImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$PortionImplCopyWith(
|
||||
_$PortionImpl value, $Res Function(_$PortionImpl) then) =
|
||||
__$$PortionImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int id, String product_name, int quantity, String portion, bool from_diet});
|
||||
$Res call(
|
||||
{int id,
|
||||
String product_name,
|
||||
int quantity,
|
||||
String portion,
|
||||
bool from_diet});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$PortionImplCopyWithImpl<$Res> extends _$PortionCopyWithImpl<$Res, _$PortionImpl> implements _$$PortionImplCopyWith<$Res> {
|
||||
__$$PortionImplCopyWithImpl(_$PortionImpl _value, $Res Function(_$PortionImpl) _then) : super(_value, _then);
|
||||
class __$$PortionImplCopyWithImpl<$Res>
|
||||
extends _$PortionCopyWithImpl<$Res, _$PortionImpl>
|
||||
implements _$$PortionImplCopyWith<$Res> {
|
||||
__$$PortionImplCopyWithImpl(
|
||||
_$PortionImpl _value, $Res Function(_$PortionImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Portion
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -145,9 +156,15 @@ class __$$PortionImplCopyWithImpl<$Res> extends _$PortionCopyWithImpl<$Res, _$Po
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$PortionImpl implements _Portion {
|
||||
const _$PortionImpl({required this.id, required this.product_name, required this.quantity, required this.portion, required this.from_diet});
|
||||
const _$PortionImpl(
|
||||
{required this.id,
|
||||
required this.product_name,
|
||||
required this.quantity,
|
||||
required this.portion,
|
||||
required this.from_diet});
|
||||
|
||||
factory _$PortionImpl.fromJson(Map<String, dynamic> json) => _$$PortionImplFromJson(json);
|
||||
factory _$PortionImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$PortionImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -171,22 +188,27 @@ class _$PortionImpl implements _Portion {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$PortionImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.product_name, product_name) || other.product_name == product_name) &&
|
||||
(identical(other.quantity, quantity) || other.quantity == quantity) &&
|
||||
(identical(other.product_name, product_name) ||
|
||||
other.product_name == product_name) &&
|
||||
(identical(other.quantity, quantity) ||
|
||||
other.quantity == quantity) &&
|
||||
(identical(other.portion, portion) || other.portion == portion) &&
|
||||
(identical(other.from_diet, from_diet) || other.from_diet == from_diet));
|
||||
(identical(other.from_diet, from_diet) ||
|
||||
other.from_diet == from_diet));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, product_name, quantity, portion, from_diet);
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, id, product_name, quantity, portion, from_diet);
|
||||
|
||||
/// Create a copy of Portion
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$PortionImplCopyWith<_$PortionImpl> get copyWith => __$$PortionImplCopyWithImpl<_$PortionImpl>(this, _$identity);
|
||||
_$$PortionImplCopyWith<_$PortionImpl> get copyWith =>
|
||||
__$$PortionImplCopyWithImpl<_$PortionImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -208,16 +230,12 @@ abstract class _Portion implements Portion {
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
String get product_name;
|
||||
|
||||
@override
|
||||
int get quantity;
|
||||
|
||||
@override
|
||||
String get portion;
|
||||
|
||||
@override
|
||||
bool get from_diet;
|
||||
|
||||
@@ -225,5 +243,6 @@ abstract class _Portion implements Portion {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$PortionImplCopyWith<_$PortionImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$PortionImplCopyWith<_$PortionImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,8 @@ part of 'portion.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$PortionImpl _$$PortionImplFromJson(Map<String, dynamic> json) => _$PortionImpl(
|
||||
_$PortionImpl _$$PortionImplFromJson(Map<String, dynamic> json) =>
|
||||
_$PortionImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
product_name: json['product_name'] as String,
|
||||
quantity: (json['quantity'] as num).toInt(),
|
||||
@@ -14,7 +15,8 @@ _$PortionImpl _$$PortionImplFromJson(Map<String, dynamic> json) => _$PortionImpl
|
||||
from_diet: json['from_diet'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$PortionImplToJson(_$PortionImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$PortionImplToJson(_$PortionImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'product_name': instance.product_name,
|
||||
'quantity': instance.quantity,
|
||||
|
||||
@@ -21,7 +21,6 @@ Product _$ProductFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Product {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Product to a JSON map.
|
||||
@@ -35,19 +34,19 @@ mixin _$Product {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ProductCopyWith<$Res> {
|
||||
factory $ProductCopyWith(Product value, $Res Function(Product) then) = _$ProductCopyWithImpl<$Res, Product>;
|
||||
|
||||
factory $ProductCopyWith(Product value, $Res Function(Product) then) =
|
||||
_$ProductCopyWithImpl<$Res, Product>;
|
||||
@useResult
|
||||
$Res call({int id, String name});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ProductCopyWithImpl<$Res, $Val extends Product> implements $ProductCopyWith<$Res> {
|
||||
class _$ProductCopyWithImpl<$Res, $Val extends Product>
|
||||
implements $ProductCopyWith<$Res> {
|
||||
_$ProductCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -74,16 +73,21 @@ class _$ProductCopyWithImpl<$Res, $Val extends Product> implements $ProductCopyW
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ProductImplCopyWith<$Res> implements $ProductCopyWith<$Res> {
|
||||
factory _$$ProductImplCopyWith(_$ProductImpl value, $Res Function(_$ProductImpl) then) = __$$ProductImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$ProductImplCopyWith(
|
||||
_$ProductImpl value, $Res Function(_$ProductImpl) then) =
|
||||
__$$ProductImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int id, String name});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ProductImplCopyWithImpl<$Res> extends _$ProductCopyWithImpl<$Res, _$ProductImpl> implements _$$ProductImplCopyWith<$Res> {
|
||||
__$$ProductImplCopyWithImpl(_$ProductImpl _value, $Res Function(_$ProductImpl) _then) : super(_value, _then);
|
||||
class __$$ProductImplCopyWithImpl<$Res>
|
||||
extends _$ProductCopyWithImpl<$Res, _$ProductImpl>
|
||||
implements _$$ProductImplCopyWith<$Res> {
|
||||
__$$ProductImplCopyWithImpl(
|
||||
_$ProductImpl _value, $Res Function(_$ProductImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Product
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -111,7 +115,8 @@ class __$$ProductImplCopyWithImpl<$Res> extends _$ProductCopyWithImpl<$Res, _$Pr
|
||||
class _$ProductImpl implements _Product {
|
||||
const _$ProductImpl({required this.id, required this.name});
|
||||
|
||||
factory _$ProductImpl.fromJson(Map<String, dynamic> json) => _$$ProductImplFromJson(json);
|
||||
factory _$ProductImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ProductImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -141,7 +146,8 @@ class _$ProductImpl implements _Product {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ProductImplCopyWith<_$ProductImpl> get copyWith => __$$ProductImplCopyWithImpl<_$ProductImpl>(this, _$identity);
|
||||
_$$ProductImplCopyWith<_$ProductImpl> get copyWith =>
|
||||
__$$ProductImplCopyWithImpl<_$ProductImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -152,13 +158,13 @@ class _$ProductImpl implements _Product {
|
||||
}
|
||||
|
||||
abstract class _Product implements Product {
|
||||
const factory _Product({required final int id, required final String name}) = _$ProductImpl;
|
||||
const factory _Product({required final int id, required final String name}) =
|
||||
_$ProductImpl;
|
||||
|
||||
factory _Product.fromJson(Map<String, dynamic> json) = _$ProductImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
String get name;
|
||||
|
||||
@@ -166,5 +172,6 @@ abstract class _Product implements Product {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ProductImplCopyWith<_$ProductImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$ProductImplCopyWith<_$ProductImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,12 +6,14 @@ part of 'product.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ProductImpl _$$ProductImplFromJson(Map<String, dynamic> json) => _$ProductImpl(
|
||||
_$ProductImpl _$$ProductImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ProductImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
name: json['name'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ProductImplToJson(_$ProductImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$ProductImplToJson(_$ProductImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
@@ -21,7 +21,6 @@ State _$StateFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$State {
|
||||
bool get has_chosen_diet => throw _privateConstructorUsedError;
|
||||
|
||||
bool get has_chosen_plan => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this State to a JSON map.
|
||||
@@ -35,19 +34,19 @@ mixin _$State {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $StateCopyWith<$Res> {
|
||||
factory $StateCopyWith(State value, $Res Function(State) then) = _$StateCopyWithImpl<$Res, State>;
|
||||
|
||||
factory $StateCopyWith(State value, $Res Function(State) then) =
|
||||
_$StateCopyWithImpl<$Res, State>;
|
||||
@useResult
|
||||
$Res call({bool has_chosen_diet, bool has_chosen_plan});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$StateCopyWithImpl<$Res, $Val extends State> implements $StateCopyWith<$Res> {
|
||||
class _$StateCopyWithImpl<$Res, $Val extends State>
|
||||
implements $StateCopyWith<$Res> {
|
||||
_$StateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -74,16 +73,21 @@ class _$StateCopyWithImpl<$Res, $Val extends State> implements $StateCopyWith<$R
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$StateImplCopyWith<$Res> implements $StateCopyWith<$Res> {
|
||||
factory _$$StateImplCopyWith(_$StateImpl value, $Res Function(_$StateImpl) then) = __$$StateImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$StateImplCopyWith(
|
||||
_$StateImpl value, $Res Function(_$StateImpl) then) =
|
||||
__$$StateImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({bool has_chosen_diet, bool has_chosen_plan});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$StateImplCopyWithImpl<$Res> extends _$StateCopyWithImpl<$Res, _$StateImpl> implements _$$StateImplCopyWith<$Res> {
|
||||
__$$StateImplCopyWithImpl(_$StateImpl _value, $Res Function(_$StateImpl) _then) : super(_value, _then);
|
||||
class __$$StateImplCopyWithImpl<$Res>
|
||||
extends _$StateCopyWithImpl<$Res, _$StateImpl>
|
||||
implements _$$StateImplCopyWith<$Res> {
|
||||
__$$StateImplCopyWithImpl(
|
||||
_$StateImpl _value, $Res Function(_$StateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of State
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -109,9 +113,11 @@ class __$$StateImplCopyWithImpl<$Res> extends _$StateCopyWithImpl<$Res, _$StateI
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$StateImpl implements _State {
|
||||
const _$StateImpl({required this.has_chosen_diet, required this.has_chosen_plan});
|
||||
const _$StateImpl(
|
||||
{required this.has_chosen_diet, required this.has_chosen_plan});
|
||||
|
||||
factory _$StateImpl.fromJson(Map<String, dynamic> json) => _$$StateImplFromJson(json);
|
||||
factory _$StateImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$StateImplFromJson(json);
|
||||
|
||||
@override
|
||||
final bool has_chosen_diet;
|
||||
@@ -128,20 +134,24 @@ class _$StateImpl implements _State {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$StateImpl &&
|
||||
(identical(other.has_chosen_diet, has_chosen_diet) || other.has_chosen_diet == has_chosen_diet) &&
|
||||
(identical(other.has_chosen_plan, has_chosen_plan) || other.has_chosen_plan == has_chosen_plan));
|
||||
(identical(other.has_chosen_diet, has_chosen_diet) ||
|
||||
other.has_chosen_diet == has_chosen_diet) &&
|
||||
(identical(other.has_chosen_plan, has_chosen_plan) ||
|
||||
other.has_chosen_plan == has_chosen_plan));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, has_chosen_diet, has_chosen_plan);
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, has_chosen_diet, has_chosen_plan);
|
||||
|
||||
/// Create a copy of State
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$StateImplCopyWith<_$StateImpl> get copyWith => __$$StateImplCopyWithImpl<_$StateImpl>(this, _$identity);
|
||||
_$$StateImplCopyWith<_$StateImpl> get copyWith =>
|
||||
__$$StateImplCopyWithImpl<_$StateImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -152,13 +162,14 @@ class _$StateImpl implements _State {
|
||||
}
|
||||
|
||||
abstract class _State implements State {
|
||||
const factory _State({required final bool has_chosen_diet, required final bool has_chosen_plan}) = _$StateImpl;
|
||||
const factory _State(
|
||||
{required final bool has_chosen_diet,
|
||||
required final bool has_chosen_plan}) = _$StateImpl;
|
||||
|
||||
factory _State.fromJson(Map<String, dynamic> json) = _$StateImpl.fromJson;
|
||||
|
||||
@override
|
||||
bool get has_chosen_diet;
|
||||
|
||||
@override
|
||||
bool get has_chosen_plan;
|
||||
|
||||
@@ -166,5 +177,6 @@ abstract class _State implements State {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$StateImplCopyWith<_$StateImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$StateImplCopyWith<_$StateImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,8 @@ _$StateImpl _$$StateImplFromJson(Map<String, dynamic> json) => _$StateImpl(
|
||||
has_chosen_plan: json['has_chosen_plan'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$StateImplToJson(_$StateImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$StateImplToJson(_$StateImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'has_chosen_diet': instance.has_chosen_diet,
|
||||
'has_chosen_plan': instance.has_chosen_plan,
|
||||
};
|
||||
|
||||
@@ -54,7 +54,6 @@ mixin _$DiaryState {
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
@@ -161,16 +160,18 @@ mixin _$DiaryState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $DiaryStateCopyWith<$Res> {
|
||||
factory $DiaryStateCopyWith(DiaryState value, $Res Function(DiaryState) then) = _$DiaryStateCopyWithImpl<$Res, DiaryState>;
|
||||
factory $DiaryStateCopyWith(
|
||||
DiaryState value, $Res Function(DiaryState) then) =
|
||||
_$DiaryStateCopyWithImpl<$Res, DiaryState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$DiaryStateCopyWithImpl<$Res, $Val extends DiaryState> implements $DiaryStateCopyWith<$Res> {
|
||||
class _$DiaryStateCopyWithImpl<$Res, $Val extends DiaryState>
|
||||
implements $DiaryStateCopyWith<$Res> {
|
||||
_$DiaryStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -180,12 +181,18 @@ class _$DiaryStateCopyWithImpl<$Res, $Val extends DiaryState> implements $DiaryS
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DiaryStateImplCopyWith<$Res> {
|
||||
factory _$$DiaryStateImplCopyWith(_$DiaryStateImpl value, $Res Function(_$DiaryStateImpl) then) = __$$DiaryStateImplCopyWithImpl<$Res>;
|
||||
factory _$$DiaryStateImplCopyWith(
|
||||
_$DiaryStateImpl value, $Res Function(_$DiaryStateImpl) then) =
|
||||
__$$DiaryStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DiaryStateImplCopyWithImpl<$Res> extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateImpl> implements _$$DiaryStateImplCopyWith<$Res> {
|
||||
__$$DiaryStateImplCopyWithImpl(_$DiaryStateImpl _value, $Res Function(_$DiaryStateImpl) _then) : super(_value, _then);
|
||||
class __$$DiaryStateImplCopyWithImpl<$Res>
|
||||
extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateImpl>
|
||||
implements _$$DiaryStateImplCopyWith<$Res> {
|
||||
__$$DiaryStateImplCopyWithImpl(
|
||||
_$DiaryStateImpl _value, $Res Function(_$DiaryStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -203,7 +210,8 @@ class _$DiaryStateImpl implements _DiaryState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$DiaryStateImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$DiaryStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -380,17 +388,20 @@ abstract class _DiaryState implements DiaryState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DiaryStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$DiaryStateLoadingImplCopyWith(_$DiaryStateLoadingImpl value, $Res Function(_$DiaryStateLoadingImpl) then) =
|
||||
factory _$$DiaryStateLoadingImplCopyWith(_$DiaryStateLoadingImpl value,
|
||||
$Res Function(_$DiaryStateLoadingImpl) then) =
|
||||
__$$DiaryStateLoadingImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({int? id});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DiaryStateLoadingImplCopyWithImpl<$Res> extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateLoadingImpl>
|
||||
class __$$DiaryStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateLoadingImpl>
|
||||
implements _$$DiaryStateLoadingImplCopyWith<$Res> {
|
||||
__$$DiaryStateLoadingImplCopyWithImpl(_$DiaryStateLoadingImpl _value, $Res Function(_$DiaryStateLoadingImpl) _then) : super(_value, _then);
|
||||
__$$DiaryStateLoadingImplCopyWithImpl(_$DiaryStateLoadingImpl _value,
|
||||
$Res Function(_$DiaryStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -423,7 +434,10 @@ class _$DiaryStateLoadingImpl implements DiaryStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$DiaryStateLoadingImpl && (identical(other.id, id) || other.id == id));
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$DiaryStateLoadingImpl &&
|
||||
(identical(other.id, id) || other.id == id));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -434,7 +448,9 @@ class _$DiaryStateLoadingImpl implements DiaryStateLoading {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith => __$$DiaryStateLoadingImplCopyWithImpl<_$DiaryStateLoadingImpl>(this, _$identity);
|
||||
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith =>
|
||||
__$$DiaryStateLoadingImplCopyWithImpl<_$DiaryStateLoadingImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -609,14 +625,15 @@ abstract class DiaryStateLoading implements DiaryState {
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DiaryStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$DiaryStateLoadedImplCopyWith(_$DiaryStateLoadedImpl value, $Res Function(_$DiaryStateLoadedImpl) then) =
|
||||
factory _$$DiaryStateLoadedImplCopyWith(_$DiaryStateLoadedImpl value,
|
||||
$Res Function(_$DiaryStateLoadedImpl) then) =
|
||||
__$$DiaryStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call(
|
||||
{DiaryModel diary,
|
||||
@@ -650,16 +667,17 @@ abstract class _$$DiaryStateLoadedImplCopyWith<$Res> {
|
||||
List<NutritionData>? chartDataCounted});
|
||||
|
||||
$DiaryModelCopyWith<$Res> get diary;
|
||||
|
||||
$MealCopyWith<$Res> get currentMeal;
|
||||
|
||||
$SelectionPopupModelCopyWith<$Res> get portionController;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DiaryStateLoadedImplCopyWithImpl<$Res> extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateLoadedImpl>
|
||||
class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateLoadedImpl>
|
||||
implements _$$DiaryStateLoadedImplCopyWith<$Res> {
|
||||
__$$DiaryStateLoadedImplCopyWithImpl(_$DiaryStateLoadedImpl _value, $Res Function(_$DiaryStateLoadedImpl) _then) : super(_value, _then);
|
||||
__$$DiaryStateLoadedImplCopyWithImpl(_$DiaryStateLoadedImpl _value,
|
||||
$Res Function(_$DiaryStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -841,7 +859,8 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res> extends _$DiaryStateCopyWithImp
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SelectionPopupModelCopyWith<$Res> get portionController {
|
||||
return $SelectionPopupModelCopyWith<$Res>(_value.portionController, (value) {
|
||||
return $SelectionPopupModelCopyWith<$Res>(_value.portionController,
|
||||
(value) {
|
||||
return _then(_value.copyWith(portionController: value));
|
||||
});
|
||||
}
|
||||
@@ -894,25 +913,24 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
||||
@override
|
||||
final String? diaryDate;
|
||||
final List<int> _recommendedChartValues;
|
||||
|
||||
@override
|
||||
List<int> get recommendedChartValues {
|
||||
if (_recommendedChartValues is EqualUnmodifiableListView) return _recommendedChartValues;
|
||||
if (_recommendedChartValues is EqualUnmodifiableListView)
|
||||
return _recommendedChartValues;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_recommendedChartValues);
|
||||
}
|
||||
|
||||
final List<int> _consumedChartValues;
|
||||
|
||||
@override
|
||||
List<int> get consumedChartValues {
|
||||
if (_consumedChartValues is EqualUnmodifiableListView) return _consumedChartValues;
|
||||
if (_consumedChartValues is EqualUnmodifiableListView)
|
||||
return _consumedChartValues;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_consumedChartValues);
|
||||
}
|
||||
|
||||
final List<Portion> _portions;
|
||||
|
||||
@override
|
||||
List<Portion> get portions {
|
||||
if (_portions is EqualUnmodifiableListView) return _portions;
|
||||
@@ -921,7 +939,6 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
||||
}
|
||||
|
||||
final List<SelectionPopupModel> _mealList;
|
||||
|
||||
@override
|
||||
List<SelectionPopupModel> get mealList {
|
||||
if (_mealList is EqualUnmodifiableListView) return _mealList;
|
||||
@@ -930,7 +947,6 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
||||
}
|
||||
|
||||
final List<SelectionPopupModel> _portionList;
|
||||
|
||||
@override
|
||||
List<SelectionPopupModel> get portionList {
|
||||
if (_portionList is EqualUnmodifiableListView) return _portionList;
|
||||
@@ -939,16 +955,15 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
||||
}
|
||||
|
||||
final List<Product> _autocompleteList;
|
||||
|
||||
@override
|
||||
List<Product> get autocompleteList {
|
||||
if (_autocompleteList is EqualUnmodifiableListView) return _autocompleteList;
|
||||
if (_autocompleteList is EqualUnmodifiableListView)
|
||||
return _autocompleteList;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_autocompleteList);
|
||||
}
|
||||
|
||||
final Map<String, dynamic> _chartData;
|
||||
|
||||
@override
|
||||
Map<String, dynamic> get chartData {
|
||||
if (_chartData is EqualUnmodifiableMapView) return _chartData;
|
||||
@@ -995,12 +1010,12 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
||||
@override
|
||||
final bool isAdded;
|
||||
final List<NutritionData>? _chartDataCounted;
|
||||
|
||||
@override
|
||||
List<NutritionData>? get chartDataCounted {
|
||||
final value = _chartDataCounted;
|
||||
if (value == null) return null;
|
||||
if (_chartDataCounted is EqualUnmodifiableListView) return _chartDataCounted;
|
||||
if (_chartDataCounted is EqualUnmodifiableListView)
|
||||
return _chartDataCounted;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(value);
|
||||
}
|
||||
@@ -1016,34 +1031,60 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$DiaryStateLoadedImpl &&
|
||||
(identical(other.diary, diary) || other.diary == diary) &&
|
||||
(identical(other.diaryDate, diaryDate) || other.diaryDate == diaryDate) &&
|
||||
const DeepCollectionEquality().equals(other._recommendedChartValues, _recommendedChartValues) &&
|
||||
const DeepCollectionEquality().equals(other._consumedChartValues, _consumedChartValues) &&
|
||||
(identical(other.diaryDate, diaryDate) ||
|
||||
other.diaryDate == diaryDate) &&
|
||||
const DeepCollectionEquality().equals(
|
||||
other._recommendedChartValues, _recommendedChartValues) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._consumedChartValues, _consumedChartValues) &&
|
||||
const DeepCollectionEquality().equals(other._portions, _portions) &&
|
||||
const DeepCollectionEquality().equals(other._mealList, _mealList) &&
|
||||
const DeepCollectionEquality().equals(other._portionList, _portionList) &&
|
||||
const DeepCollectionEquality().equals(other._autocompleteList, _autocompleteList) &&
|
||||
const DeepCollectionEquality().equals(other._chartData, _chartData) &&
|
||||
(identical(other.currentMeal, currentMeal) || other.currentMeal == currentMeal) &&
|
||||
(identical(other.portionController, portionController) || other.portionController == portionController) &&
|
||||
(identical(other.wakeupController, wakeupController) || other.wakeupController == wakeupController) &&
|
||||
(identical(other.retireController, retireController) || other.retireController == retireController) &&
|
||||
(identical(other.mealTimeController, mealTimeController) || other.mealTimeController == mealTimeController) &&
|
||||
(identical(other.commentController, commentController) || other.commentController == commentController) &&
|
||||
(identical(other.product_nameController, product_nameController) || other.product_nameController == product_nameController) &&
|
||||
(identical(other.productQuantityController, productQuantityController) || other.productQuantityController == productQuantityController) &&
|
||||
(identical(other.caloriesController, caloriesController) || other.caloriesController == caloriesController) &&
|
||||
(identical(other.fatsController, fatsController) || other.fatsController == fatsController) &&
|
||||
(identical(other.proteinsController, proteinsController) || other.proteinsController == proteinsController) &&
|
||||
(identical(other.carbsController, carbsController) || other.carbsController == carbsController) &&
|
||||
(identical(other.selectedMood, selectedMood) || other.selectedMood == selectedMood) &&
|
||||
(identical(other.selectedSatiety, selectedSatiety) || other.selectedSatiety == selectedSatiety) &&
|
||||
(identical(other.wakeupExpanded, wakeupExpanded) || other.wakeupExpanded == wakeupExpanded) &&
|
||||
(identical(other.moderationExpanded, moderationExpanded) || other.moderationExpanded == moderationExpanded) &&
|
||||
(identical(other.moodExpanded, moodExpanded) || other.moodExpanded == moodExpanded) &&
|
||||
(identical(other.isLoading, isLoading) || other.isLoading == isLoading) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._portionList, _portionList) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._autocompleteList, _autocompleteList) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._chartData, _chartData) &&
|
||||
(identical(other.currentMeal, currentMeal) ||
|
||||
other.currentMeal == currentMeal) &&
|
||||
(identical(other.portionController, portionController) ||
|
||||
other.portionController == portionController) &&
|
||||
(identical(other.wakeupController, wakeupController) ||
|
||||
other.wakeupController == wakeupController) &&
|
||||
(identical(other.retireController, retireController) ||
|
||||
other.retireController == retireController) &&
|
||||
(identical(other.mealTimeController, mealTimeController) ||
|
||||
other.mealTimeController == mealTimeController) &&
|
||||
(identical(other.commentController, commentController) ||
|
||||
other.commentController == commentController) &&
|
||||
(identical(other.product_nameController, product_nameController) ||
|
||||
other.product_nameController == product_nameController) &&
|
||||
(identical(other.productQuantityController,
|
||||
productQuantityController) ||
|
||||
other.productQuantityController == productQuantityController) &&
|
||||
(identical(other.caloriesController, caloriesController) ||
|
||||
other.caloriesController == caloriesController) &&
|
||||
(identical(other.fatsController, fatsController) ||
|
||||
other.fatsController == fatsController) &&
|
||||
(identical(other.proteinsController, proteinsController) ||
|
||||
other.proteinsController == proteinsController) &&
|
||||
(identical(other.carbsController, carbsController) ||
|
||||
other.carbsController == carbsController) &&
|
||||
(identical(other.selectedMood, selectedMood) ||
|
||||
other.selectedMood == selectedMood) &&
|
||||
(identical(other.selectedSatiety, selectedSatiety) ||
|
||||
other.selectedSatiety == selectedSatiety) &&
|
||||
(identical(other.wakeupExpanded, wakeupExpanded) ||
|
||||
other.wakeupExpanded == wakeupExpanded) &&
|
||||
(identical(other.moderationExpanded, moderationExpanded) ||
|
||||
other.moderationExpanded == moderationExpanded) &&
|
||||
(identical(other.moodExpanded, moodExpanded) ||
|
||||
other.moodExpanded == moodExpanded) &&
|
||||
(identical(other.isLoading, isLoading) ||
|
||||
other.isLoading == isLoading) &&
|
||||
(identical(other.isAdded, isAdded) || other.isAdded == isAdded) &&
|
||||
const DeepCollectionEquality().equals(other._chartDataCounted, _chartDataCounted));
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._chartDataCounted, _chartDataCounted));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -1085,7 +1126,9 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith => __$$DiaryStateLoadedImplCopyWithImpl<_$DiaryStateLoadedImpl>(this, _$identity);
|
||||
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith =>
|
||||
__$$DiaryStateLoadedImplCopyWithImpl<_$DiaryStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -1372,80 +1415,58 @@ abstract class DiaryStateLoaded implements DiaryState {
|
||||
final List<NutritionData>? chartDataCounted}) = _$DiaryStateLoadedImpl;
|
||||
|
||||
DiaryModel get diary;
|
||||
|
||||
String? get diaryDate;
|
||||
|
||||
List<int> get recommendedChartValues;
|
||||
|
||||
List<int> get consumedChartValues;
|
||||
|
||||
List<Portion> get portions;
|
||||
|
||||
List<SelectionPopupModel> get mealList;
|
||||
|
||||
List<SelectionPopupModel> get portionList;
|
||||
|
||||
List<Product> get autocompleteList;
|
||||
|
||||
Map<String, dynamic> get chartData;
|
||||
|
||||
Meal get currentMeal;
|
||||
|
||||
SelectionPopupModel get portionController;
|
||||
|
||||
TimeOfDay get wakeupController;
|
||||
|
||||
TimeOfDay get retireController;
|
||||
|
||||
TimeOfDay? get mealTimeController;
|
||||
|
||||
TextEditingController get commentController;
|
||||
|
||||
TextEditingController get product_nameController;
|
||||
|
||||
TextEditingController get productQuantityController;
|
||||
|
||||
TextEditingController get caloriesController;
|
||||
|
||||
TextEditingController get fatsController;
|
||||
|
||||
TextEditingController get proteinsController;
|
||||
|
||||
TextEditingController get carbsController;
|
||||
|
||||
int get selectedMood;
|
||||
|
||||
int get selectedSatiety;
|
||||
|
||||
bool get wakeupExpanded;
|
||||
|
||||
bool get moderationExpanded;
|
||||
|
||||
bool get moodExpanded;
|
||||
|
||||
bool get isLoading;
|
||||
|
||||
bool get isAdded;
|
||||
|
||||
List<NutritionData>? get chartDataCounted;
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DiaryStateErrorImplCopyWith<$Res> {
|
||||
factory _$$DiaryStateErrorImplCopyWith(_$DiaryStateErrorImpl value, $Res Function(_$DiaryStateErrorImpl) then) = __$$DiaryStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$DiaryStateErrorImplCopyWith(_$DiaryStateErrorImpl value,
|
||||
$Res Function(_$DiaryStateErrorImpl) then) =
|
||||
__$$DiaryStateErrorImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DiaryStateErrorImplCopyWithImpl<$Res> extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateErrorImpl> implements _$$DiaryStateErrorImplCopyWith<$Res> {
|
||||
__$$DiaryStateErrorImplCopyWithImpl(_$DiaryStateErrorImpl _value, $Res Function(_$DiaryStateErrorImpl) _then) : super(_value, _then);
|
||||
class __$$DiaryStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateErrorImpl>
|
||||
implements _$$DiaryStateErrorImplCopyWith<$Res> {
|
||||
__$$DiaryStateErrorImplCopyWithImpl(
|
||||
_$DiaryStateErrorImpl _value, $Res Function(_$DiaryStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -1481,7 +1502,8 @@ class _$DiaryStateErrorImpl implements DiaryStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$DiaryStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -1492,7 +1514,9 @@ class _$DiaryStateErrorImpl implements DiaryStateError {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith => __$$DiaryStateErrorImplCopyWithImpl<_$DiaryStateErrorImpl>(this, _$identity);
|
||||
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith =>
|
||||
__$$DiaryStateErrorImplCopyWithImpl<_$DiaryStateErrorImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -1660,12 +1684,14 @@ class _$DiaryStateErrorImpl implements DiaryStateError {
|
||||
}
|
||||
|
||||
abstract class DiaryStateError implements DiaryState {
|
||||
const factory DiaryStateError({required final String errorMessage}) = _$DiaryStateErrorImpl;
|
||||
const factory DiaryStateError({required final String errorMessage}) =
|
||||
_$DiaryStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,8 @@ class _DiaryService implements DiaryService {
|
||||
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
|
||||
late Map<String, DiaryModel> _value;
|
||||
try {
|
||||
_value = _result.data!.map((k, dynamic v) => MapEntry(k, DiaryModel.fromJson(v as Map<String, dynamic>)));
|
||||
_value = _result.data!.map((k, dynamic v) =>
|
||||
MapEntry(k, DiaryModel.fromJson(v as Map<String, dynamic>)));
|
||||
} on Object catch (e, s) {
|
||||
errorLogger?.logError(e, s, _options);
|
||||
rethrow;
|
||||
@@ -139,7 +140,11 @@ class _DiaryService implements DiaryService {
|
||||
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
|
||||
late Map<String, List<Product>> _value;
|
||||
try {
|
||||
_value = _result.data!.map((k, dynamic v) => MapEntry(k, (v as List).map((i) => Product.fromJson(i as Map<String, dynamic>)).toList()));
|
||||
_value = _result.data!.map((k, dynamic v) => MapEntry(
|
||||
k,
|
||||
(v as List)
|
||||
.map((i) => Product.fromJson(i as Map<String, dynamic>))
|
||||
.toList()));
|
||||
} on Object catch (e, s) {
|
||||
errorLogger?.logError(e, s, _options);
|
||||
rethrow;
|
||||
@@ -328,7 +333,8 @@ class _DiaryService implements DiaryService {
|
||||
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
|
||||
late Map<String, Portion> _value;
|
||||
try {
|
||||
_value = _result.data!.map((k, dynamic v) => MapEntry(k, Portion.fromJson(v as Map<String, dynamic>)));
|
||||
_value = _result.data!.map((k, dynamic v) =>
|
||||
MapEntry(k, Portion.fromJson(v as Map<String, dynamic>)));
|
||||
} on Object catch (e, s) {
|
||||
errorLogger?.logError(e, s, _options);
|
||||
rethrow;
|
||||
@@ -505,7 +511,9 @@ class _DiaryService implements DiaryService {
|
||||
}
|
||||
|
||||
RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
|
||||
if (T != dynamic && !(requestOptions.responseType == ResponseType.bytes || requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T != dynamic &&
|
||||
!(requestOptions.responseType == ResponseType.bytes ||
|
||||
requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T == String) {
|
||||
requestOptions.responseType = ResponseType.plain;
|
||||
} else {
|
||||
|
||||
@@ -22,10 +22,8 @@ CommentModel _$CommentModelFromJson(Map<String, dynamic> json) {
|
||||
mixin _$CommentModel {
|
||||
@JsonKey(name: "data")
|
||||
List<Comment> get data => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "links")
|
||||
Links get links => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "meta")
|
||||
Meta get meta => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -35,28 +33,32 @@ mixin _$CommentModel {
|
||||
/// Create a copy of CommentModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$CommentModelCopyWith<CommentModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$CommentModelCopyWith<CommentModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $CommentModelCopyWith<$Res> {
|
||||
factory $CommentModelCopyWith(CommentModel value, $Res Function(CommentModel) then) = _$CommentModelCopyWithImpl<$Res, CommentModel>;
|
||||
|
||||
factory $CommentModelCopyWith(
|
||||
CommentModel value, $Res Function(CommentModel) then) =
|
||||
_$CommentModelCopyWithImpl<$Res, CommentModel>;
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "data") List<Comment> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
|
||||
$Res call(
|
||||
{@JsonKey(name: "data") List<Comment> data,
|
||||
@JsonKey(name: "links") Links links,
|
||||
@JsonKey(name: "meta") Meta meta});
|
||||
|
||||
$LinksCopyWith<$Res> get links;
|
||||
|
||||
$MetaCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel> implements $CommentModelCopyWith<$Res> {
|
||||
class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel>
|
||||
implements $CommentModelCopyWith<$Res> {
|
||||
_$CommentModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -107,23 +109,31 @@ class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel> implements $Co
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CommentModelImplCopyWith<$Res> implements $CommentModelCopyWith<$Res> {
|
||||
factory _$$CommentModelImplCopyWith(_$CommentModelImpl value, $Res Function(_$CommentModelImpl) then) = __$$CommentModelImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$CommentModelImplCopyWith<$Res>
|
||||
implements $CommentModelCopyWith<$Res> {
|
||||
factory _$$CommentModelImplCopyWith(
|
||||
_$CommentModelImpl value, $Res Function(_$CommentModelImpl) then) =
|
||||
__$$CommentModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "data") List<Comment> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
|
||||
$Res call(
|
||||
{@JsonKey(name: "data") List<Comment> data,
|
||||
@JsonKey(name: "links") Links links,
|
||||
@JsonKey(name: "meta") Meta meta});
|
||||
|
||||
@override
|
||||
$LinksCopyWith<$Res> get links;
|
||||
|
||||
@override
|
||||
$MetaCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CommentModelImplCopyWithImpl<$Res> extends _$CommentModelCopyWithImpl<$Res, _$CommentModelImpl> implements _$$CommentModelImplCopyWith<$Res> {
|
||||
__$$CommentModelImplCopyWithImpl(_$CommentModelImpl _value, $Res Function(_$CommentModelImpl) _then) : super(_value, _then);
|
||||
class __$$CommentModelImplCopyWithImpl<$Res>
|
||||
extends _$CommentModelCopyWithImpl<$Res, _$CommentModelImpl>
|
||||
implements _$$CommentModelImplCopyWith<$Res> {
|
||||
__$$CommentModelImplCopyWithImpl(
|
||||
_$CommentModelImpl _value, $Res Function(_$CommentModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of CommentModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -155,13 +165,15 @@ class __$$CommentModelImplCopyWithImpl<$Res> extends _$CommentModelCopyWithImpl<
|
||||
@JsonSerializable()
|
||||
class _$CommentModelImpl implements _CommentModel {
|
||||
const _$CommentModelImpl(
|
||||
{@JsonKey(name: "data") required final List<Comment> data, @JsonKey(name: "links") required this.links, @JsonKey(name: "meta") required this.meta})
|
||||
{@JsonKey(name: "data") required final List<Comment> data,
|
||||
@JsonKey(name: "links") required this.links,
|
||||
@JsonKey(name: "meta") required this.meta})
|
||||
: _data = data;
|
||||
|
||||
factory _$CommentModelImpl.fromJson(Map<String, dynamic> json) => _$$CommentModelImplFromJson(json);
|
||||
factory _$CommentModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$CommentModelImplFromJson(json);
|
||||
|
||||
final List<Comment> _data;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "data")
|
||||
List<Comment> get data {
|
||||
@@ -194,14 +206,16 @@ class _$CommentModelImpl implements _CommentModel {
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
||||
|
||||
/// Create a copy of CommentModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith => __$$CommentModelImplCopyWithImpl<_$CommentModelImpl>(this, _$identity);
|
||||
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith =>
|
||||
__$$CommentModelImplCopyWithImpl<_$CommentModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -217,16 +231,15 @@ abstract class _CommentModel implements CommentModel {
|
||||
@JsonKey(name: "links") required final Links links,
|
||||
@JsonKey(name: "meta") required final Meta meta}) = _$CommentModelImpl;
|
||||
|
||||
factory _CommentModel.fromJson(Map<String, dynamic> json) = _$CommentModelImpl.fromJson;
|
||||
factory _CommentModel.fromJson(Map<String, dynamic> json) =
|
||||
_$CommentModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "data")
|
||||
List<Comment> get data;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "links")
|
||||
Links get links;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "meta")
|
||||
Meta get meta;
|
||||
@@ -235,7 +248,8 @@ abstract class _CommentModel implements CommentModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Comment _$CommentFromJson(Map<String, dynamic> json) {
|
||||
@@ -246,19 +260,14 @@ Comment _$CommentFromJson(Map<String, dynamic> json) {
|
||||
mixin _$Comment {
|
||||
@JsonKey(name: "id")
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "author_name")
|
||||
String get authorName => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "author_profile_icon")
|
||||
String get authorProfileIcon => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "body")
|
||||
String get body => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "children_comments")
|
||||
List<Comment> get childrenComments => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -273,8 +282,8 @@ mixin _$Comment {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $CommentCopyWith<$Res> {
|
||||
factory $CommentCopyWith(Comment value, $Res Function(Comment) then) = _$CommentCopyWithImpl<$Res, Comment>;
|
||||
|
||||
factory $CommentCopyWith(Comment value, $Res Function(Comment) then) =
|
||||
_$CommentCopyWithImpl<$Res, Comment>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "id") int id,
|
||||
@@ -286,12 +295,12 @@ abstract class $CommentCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$CommentCopyWithImpl<$Res, $Val extends Comment> implements $CommentCopyWith<$Res> {
|
||||
class _$CommentCopyWithImpl<$Res, $Val extends Comment>
|
||||
implements $CommentCopyWith<$Res> {
|
||||
_$CommentCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -338,8 +347,9 @@ class _$CommentCopyWithImpl<$Res, $Val extends Comment> implements $CommentCopyW
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CommentImplCopyWith<$Res> implements $CommentCopyWith<$Res> {
|
||||
factory _$$CommentImplCopyWith(_$CommentImpl value, $Res Function(_$CommentImpl) then) = __$$CommentImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$CommentImplCopyWith(
|
||||
_$CommentImpl value, $Res Function(_$CommentImpl) then) =
|
||||
__$$CommentImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -352,8 +362,12 @@ abstract class _$$CommentImplCopyWith<$Res> implements $CommentCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CommentImplCopyWithImpl<$Res> extends _$CommentCopyWithImpl<$Res, _$CommentImpl> implements _$$CommentImplCopyWith<$Res> {
|
||||
__$$CommentImplCopyWithImpl(_$CommentImpl _value, $Res Function(_$CommentImpl) _then) : super(_value, _then);
|
||||
class __$$CommentImplCopyWithImpl<$Res>
|
||||
extends _$CommentCopyWithImpl<$Res, _$CommentImpl>
|
||||
implements _$$CommentImplCopyWith<$Res> {
|
||||
__$$CommentImplCopyWithImpl(
|
||||
_$CommentImpl _value, $Res Function(_$CommentImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Comment
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -404,11 +418,13 @@ class _$CommentImpl implements _Comment {
|
||||
@JsonKey(name: "author_name") required this.authorName,
|
||||
@JsonKey(name: "author_profile_icon") required this.authorProfileIcon,
|
||||
@JsonKey(name: "body") required this.body,
|
||||
@JsonKey(name: "children_comments") required final List<Comment> childrenComments,
|
||||
@JsonKey(name: "children_comments")
|
||||
required final List<Comment> childrenComments,
|
||||
@JsonKey(name: "created_at") required this.createdAt})
|
||||
: _childrenComments = childrenComments;
|
||||
|
||||
factory _$CommentImpl.fromJson(Map<String, dynamic> json) => _$$CommentImplFromJson(json);
|
||||
factory _$CommentImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$CommentImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
@@ -423,11 +439,11 @@ class _$CommentImpl implements _Comment {
|
||||
@JsonKey(name: "body")
|
||||
final String body;
|
||||
final List<Comment> _childrenComments;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "children_comments")
|
||||
List<Comment> get childrenComments {
|
||||
if (_childrenComments is EqualUnmodifiableListView) return _childrenComments;
|
||||
if (_childrenComments is EqualUnmodifiableListView)
|
||||
return _childrenComments;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_childrenComments);
|
||||
}
|
||||
@@ -447,23 +463,35 @@ class _$CommentImpl implements _Comment {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$CommentImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.authorName, authorName) || other.authorName == authorName) &&
|
||||
(identical(other.authorProfileIcon, authorProfileIcon) || other.authorProfileIcon == authorProfileIcon) &&
|
||||
(identical(other.authorName, authorName) ||
|
||||
other.authorName == authorName) &&
|
||||
(identical(other.authorProfileIcon, authorProfileIcon) ||
|
||||
other.authorProfileIcon == authorProfileIcon) &&
|
||||
(identical(other.body, body) || other.body == body) &&
|
||||
const DeepCollectionEquality().equals(other._childrenComments, _childrenComments) &&
|
||||
(identical(other.createdAt, createdAt) || other.createdAt == createdAt));
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._childrenComments, _childrenComments) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, authorName, authorProfileIcon, body, const DeepCollectionEquality().hash(_childrenComments), createdAt);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
authorName,
|
||||
authorProfileIcon,
|
||||
body,
|
||||
const DeepCollectionEquality().hash(_childrenComments),
|
||||
createdAt);
|
||||
|
||||
/// Create a copy of Comment
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$CommentImplCopyWith<_$CommentImpl> get copyWith => __$$CommentImplCopyWithImpl<_$CommentImpl>(this, _$identity);
|
||||
_$$CommentImplCopyWith<_$CommentImpl> get copyWith =>
|
||||
__$$CommentImplCopyWithImpl<_$CommentImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -475,35 +503,33 @@ class _$CommentImpl implements _Comment {
|
||||
|
||||
abstract class _Comment implements Comment {
|
||||
const factory _Comment(
|
||||
{@JsonKey(name: "id") required final int id,
|
||||
@JsonKey(name: "author_name") required final String authorName,
|
||||
@JsonKey(name: "author_profile_icon") required final String authorProfileIcon,
|
||||
@JsonKey(name: "body") required final String body,
|
||||
@JsonKey(name: "children_comments") required final List<Comment> childrenComments,
|
||||
@JsonKey(name: "created_at") required final DateTime createdAt}) = _$CommentImpl;
|
||||
{@JsonKey(name: "id") required final int id,
|
||||
@JsonKey(name: "author_name") required final String authorName,
|
||||
@JsonKey(name: "author_profile_icon")
|
||||
required final String authorProfileIcon,
|
||||
@JsonKey(name: "body") required final String body,
|
||||
@JsonKey(name: "children_comments")
|
||||
required final List<Comment> childrenComments,
|
||||
@JsonKey(name: "created_at") required final DateTime createdAt}) =
|
||||
_$CommentImpl;
|
||||
|
||||
factory _Comment.fromJson(Map<String, dynamic> json) = _$CommentImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
int get id;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "author_name")
|
||||
String get authorName;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "author_profile_icon")
|
||||
String get authorProfileIcon;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "body")
|
||||
String get body;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "children_comments")
|
||||
List<Comment> get childrenComments;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt;
|
||||
@@ -512,5 +538,6 @@ abstract class _Comment implements Comment {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$CommentImplCopyWith<_$CommentImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$CommentImplCopyWith<_$CommentImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,28 +6,36 @@ part of 'comment_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$CommentModelImpl _$$CommentModelImplFromJson(Map<String, dynamic> json) => _$CommentModelImpl(
|
||||
data: (json['data'] as List<dynamic>).map((e) => Comment.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
_$CommentModelImpl _$$CommentModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$CommentModelImpl(
|
||||
data: (json['data'] as List<dynamic>)
|
||||
.map((e) => Comment.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
links: Links.fromJson(json['links'] as Map<String, dynamic>),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$CommentModelImplToJson(_$CommentModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$CommentModelImplToJson(_$CommentModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.data,
|
||||
'links': instance.links,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
_$CommentImpl _$$CommentImplFromJson(Map<String, dynamic> json) => _$CommentImpl(
|
||||
_$CommentImpl _$$CommentImplFromJson(Map<String, dynamic> json) =>
|
||||
_$CommentImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
authorName: json['author_name'] as String,
|
||||
authorProfileIcon: json['author_profile_icon'] as String,
|
||||
body: json['body'] as String,
|
||||
childrenComments: (json['children_comments'] as List<dynamic>).map((e) => Comment.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
childrenComments: (json['children_comments'] as List<dynamic>)
|
||||
.map((e) => Comment.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$CommentImplToJson(_$CommentImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$CommentImplToJson(_$CommentImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'author_name': instance.authorName,
|
||||
'author_profile_icon': instance.authorProfileIcon,
|
||||
|
||||
@@ -22,10 +22,8 @@ DietsPagination _$DietsPaginationFromJson(Map<String, dynamic> json) {
|
||||
mixin _$DietsPagination {
|
||||
@JsonKey(name: "data")
|
||||
List<Diet> get data => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "links")
|
||||
Links get links => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "meta")
|
||||
Meta get meta => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -35,28 +33,32 @@ mixin _$DietsPagination {
|
||||
/// Create a copy of DietsPagination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$DietsPaginationCopyWith<DietsPagination> get copyWith => throw _privateConstructorUsedError;
|
||||
$DietsPaginationCopyWith<DietsPagination> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $DietsPaginationCopyWith<$Res> {
|
||||
factory $DietsPaginationCopyWith(DietsPagination value, $Res Function(DietsPagination) then) = _$DietsPaginationCopyWithImpl<$Res, DietsPagination>;
|
||||
|
||||
factory $DietsPaginationCopyWith(
|
||||
DietsPagination value, $Res Function(DietsPagination) then) =
|
||||
_$DietsPaginationCopyWithImpl<$Res, DietsPagination>;
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "data") List<Diet> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
|
||||
$Res call(
|
||||
{@JsonKey(name: "data") List<Diet> data,
|
||||
@JsonKey(name: "links") Links links,
|
||||
@JsonKey(name: "meta") Meta meta});
|
||||
|
||||
$LinksCopyWith<$Res> get links;
|
||||
|
||||
$MetaCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$DietsPaginationCopyWithImpl<$Res, $Val extends DietsPagination> implements $DietsPaginationCopyWith<$Res> {
|
||||
class _$DietsPaginationCopyWithImpl<$Res, $Val extends DietsPagination>
|
||||
implements $DietsPaginationCopyWith<$Res> {
|
||||
_$DietsPaginationCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -107,24 +109,31 @@ class _$DietsPaginationCopyWithImpl<$Res, $Val extends DietsPagination> implemen
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DietsPaginationImplCopyWith<$Res> implements $DietsPaginationCopyWith<$Res> {
|
||||
factory _$$DietsPaginationImplCopyWith(_$DietsPaginationImpl value, $Res Function(_$DietsPaginationImpl) then) = __$$DietsPaginationImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$DietsPaginationImplCopyWith<$Res>
|
||||
implements $DietsPaginationCopyWith<$Res> {
|
||||
factory _$$DietsPaginationImplCopyWith(_$DietsPaginationImpl value,
|
||||
$Res Function(_$DietsPaginationImpl) then) =
|
||||
__$$DietsPaginationImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "data") List<Diet> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
|
||||
$Res call(
|
||||
{@JsonKey(name: "data") List<Diet> data,
|
||||
@JsonKey(name: "links") Links links,
|
||||
@JsonKey(name: "meta") Meta meta});
|
||||
|
||||
@override
|
||||
$LinksCopyWith<$Res> get links;
|
||||
|
||||
@override
|
||||
$MetaCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DietsPaginationImplCopyWithImpl<$Res> extends _$DietsPaginationCopyWithImpl<$Res, _$DietsPaginationImpl>
|
||||
class __$$DietsPaginationImplCopyWithImpl<$Res>
|
||||
extends _$DietsPaginationCopyWithImpl<$Res, _$DietsPaginationImpl>
|
||||
implements _$$DietsPaginationImplCopyWith<$Res> {
|
||||
__$$DietsPaginationImplCopyWithImpl(_$DietsPaginationImpl _value, $Res Function(_$DietsPaginationImpl) _then) : super(_value, _then);
|
||||
__$$DietsPaginationImplCopyWithImpl(
|
||||
_$DietsPaginationImpl _value, $Res Function(_$DietsPaginationImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DietsPagination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -156,13 +165,15 @@ class __$$DietsPaginationImplCopyWithImpl<$Res> extends _$DietsPaginationCopyWit
|
||||
@JsonSerializable()
|
||||
class _$DietsPaginationImpl implements _DietsPagination {
|
||||
const _$DietsPaginationImpl(
|
||||
{@JsonKey(name: "data") required final List<Diet> data, @JsonKey(name: "links") required this.links, @JsonKey(name: "meta") required this.meta})
|
||||
{@JsonKey(name: "data") required final List<Diet> data,
|
||||
@JsonKey(name: "links") required this.links,
|
||||
@JsonKey(name: "meta") required this.meta})
|
||||
: _data = data;
|
||||
|
||||
factory _$DietsPaginationImpl.fromJson(Map<String, dynamic> json) => _$$DietsPaginationImplFromJson(json);
|
||||
factory _$DietsPaginationImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$DietsPaginationImplFromJson(json);
|
||||
|
||||
final List<Diet> _data;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "data")
|
||||
List<Diet> get data {
|
||||
@@ -195,14 +206,17 @@ class _$DietsPaginationImpl implements _DietsPagination {
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
||||
|
||||
/// Create a copy of DietsPagination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DietsPaginationImplCopyWith<_$DietsPaginationImpl> get copyWith => __$$DietsPaginationImplCopyWithImpl<_$DietsPaginationImpl>(this, _$identity);
|
||||
_$$DietsPaginationImplCopyWith<_$DietsPaginationImpl> get copyWith =>
|
||||
__$$DietsPaginationImplCopyWithImpl<_$DietsPaginationImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -218,16 +232,15 @@ abstract class _DietsPagination implements DietsPagination {
|
||||
@JsonKey(name: "links") required final Links links,
|
||||
@JsonKey(name: "meta") required final Meta meta}) = _$DietsPaginationImpl;
|
||||
|
||||
factory _DietsPagination.fromJson(Map<String, dynamic> json) = _$DietsPaginationImpl.fromJson;
|
||||
factory _DietsPagination.fromJson(Map<String, dynamic> json) =
|
||||
_$DietsPaginationImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "data")
|
||||
List<Diet> get data;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "links")
|
||||
Links get links;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "meta")
|
||||
Meta get meta;
|
||||
@@ -236,7 +249,8 @@ abstract class _DietsPagination implements DietsPagination {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DietsPaginationImplCopyWith<_$DietsPaginationImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$DietsPaginationImplCopyWith<_$DietsPaginationImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Diet _$DietFromJson(Map<String, dynamic> json) {
|
||||
@@ -247,37 +261,27 @@ Diet _$DietFromJson(Map<String, dynamic> json) {
|
||||
mixin _$Diet {
|
||||
@JsonKey(name: "id")
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "name")
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "image")
|
||||
String get image => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "duration")
|
||||
int get duration => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "state")
|
||||
String get state => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "type")
|
||||
DietType get type => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "details")
|
||||
String get details => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "daily_schedule")
|
||||
List<List<List<DailySchedule>>> get dailySchedule => throw _privateConstructorUsedError;
|
||||
|
||||
List<List<List<DailySchedule>>> get dailySchedule =>
|
||||
throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "author")
|
||||
Author get author => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "total_likes")
|
||||
int get totalLikes => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "total_views")
|
||||
int get totalViews => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "total_comments")
|
||||
int get totalComments => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -292,8 +296,8 @@ mixin _$Diet {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $DietCopyWith<$Res> {
|
||||
factory $DietCopyWith(Diet value, $Res Function(Diet) then) = _$DietCopyWithImpl<$Res, Diet>;
|
||||
|
||||
factory $DietCopyWith(Diet value, $Res Function(Diet) then) =
|
||||
_$DietCopyWithImpl<$Res, Diet>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "id") int id,
|
||||
@@ -303,24 +307,24 @@ abstract class $DietCopyWith<$Res> {
|
||||
@JsonKey(name: "state") String state,
|
||||
@JsonKey(name: "type") DietType type,
|
||||
@JsonKey(name: "details") String details,
|
||||
@JsonKey(name: "daily_schedule") List<List<List<DailySchedule>>> dailySchedule,
|
||||
@JsonKey(name: "daily_schedule")
|
||||
List<List<List<DailySchedule>>> dailySchedule,
|
||||
@JsonKey(name: "author") Author author,
|
||||
@JsonKey(name: "total_likes") int totalLikes,
|
||||
@JsonKey(name: "total_views") int totalViews,
|
||||
@JsonKey(name: "total_comments") int totalComments});
|
||||
|
||||
$DietTypeCopyWith<$Res> get type;
|
||||
|
||||
$AuthorCopyWith<$Res> get author;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$DietCopyWithImpl<$Res, $Val extends Diet> implements $DietCopyWith<$Res> {
|
||||
class _$DietCopyWithImpl<$Res, $Val extends Diet>
|
||||
implements $DietCopyWith<$Res> {
|
||||
_$DietCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -417,8 +421,9 @@ class _$DietCopyWithImpl<$Res, $Val extends Diet> implements $DietCopyWith<$Res>
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DietImplCopyWith<$Res> implements $DietCopyWith<$Res> {
|
||||
factory _$$DietImplCopyWith(_$DietImpl value, $Res Function(_$DietImpl) then) = __$$DietImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$DietImplCopyWith(
|
||||
_$DietImpl value, $Res Function(_$DietImpl) then) =
|
||||
__$$DietImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -429,7 +434,8 @@ abstract class _$$DietImplCopyWith<$Res> implements $DietCopyWith<$Res> {
|
||||
@JsonKey(name: "state") String state,
|
||||
@JsonKey(name: "type") DietType type,
|
||||
@JsonKey(name: "details") String details,
|
||||
@JsonKey(name: "daily_schedule") List<List<List<DailySchedule>>> dailySchedule,
|
||||
@JsonKey(name: "daily_schedule")
|
||||
List<List<List<DailySchedule>>> dailySchedule,
|
||||
@JsonKey(name: "author") Author author,
|
||||
@JsonKey(name: "total_likes") int totalLikes,
|
||||
@JsonKey(name: "total_views") int totalViews,
|
||||
@@ -437,14 +443,16 @@ abstract class _$$DietImplCopyWith<$Res> implements $DietCopyWith<$Res> {
|
||||
|
||||
@override
|
||||
$DietTypeCopyWith<$Res> get type;
|
||||
|
||||
@override
|
||||
$AuthorCopyWith<$Res> get author;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DietImplCopyWithImpl<$Res> extends _$DietCopyWithImpl<$Res, _$DietImpl> implements _$$DietImplCopyWith<$Res> {
|
||||
__$$DietImplCopyWithImpl(_$DietImpl _value, $Res Function(_$DietImpl) _then) : super(_value, _then);
|
||||
class __$$DietImplCopyWithImpl<$Res>
|
||||
extends _$DietCopyWithImpl<$Res, _$DietImpl>
|
||||
implements _$$DietImplCopyWith<$Res> {
|
||||
__$$DietImplCopyWithImpl(_$DietImpl _value, $Res Function(_$DietImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Diet
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -528,14 +536,16 @@ class _$DietImpl implements _Diet {
|
||||
@JsonKey(name: "state") required this.state,
|
||||
@JsonKey(name: "type") required this.type,
|
||||
@JsonKey(name: "details") required this.details,
|
||||
@JsonKey(name: "daily_schedule") required final List<List<List<DailySchedule>>> dailySchedule,
|
||||
@JsonKey(name: "daily_schedule")
|
||||
required final List<List<List<DailySchedule>>> dailySchedule,
|
||||
@JsonKey(name: "author") required this.author,
|
||||
@JsonKey(name: "total_likes") required this.totalLikes,
|
||||
@JsonKey(name: "total_views") required this.totalViews,
|
||||
@JsonKey(name: "total_comments") required this.totalComments})
|
||||
: _dailySchedule = dailySchedule;
|
||||
|
||||
factory _$DietImpl.fromJson(Map<String, dynamic> json) => _$$DietImplFromJson(json);
|
||||
factory _$DietImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$DietImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
@@ -559,7 +569,6 @@ class _$DietImpl implements _Diet {
|
||||
@JsonKey(name: "details")
|
||||
final String details;
|
||||
final List<List<List<DailySchedule>>> _dailySchedule;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "daily_schedule")
|
||||
List<List<List<DailySchedule>>> get dailySchedule {
|
||||
@@ -594,28 +603,46 @@ class _$DietImpl implements _Diet {
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
(identical(other.image, image) || other.image == image) &&
|
||||
(identical(other.duration, duration) || other.duration == duration) &&
|
||||
(identical(other.duration, duration) ||
|
||||
other.duration == duration) &&
|
||||
(identical(other.state, state) || other.state == state) &&
|
||||
(identical(other.type, type) || other.type == type) &&
|
||||
(identical(other.details, details) || other.details == details) &&
|
||||
const DeepCollectionEquality().equals(other._dailySchedule, _dailySchedule) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._dailySchedule, _dailySchedule) &&
|
||||
(identical(other.author, author) || other.author == author) &&
|
||||
(identical(other.totalLikes, totalLikes) || other.totalLikes == totalLikes) &&
|
||||
(identical(other.totalViews, totalViews) || other.totalViews == totalViews) &&
|
||||
(identical(other.totalComments, totalComments) || other.totalComments == totalComments));
|
||||
(identical(other.totalLikes, totalLikes) ||
|
||||
other.totalLikes == totalLikes) &&
|
||||
(identical(other.totalViews, totalViews) ||
|
||||
other.totalViews == totalViews) &&
|
||||
(identical(other.totalComments, totalComments) ||
|
||||
other.totalComments == totalComments));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, name, image, duration, state, type, details, const DeepCollectionEquality().hash(_dailySchedule), author,
|
||||
totalLikes, totalViews, totalComments);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
name,
|
||||
image,
|
||||
duration,
|
||||
state,
|
||||
type,
|
||||
details,
|
||||
const DeepCollectionEquality().hash(_dailySchedule),
|
||||
author,
|
||||
totalLikes,
|
||||
totalViews,
|
||||
totalComments);
|
||||
|
||||
/// Create a copy of Diet
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DietImplCopyWith<_$DietImpl> get copyWith => __$$DietImplCopyWithImpl<_$DietImpl>(this, _$identity);
|
||||
_$$DietImplCopyWith<_$DietImpl> get copyWith =>
|
||||
__$$DietImplCopyWithImpl<_$DietImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -627,65 +654,56 @@ class _$DietImpl implements _Diet {
|
||||
|
||||
abstract class _Diet implements Diet {
|
||||
const factory _Diet(
|
||||
{@JsonKey(name: "id") required final int id,
|
||||
@JsonKey(name: "name") required final String name,
|
||||
@JsonKey(name: "image") required final String image,
|
||||
@JsonKey(name: "duration") required final int duration,
|
||||
@JsonKey(name: "state") required final String state,
|
||||
@JsonKey(name: "type") required final DietType type,
|
||||
@JsonKey(name: "details") required final String details,
|
||||
@JsonKey(name: "daily_schedule") required final List<List<List<DailySchedule>>> dailySchedule,
|
||||
@JsonKey(name: "author") required final Author author,
|
||||
@JsonKey(name: "total_likes") required final int totalLikes,
|
||||
@JsonKey(name: "total_views") required final int totalViews,
|
||||
@JsonKey(name: "total_comments") required final int totalComments}) = _$DietImpl;
|
||||
{@JsonKey(name: "id") required final int id,
|
||||
@JsonKey(name: "name") required final String name,
|
||||
@JsonKey(name: "image") required final String image,
|
||||
@JsonKey(name: "duration") required final int duration,
|
||||
@JsonKey(name: "state") required final String state,
|
||||
@JsonKey(name: "type") required final DietType type,
|
||||
@JsonKey(name: "details") required final String details,
|
||||
@JsonKey(name: "daily_schedule")
|
||||
required final List<List<List<DailySchedule>>> dailySchedule,
|
||||
@JsonKey(name: "author") required final Author author,
|
||||
@JsonKey(name: "total_likes") required final int totalLikes,
|
||||
@JsonKey(name: "total_views") required final int totalViews,
|
||||
@JsonKey(name: "total_comments") required final int totalComments}) =
|
||||
_$DietImpl;
|
||||
|
||||
factory _Diet.fromJson(Map<String, dynamic> json) = _$DietImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
int get id;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "name")
|
||||
String get name;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "image")
|
||||
String get image;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "duration")
|
||||
int get duration;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "state")
|
||||
String get state;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "type")
|
||||
DietType get type;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "details")
|
||||
String get details;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "daily_schedule")
|
||||
List<List<List<DailySchedule>>> get dailySchedule;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "author")
|
||||
Author get author;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "total_likes")
|
||||
int get totalLikes;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "total_views")
|
||||
int get totalViews;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "total_comments")
|
||||
int get totalComments;
|
||||
@@ -694,7 +712,8 @@ abstract class _Diet implements Diet {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DietImplCopyWith<_$DietImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$DietImplCopyWith<_$DietImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Author _$AuthorFromJson(Map<String, dynamic> json) {
|
||||
@@ -705,13 +724,10 @@ Author _$AuthorFromJson(Map<String, dynamic> json) {
|
||||
mixin _$Author {
|
||||
@JsonKey(name: "author_slug")
|
||||
String get authorSlug => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "author_name")
|
||||
String get authorName => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "author_profile_icon")
|
||||
String get authorProfileIcon => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "author_is_me")
|
||||
bool get authorIsMe => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -726,8 +742,8 @@ mixin _$Author {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $AuthorCopyWith<$Res> {
|
||||
factory $AuthorCopyWith(Author value, $Res Function(Author) then) = _$AuthorCopyWithImpl<$Res, Author>;
|
||||
|
||||
factory $AuthorCopyWith(Author value, $Res Function(Author) then) =
|
||||
_$AuthorCopyWithImpl<$Res, Author>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "author_slug") String authorSlug,
|
||||
@@ -737,12 +753,12 @@ abstract class $AuthorCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$AuthorCopyWithImpl<$Res, $Val extends Author> implements $AuthorCopyWith<$Res> {
|
||||
class _$AuthorCopyWithImpl<$Res, $Val extends Author>
|
||||
implements $AuthorCopyWith<$Res> {
|
||||
_$AuthorCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -779,8 +795,9 @@ class _$AuthorCopyWithImpl<$Res, $Val extends Author> implements $AuthorCopyWith
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$AuthorImplCopyWith<$Res> implements $AuthorCopyWith<$Res> {
|
||||
factory _$$AuthorImplCopyWith(_$AuthorImpl value, $Res Function(_$AuthorImpl) then) = __$$AuthorImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$AuthorImplCopyWith(
|
||||
_$AuthorImpl value, $Res Function(_$AuthorImpl) then) =
|
||||
__$$AuthorImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -791,8 +808,12 @@ abstract class _$$AuthorImplCopyWith<$Res> implements $AuthorCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$AuthorImplCopyWithImpl<$Res> extends _$AuthorCopyWithImpl<$Res, _$AuthorImpl> implements _$$AuthorImplCopyWith<$Res> {
|
||||
__$$AuthorImplCopyWithImpl(_$AuthorImpl _value, $Res Function(_$AuthorImpl) _then) : super(_value, _then);
|
||||
class __$$AuthorImplCopyWithImpl<$Res>
|
||||
extends _$AuthorCopyWithImpl<$Res, _$AuthorImpl>
|
||||
implements _$$AuthorImplCopyWith<$Res> {
|
||||
__$$AuthorImplCopyWithImpl(
|
||||
_$AuthorImpl _value, $Res Function(_$AuthorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Author
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -834,7 +855,8 @@ class _$AuthorImpl implements _Author {
|
||||
@JsonKey(name: "author_profile_icon") required this.authorProfileIcon,
|
||||
@JsonKey(name: "author_is_me") required this.authorIsMe});
|
||||
|
||||
factory _$AuthorImpl.fromJson(Map<String, dynamic> json) => _$$AuthorImplFromJson(json);
|
||||
factory _$AuthorImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$AuthorImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "author_slug")
|
||||
@@ -859,22 +881,28 @@ class _$AuthorImpl implements _Author {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$AuthorImpl &&
|
||||
(identical(other.authorSlug, authorSlug) || other.authorSlug == authorSlug) &&
|
||||
(identical(other.authorName, authorName) || other.authorName == authorName) &&
|
||||
(identical(other.authorProfileIcon, authorProfileIcon) || other.authorProfileIcon == authorProfileIcon) &&
|
||||
(identical(other.authorIsMe, authorIsMe) || other.authorIsMe == authorIsMe));
|
||||
(identical(other.authorSlug, authorSlug) ||
|
||||
other.authorSlug == authorSlug) &&
|
||||
(identical(other.authorName, authorName) ||
|
||||
other.authorName == authorName) &&
|
||||
(identical(other.authorProfileIcon, authorProfileIcon) ||
|
||||
other.authorProfileIcon == authorProfileIcon) &&
|
||||
(identical(other.authorIsMe, authorIsMe) ||
|
||||
other.authorIsMe == authorIsMe));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, authorSlug, authorName, authorProfileIcon, authorIsMe);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, authorSlug, authorName, authorProfileIcon, authorIsMe);
|
||||
|
||||
/// Create a copy of Author
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$AuthorImplCopyWith<_$AuthorImpl> get copyWith => __$$AuthorImplCopyWithImpl<_$AuthorImpl>(this, _$identity);
|
||||
_$$AuthorImplCopyWith<_$AuthorImpl> get copyWith =>
|
||||
__$$AuthorImplCopyWithImpl<_$AuthorImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -886,25 +914,24 @@ class _$AuthorImpl implements _Author {
|
||||
|
||||
abstract class _Author implements Author {
|
||||
const factory _Author(
|
||||
{@JsonKey(name: "author_slug") required final String authorSlug,
|
||||
@JsonKey(name: "author_name") required final String authorName,
|
||||
@JsonKey(name: "author_profile_icon") required final String authorProfileIcon,
|
||||
@JsonKey(name: "author_is_me") required final bool authorIsMe}) = _$AuthorImpl;
|
||||
{@JsonKey(name: "author_slug") required final String authorSlug,
|
||||
@JsonKey(name: "author_name") required final String authorName,
|
||||
@JsonKey(name: "author_profile_icon")
|
||||
required final String authorProfileIcon,
|
||||
@JsonKey(name: "author_is_me") required final bool authorIsMe}) =
|
||||
_$AuthorImpl;
|
||||
|
||||
factory _Author.fromJson(Map<String, dynamic> json) = _$AuthorImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "author_slug")
|
||||
String get authorSlug;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "author_name")
|
||||
String get authorName;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "author_profile_icon")
|
||||
String get authorProfileIcon;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "author_is_me")
|
||||
bool get authorIsMe;
|
||||
@@ -913,7 +940,8 @@ abstract class _Author implements Author {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$AuthorImplCopyWith<_$AuthorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$AuthorImplCopyWith<_$AuthorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
DailySchedule _$DailyScheduleFromJson(Map<String, dynamic> json) {
|
||||
@@ -924,13 +952,10 @@ DailySchedule _$DailyScheduleFromJson(Map<String, dynamic> json) {
|
||||
mixin _$DailySchedule {
|
||||
@JsonKey(name: "name")
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "uniq")
|
||||
String get uniq => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "portion")
|
||||
Portion get portion => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "quantity")
|
||||
int get quantity => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -940,13 +965,15 @@ mixin _$DailySchedule {
|
||||
/// Create a copy of DailySchedule
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$DailyScheduleCopyWith<DailySchedule> get copyWith => throw _privateConstructorUsedError;
|
||||
$DailyScheduleCopyWith<DailySchedule> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $DailyScheduleCopyWith<$Res> {
|
||||
factory $DailyScheduleCopyWith(DailySchedule value, $Res Function(DailySchedule) then) = _$DailyScheduleCopyWithImpl<$Res, DailySchedule>;
|
||||
|
||||
factory $DailyScheduleCopyWith(
|
||||
DailySchedule value, $Res Function(DailySchedule) then) =
|
||||
_$DailyScheduleCopyWithImpl<$Res, DailySchedule>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "name") String name,
|
||||
@@ -956,12 +983,12 @@ abstract class $DailyScheduleCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$DailyScheduleCopyWithImpl<$Res, $Val extends DailySchedule> implements $DailyScheduleCopyWith<$Res> {
|
||||
class _$DailyScheduleCopyWithImpl<$Res, $Val extends DailySchedule>
|
||||
implements $DailyScheduleCopyWith<$Res> {
|
||||
_$DailyScheduleCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -997,9 +1024,11 @@ class _$DailyScheduleCopyWithImpl<$Res, $Val extends DailySchedule> implements $
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DailyScheduleImplCopyWith<$Res> implements $DailyScheduleCopyWith<$Res> {
|
||||
factory _$$DailyScheduleImplCopyWith(_$DailyScheduleImpl value, $Res Function(_$DailyScheduleImpl) then) = __$$DailyScheduleImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$DailyScheduleImplCopyWith<$Res>
|
||||
implements $DailyScheduleCopyWith<$Res> {
|
||||
factory _$$DailyScheduleImplCopyWith(
|
||||
_$DailyScheduleImpl value, $Res Function(_$DailyScheduleImpl) then) =
|
||||
__$$DailyScheduleImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -1010,8 +1039,12 @@ abstract class _$$DailyScheduleImplCopyWith<$Res> implements $DailyScheduleCopyW
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DailyScheduleImplCopyWithImpl<$Res> extends _$DailyScheduleCopyWithImpl<$Res, _$DailyScheduleImpl> implements _$$DailyScheduleImplCopyWith<$Res> {
|
||||
__$$DailyScheduleImplCopyWithImpl(_$DailyScheduleImpl _value, $Res Function(_$DailyScheduleImpl) _then) : super(_value, _then);
|
||||
class __$$DailyScheduleImplCopyWithImpl<$Res>
|
||||
extends _$DailyScheduleCopyWithImpl<$Res, _$DailyScheduleImpl>
|
||||
implements _$$DailyScheduleImplCopyWith<$Res> {
|
||||
__$$DailyScheduleImplCopyWithImpl(
|
||||
_$DailyScheduleImpl _value, $Res Function(_$DailyScheduleImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DailySchedule
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -1053,7 +1086,8 @@ class _$DailyScheduleImpl implements _DailySchedule {
|
||||
@JsonKey(name: "portion") required this.portion,
|
||||
@JsonKey(name: "quantity") required this.quantity});
|
||||
|
||||
factory _$DailyScheduleImpl.fromJson(Map<String, dynamic> json) => _$$DailyScheduleImplFromJson(json);
|
||||
factory _$DailyScheduleImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$DailyScheduleImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "name")
|
||||
@@ -1081,7 +1115,8 @@ class _$DailyScheduleImpl implements _DailySchedule {
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
(identical(other.uniq, uniq) || other.uniq == uniq) &&
|
||||
(identical(other.portion, portion) || other.portion == portion) &&
|
||||
(identical(other.quantity, quantity) || other.quantity == quantity));
|
||||
(identical(other.quantity, quantity) ||
|
||||
other.quantity == quantity));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -1093,7 +1128,8 @@ class _$DailyScheduleImpl implements _DailySchedule {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DailyScheduleImplCopyWith<_$DailyScheduleImpl> get copyWith => __$$DailyScheduleImplCopyWithImpl<_$DailyScheduleImpl>(this, _$identity);
|
||||
_$$DailyScheduleImplCopyWith<_$DailyScheduleImpl> get copyWith =>
|
||||
__$$DailyScheduleImplCopyWithImpl<_$DailyScheduleImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -1105,25 +1141,24 @@ class _$DailyScheduleImpl implements _DailySchedule {
|
||||
|
||||
abstract class _DailySchedule implements DailySchedule {
|
||||
const factory _DailySchedule(
|
||||
{@JsonKey(name: "name") required final String name,
|
||||
@JsonKey(name: "uniq") required final String uniq,
|
||||
@JsonKey(name: "portion") required final Portion portion,
|
||||
@JsonKey(name: "quantity") required final int quantity}) = _$DailyScheduleImpl;
|
||||
{@JsonKey(name: "name") required final String name,
|
||||
@JsonKey(name: "uniq") required final String uniq,
|
||||
@JsonKey(name: "portion") required final Portion portion,
|
||||
@JsonKey(name: "quantity") required final int quantity}) =
|
||||
_$DailyScheduleImpl;
|
||||
|
||||
factory _DailySchedule.fromJson(Map<String, dynamic> json) = _$DailyScheduleImpl.fromJson;
|
||||
factory _DailySchedule.fromJson(Map<String, dynamic> json) =
|
||||
_$DailyScheduleImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "name")
|
||||
String get name;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "uniq")
|
||||
String get uniq;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "portion")
|
||||
Portion get portion;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "quantity")
|
||||
int get quantity;
|
||||
@@ -1132,7 +1167,8 @@ abstract class _DailySchedule implements DailySchedule {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DailyScheduleImplCopyWith<_$DailyScheduleImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$DailyScheduleImplCopyWith<_$DailyScheduleImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
DietType _$DietTypeFromJson(Map<String, dynamic> json) {
|
||||
@@ -1143,13 +1179,10 @@ DietType _$DietTypeFromJson(Map<String, dynamic> json) {
|
||||
mixin _$DietType {
|
||||
@JsonKey(name: "alko")
|
||||
bool? get alko => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "veg")
|
||||
bool? get veg => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "corb")
|
||||
bool? get corb => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "meat")
|
||||
bool? get meat => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -1159,24 +1192,29 @@ mixin _$DietType {
|
||||
/// Create a copy of DietType
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$DietTypeCopyWith<DietType> get copyWith => throw _privateConstructorUsedError;
|
||||
$DietTypeCopyWith<DietType> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $DietTypeCopyWith<$Res> {
|
||||
factory $DietTypeCopyWith(DietType value, $Res Function(DietType) then) = _$DietTypeCopyWithImpl<$Res, DietType>;
|
||||
|
||||
factory $DietTypeCopyWith(DietType value, $Res Function(DietType) then) =
|
||||
_$DietTypeCopyWithImpl<$Res, DietType>;
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "alko") bool? alko, @JsonKey(name: "veg") bool? veg, @JsonKey(name: "corb") bool? corb, @JsonKey(name: "meat") bool? meat});
|
||||
$Res call(
|
||||
{@JsonKey(name: "alko") bool? alko,
|
||||
@JsonKey(name: "veg") bool? veg,
|
||||
@JsonKey(name: "corb") bool? corb,
|
||||
@JsonKey(name: "meat") bool? meat});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$DietTypeCopyWithImpl<$Res, $Val extends DietType> implements $DietTypeCopyWith<$Res> {
|
||||
class _$DietTypeCopyWithImpl<$Res, $Val extends DietType>
|
||||
implements $DietTypeCopyWith<$Res> {
|
||||
_$DietTypeCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -1212,17 +1250,27 @@ class _$DietTypeCopyWithImpl<$Res, $Val extends DietType> implements $DietTypeCo
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DietTypeImplCopyWith<$Res> implements $DietTypeCopyWith<$Res> {
|
||||
factory _$$DietTypeImplCopyWith(_$DietTypeImpl value, $Res Function(_$DietTypeImpl) then) = __$$DietTypeImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$DietTypeImplCopyWith<$Res>
|
||||
implements $DietTypeCopyWith<$Res> {
|
||||
factory _$$DietTypeImplCopyWith(
|
||||
_$DietTypeImpl value, $Res Function(_$DietTypeImpl) then) =
|
||||
__$$DietTypeImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "alko") bool? alko, @JsonKey(name: "veg") bool? veg, @JsonKey(name: "corb") bool? corb, @JsonKey(name: "meat") bool? meat});
|
||||
$Res call(
|
||||
{@JsonKey(name: "alko") bool? alko,
|
||||
@JsonKey(name: "veg") bool? veg,
|
||||
@JsonKey(name: "corb") bool? corb,
|
||||
@JsonKey(name: "meat") bool? meat});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DietTypeImplCopyWithImpl<$Res> extends _$DietTypeCopyWithImpl<$Res, _$DietTypeImpl> implements _$$DietTypeImplCopyWith<$Res> {
|
||||
__$$DietTypeImplCopyWithImpl(_$DietTypeImpl _value, $Res Function(_$DietTypeImpl) _then) : super(_value, _then);
|
||||
class __$$DietTypeImplCopyWithImpl<$Res>
|
||||
extends _$DietTypeCopyWithImpl<$Res, _$DietTypeImpl>
|
||||
implements _$$DietTypeImplCopyWith<$Res> {
|
||||
__$$DietTypeImplCopyWithImpl(
|
||||
_$DietTypeImpl _value, $Res Function(_$DietTypeImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DietType
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -1258,9 +1306,14 @@ class __$$DietTypeImplCopyWithImpl<$Res> extends _$DietTypeCopyWithImpl<$Res, _$
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$DietTypeImpl implements _DietType {
|
||||
const _$DietTypeImpl({@JsonKey(name: "alko") this.alko, @JsonKey(name: "veg") this.veg, @JsonKey(name: "corb") this.corb, @JsonKey(name: "meat") this.meat});
|
||||
const _$DietTypeImpl(
|
||||
{@JsonKey(name: "alko") this.alko,
|
||||
@JsonKey(name: "veg") this.veg,
|
||||
@JsonKey(name: "corb") this.corb,
|
||||
@JsonKey(name: "meat") this.meat});
|
||||
|
||||
factory _$DietTypeImpl.fromJson(Map<String, dynamic> json) => _$$DietTypeImplFromJson(json);
|
||||
factory _$DietTypeImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$DietTypeImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "alko")
|
||||
@@ -1300,7 +1353,8 @@ class _$DietTypeImpl implements _DietType {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DietTypeImplCopyWith<_$DietTypeImpl> get copyWith => __$$DietTypeImplCopyWithImpl<_$DietTypeImpl>(this, _$identity);
|
||||
_$$DietTypeImplCopyWith<_$DietTypeImpl> get copyWith =>
|
||||
__$$DietTypeImplCopyWithImpl<_$DietTypeImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -1317,20 +1371,18 @@ abstract class _DietType implements DietType {
|
||||
@JsonKey(name: "corb") final bool? corb,
|
||||
@JsonKey(name: "meat") final bool? meat}) = _$DietTypeImpl;
|
||||
|
||||
factory _DietType.fromJson(Map<String, dynamic> json) = _$DietTypeImpl.fromJson;
|
||||
factory _DietType.fromJson(Map<String, dynamic> json) =
|
||||
_$DietTypeImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "alko")
|
||||
bool? get alko;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "veg")
|
||||
bool? get veg;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "corb")
|
||||
bool? get corb;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "meat")
|
||||
bool? get meat;
|
||||
@@ -1339,5 +1391,6 @@ abstract class _DietType implements DietType {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DietTypeImplCopyWith<_$DietTypeImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$DietTypeImplCopyWith<_$DietTypeImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,13 +6,19 @@ part of 'diets_pagination_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$DietsPaginationImpl _$$DietsPaginationImplFromJson(Map<String, dynamic> json) => _$DietsPaginationImpl(
|
||||
data: (json['data'] as List<dynamic>).map((e) => Diet.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
_$DietsPaginationImpl _$$DietsPaginationImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$DietsPaginationImpl(
|
||||
data: (json['data'] as List<dynamic>)
|
||||
.map((e) => Diet.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
links: Links.fromJson(json['links'] as Map<String, dynamic>),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DietsPaginationImplToJson(_$DietsPaginationImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$DietsPaginationImplToJson(
|
||||
_$DietsPaginationImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.data,
|
||||
'links': instance.links,
|
||||
'meta': instance.meta,
|
||||
@@ -27,7 +33,11 @@ _$DietImpl _$$DietImplFromJson(Map<String, dynamic> json) => _$DietImpl(
|
||||
type: DietType.fromJson(json['type'] as Map<String, dynamic>),
|
||||
details: json['details'] as String,
|
||||
dailySchedule: (json['daily_schedule'] as List<dynamic>)
|
||||
.map((e) => (e as List<dynamic>).map((e) => (e as List<dynamic>).map((e) => DailySchedule.fromJson(e as Map<String, dynamic>)).toList()).toList())
|
||||
.map((e) => (e as List<dynamic>)
|
||||
.map((e) => (e as List<dynamic>)
|
||||
.map((e) => DailySchedule.fromJson(e as Map<String, dynamic>))
|
||||
.toList())
|
||||
.toList())
|
||||
.toList(),
|
||||
author: Author.fromJson(json['author'] as Map<String, dynamic>),
|
||||
totalLikes: (json['total_likes'] as num).toInt(),
|
||||
@@ -35,7 +45,8 @@ _$DietImpl _$$DietImplFromJson(Map<String, dynamic> json) => _$DietImpl(
|
||||
totalComments: (json['total_comments'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DietImplToJson(_$DietImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$DietImplToJson(_$DietImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'image': instance.image,
|
||||
@@ -57,21 +68,24 @@ _$AuthorImpl _$$AuthorImplFromJson(Map<String, dynamic> json) => _$AuthorImpl(
|
||||
authorIsMe: json['author_is_me'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$AuthorImplToJson(_$AuthorImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$AuthorImplToJson(_$AuthorImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'author_slug': instance.authorSlug,
|
||||
'author_name': instance.authorName,
|
||||
'author_profile_icon': instance.authorProfileIcon,
|
||||
'author_is_me': instance.authorIsMe,
|
||||
};
|
||||
|
||||
_$DailyScheduleImpl _$$DailyScheduleImplFromJson(Map<String, dynamic> json) => _$DailyScheduleImpl(
|
||||
_$DailyScheduleImpl _$$DailyScheduleImplFromJson(Map<String, dynamic> json) =>
|
||||
_$DailyScheduleImpl(
|
||||
name: json['name'] as String,
|
||||
uniq: json['uniq'] as String,
|
||||
portion: $enumDecode(_$PortionEnumMap, json['portion']),
|
||||
quantity: (json['quantity'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DailyScheduleImplToJson(_$DailyScheduleImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$DailyScheduleImplToJson(_$DailyScheduleImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'name': instance.name,
|
||||
'uniq': instance.uniq,
|
||||
'portion': _$PortionEnumMap[instance.portion]!,
|
||||
@@ -84,14 +98,16 @@ const _$PortionEnumMap = {
|
||||
Portion.PCS: 'pcs',
|
||||
};
|
||||
|
||||
_$DietTypeImpl _$$DietTypeImplFromJson(Map<String, dynamic> json) => _$DietTypeImpl(
|
||||
_$DietTypeImpl _$$DietTypeImplFromJson(Map<String, dynamic> json) =>
|
||||
_$DietTypeImpl(
|
||||
alko: json['alko'] as bool?,
|
||||
veg: json['veg'] as bool?,
|
||||
corb: json['corb'] as bool?,
|
||||
meat: json['meat'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DietTypeImplToJson(_$DietTypeImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$DietTypeImplToJson(_$DietTypeImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'alko': instance.alko,
|
||||
'veg': instance.veg,
|
||||
'corb': instance.corb,
|
||||
|
||||
@@ -21,35 +21,23 @@ FeedBlogPostModel _$FeedBlogPostModelFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$FeedBlogPostModel {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get state => throw _privateConstructorUsedError;
|
||||
|
||||
String get image => throw _privateConstructorUsedError;
|
||||
|
||||
String get description => throw _privateConstructorUsedError;
|
||||
|
||||
Author get author => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "youtube_url")
|
||||
String get youtubeUrl => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt => throw _privateConstructorUsedError;
|
||||
|
||||
String get title => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "total_likes")
|
||||
int get totalLikes => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "total_views")
|
||||
int get totalViews => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "total_comments")
|
||||
int get totalComments => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "was_liked_by_me")
|
||||
bool get wasLikedByMe => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -59,13 +47,15 @@ mixin _$FeedBlogPostModel {
|
||||
/// Create a copy of FeedBlogPostModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$FeedBlogPostModelCopyWith<FeedBlogPostModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$FeedBlogPostModelCopyWith<FeedBlogPostModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $FeedBlogPostModelCopyWith<$Res> {
|
||||
factory $FeedBlogPostModelCopyWith(FeedBlogPostModel value, $Res Function(FeedBlogPostModel) then) = _$FeedBlogPostModelCopyWithImpl<$Res, FeedBlogPostModel>;
|
||||
|
||||
factory $FeedBlogPostModelCopyWith(
|
||||
FeedBlogPostModel value, $Res Function(FeedBlogPostModel) then) =
|
||||
_$FeedBlogPostModelCopyWithImpl<$Res, FeedBlogPostModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
@@ -86,12 +76,12 @@ abstract class $FeedBlogPostModelCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel> implements $FeedBlogPostModelCopyWith<$Res> {
|
||||
class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
|
||||
implements $FeedBlogPostModelCopyWith<$Res> {
|
||||
_$FeedBlogPostModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -182,10 +172,11 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel> impl
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FeedBlogPostModelImplCopyWith<$Res> implements $FeedBlogPostModelCopyWith<$Res> {
|
||||
factory _$$FeedBlogPostModelImplCopyWith(_$FeedBlogPostModelImpl value, $Res Function(_$FeedBlogPostModelImpl) then) =
|
||||
abstract class _$$FeedBlogPostModelImplCopyWith<$Res>
|
||||
implements $FeedBlogPostModelCopyWith<$Res> {
|
||||
factory _$$FeedBlogPostModelImplCopyWith(_$FeedBlogPostModelImpl value,
|
||||
$Res Function(_$FeedBlogPostModelImpl) then) =
|
||||
__$$FeedBlogPostModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -208,9 +199,12 @@ abstract class _$$FeedBlogPostModelImplCopyWith<$Res> implements $FeedBlogPostMo
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedBlogPostModelImplCopyWithImpl<$Res> extends _$FeedBlogPostModelCopyWithImpl<$Res, _$FeedBlogPostModelImpl>
|
||||
class __$$FeedBlogPostModelImplCopyWithImpl<$Res>
|
||||
extends _$FeedBlogPostModelCopyWithImpl<$Res, _$FeedBlogPostModelImpl>
|
||||
implements _$$FeedBlogPostModelImplCopyWith<$Res> {
|
||||
__$$FeedBlogPostModelImplCopyWithImpl(_$FeedBlogPostModelImpl _value, $Res Function(_$FeedBlogPostModelImpl) _then) : super(_value, _then);
|
||||
__$$FeedBlogPostModelImplCopyWithImpl(_$FeedBlogPostModelImpl _value,
|
||||
$Res Function(_$FeedBlogPostModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of FeedBlogPostModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -306,7 +300,8 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
|
||||
@JsonKey(name: "total_comments") required this.totalComments,
|
||||
@JsonKey(name: "was_liked_by_me") required this.wasLikedByMe});
|
||||
|
||||
factory _$FeedBlogPostModelImpl.fromJson(Map<String, dynamic> json) => _$$FeedBlogPostModelImplFromJson(json);
|
||||
factory _$FeedBlogPostModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$FeedBlogPostModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -355,29 +350,52 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.state, state) || other.state == state) &&
|
||||
(identical(other.image, image) || other.image == image) &&
|
||||
(identical(other.description, description) || other.description == description) &&
|
||||
(identical(other.description, description) ||
|
||||
other.description == description) &&
|
||||
(identical(other.author, author) || other.author == author) &&
|
||||
(identical(other.youtubeUrl, youtubeUrl) || other.youtubeUrl == youtubeUrl) &&
|
||||
(identical(other.createdAt, createdAt) || other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) &&
|
||||
(identical(other.youtubeUrl, youtubeUrl) ||
|
||||
other.youtubeUrl == youtubeUrl) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt) &&
|
||||
(identical(other.title, title) || other.title == title) &&
|
||||
(identical(other.totalLikes, totalLikes) || other.totalLikes == totalLikes) &&
|
||||
(identical(other.totalViews, totalViews) || other.totalViews == totalViews) &&
|
||||
(identical(other.totalComments, totalComments) || other.totalComments == totalComments) &&
|
||||
(identical(other.wasLikedByMe, wasLikedByMe) || other.wasLikedByMe == wasLikedByMe));
|
||||
(identical(other.totalLikes, totalLikes) ||
|
||||
other.totalLikes == totalLikes) &&
|
||||
(identical(other.totalViews, totalViews) ||
|
||||
other.totalViews == totalViews) &&
|
||||
(identical(other.totalComments, totalComments) ||
|
||||
other.totalComments == totalComments) &&
|
||||
(identical(other.wasLikedByMe, wasLikedByMe) ||
|
||||
other.wasLikedByMe == wasLikedByMe));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, id, state, image, description, author, youtubeUrl, createdAt, updatedAt, title, totalLikes, totalViews, totalComments, wasLikedByMe);
|
||||
runtimeType,
|
||||
id,
|
||||
state,
|
||||
image,
|
||||
description,
|
||||
author,
|
||||
youtubeUrl,
|
||||
createdAt,
|
||||
updatedAt,
|
||||
title,
|
||||
totalLikes,
|
||||
totalViews,
|
||||
totalComments,
|
||||
wasLikedByMe);
|
||||
|
||||
/// Create a copy of FeedBlogPostModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith => __$$FeedBlogPostModelImplCopyWithImpl<_$FeedBlogPostModelImpl>(this, _$identity);
|
||||
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
|
||||
__$$FeedBlogPostModelImplCopyWithImpl<_$FeedBlogPostModelImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -389,64 +407,54 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
|
||||
|
||||
abstract class _FeedBlogPostModel implements FeedBlogPostModel {
|
||||
const factory _FeedBlogPostModel(
|
||||
{required final int id,
|
||||
required final String state,
|
||||
required final String image,
|
||||
required final String description,
|
||||
required final Author author,
|
||||
@JsonKey(name: "youtube_url") required final String youtubeUrl,
|
||||
@JsonKey(name: "created_at") required final DateTime createdAt,
|
||||
@JsonKey(name: "updated_at") required final DateTime updatedAt,
|
||||
required final String title,
|
||||
@JsonKey(name: "total_likes") required final int totalLikes,
|
||||
@JsonKey(name: "total_views") required final int totalViews,
|
||||
@JsonKey(name: "total_comments") required final int totalComments,
|
||||
@JsonKey(name: "was_liked_by_me") required final bool wasLikedByMe}) = _$FeedBlogPostModelImpl;
|
||||
{required final int id,
|
||||
required final String state,
|
||||
required final String image,
|
||||
required final String description,
|
||||
required final Author author,
|
||||
@JsonKey(name: "youtube_url") required final String youtubeUrl,
|
||||
@JsonKey(name: "created_at") required final DateTime createdAt,
|
||||
@JsonKey(name: "updated_at") required final DateTime updatedAt,
|
||||
required final String title,
|
||||
@JsonKey(name: "total_likes") required final int totalLikes,
|
||||
@JsonKey(name: "total_views") required final int totalViews,
|
||||
@JsonKey(name: "total_comments") required final int totalComments,
|
||||
@JsonKey(name: "was_liked_by_me") required final bool wasLikedByMe}) =
|
||||
_$FeedBlogPostModelImpl;
|
||||
|
||||
factory _FeedBlogPostModel.fromJson(Map<String, dynamic> json) = _$FeedBlogPostModelImpl.fromJson;
|
||||
factory _FeedBlogPostModel.fromJson(Map<String, dynamic> json) =
|
||||
_$FeedBlogPostModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
String get state;
|
||||
|
||||
@override
|
||||
String get image;
|
||||
|
||||
@override
|
||||
String get description;
|
||||
|
||||
@override
|
||||
Author get author;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "youtube_url")
|
||||
String get youtubeUrl;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt;
|
||||
|
||||
@override
|
||||
String get title;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "total_likes")
|
||||
int get totalLikes;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "total_views")
|
||||
int get totalViews;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "total_comments")
|
||||
int get totalComments;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "was_liked_by_me")
|
||||
bool get wasLikedByMe;
|
||||
@@ -455,5 +463,6 @@ abstract class _FeedBlogPostModel implements FeedBlogPostModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ part of 'feed_blog_post_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(Map<String, dynamic> json) => _$FeedBlogPostModelImpl(
|
||||
_$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$FeedBlogPostModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
state: json['state'] as String,
|
||||
image: json['image'] as String,
|
||||
@@ -22,7 +24,9 @@ _$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(Map<String, dynamic> js
|
||||
wasLikedByMe: json['was_liked_by_me'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$FeedBlogPostModelImplToJson(_$FeedBlogPostModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$FeedBlogPostModelImplToJson(
|
||||
_$FeedBlogPostModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'state': instance.state,
|
||||
'image': instance.image,
|
||||
|
||||
@@ -14,15 +14,16 @@ T _$identity<T>(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');
|
||||
|
||||
FeedBlogPostSettingsModel _$FeedBlogPostSettingsModelFromJson(Map<String, dynamic> json) {
|
||||
FeedBlogPostSettingsModel _$FeedBlogPostSettingsModelFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return _FeedBlogPostSettingsModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$FeedBlogPostSettingsModel {
|
||||
@JsonKey(name: 'data')
|
||||
List<FeedBlogPostModel> get feedBlogPostList => throw _privateConstructorUsedError;
|
||||
|
||||
List<FeedBlogPostModel> get feedBlogPostList =>
|
||||
throw _privateConstructorUsedError;
|
||||
Meta get meta => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this FeedBlogPostSettingsModel to a JSON map.
|
||||
@@ -31,27 +32,31 @@ mixin _$FeedBlogPostSettingsModel {
|
||||
/// Create a copy of FeedBlogPostSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$FeedBlogPostSettingsModelCopyWith<FeedBlogPostSettingsModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$FeedBlogPostSettingsModelCopyWith<FeedBlogPostSettingsModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $FeedBlogPostSettingsModelCopyWith<$Res> {
|
||||
factory $FeedBlogPostSettingsModelCopyWith(FeedBlogPostSettingsModel value, $Res Function(FeedBlogPostSettingsModel) then) =
|
||||
factory $FeedBlogPostSettingsModelCopyWith(FeedBlogPostSettingsModel value,
|
||||
$Res Function(FeedBlogPostSettingsModel) then) =
|
||||
_$FeedBlogPostSettingsModelCopyWithImpl<$Res, FeedBlogPostSettingsModel>;
|
||||
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList, Meta meta});
|
||||
$Res call(
|
||||
{@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList,
|
||||
Meta meta});
|
||||
|
||||
$MetaCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$FeedBlogPostSettingsModelCopyWithImpl<$Res, $Val extends FeedBlogPostSettingsModel> implements $FeedBlogPostSettingsModelCopyWith<$Res> {
|
||||
class _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
|
||||
$Val extends FeedBlogPostSettingsModel>
|
||||
implements $FeedBlogPostSettingsModelCopyWith<$Res> {
|
||||
_$FeedBlogPostSettingsModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -87,22 +92,30 @@ class _$FeedBlogPostSettingsModelCopyWithImpl<$Res, $Val extends FeedBlogPostSet
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FeedBlogPostSettingsModelImplCopyWith<$Res> implements $FeedBlogPostSettingsModelCopyWith<$Res> {
|
||||
factory _$$FeedBlogPostSettingsModelImplCopyWith(_$FeedBlogPostSettingsModelImpl value, $Res Function(_$FeedBlogPostSettingsModelImpl) then) =
|
||||
abstract class _$$FeedBlogPostSettingsModelImplCopyWith<$Res>
|
||||
implements $FeedBlogPostSettingsModelCopyWith<$Res> {
|
||||
factory _$$FeedBlogPostSettingsModelImplCopyWith(
|
||||
_$FeedBlogPostSettingsModelImpl value,
|
||||
$Res Function(_$FeedBlogPostSettingsModelImpl) then) =
|
||||
__$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList, Meta meta});
|
||||
$Res call(
|
||||
{@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList,
|
||||
Meta meta});
|
||||
|
||||
@override
|
||||
$MetaCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res> extends _$FeedBlogPostSettingsModelCopyWithImpl<$Res, _$FeedBlogPostSettingsModelImpl>
|
||||
class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>
|
||||
extends _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
|
||||
_$FeedBlogPostSettingsModelImpl>
|
||||
implements _$$FeedBlogPostSettingsModelImplCopyWith<$Res> {
|
||||
__$$FeedBlogPostSettingsModelImplCopyWithImpl(_$FeedBlogPostSettingsModelImpl _value, $Res Function(_$FeedBlogPostSettingsModelImpl) _then)
|
||||
__$$FeedBlogPostSettingsModelImplCopyWithImpl(
|
||||
_$FeedBlogPostSettingsModelImpl _value,
|
||||
$Res Function(_$FeedBlogPostSettingsModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of FeedBlogPostSettingsModel
|
||||
@@ -129,17 +142,21 @@ class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res> extends _$FeedBlogPost
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
|
||||
const _$FeedBlogPostSettingsModelImpl({@JsonKey(name: 'data') required final List<FeedBlogPostModel> feedBlogPostList, required this.meta})
|
||||
const _$FeedBlogPostSettingsModelImpl(
|
||||
{@JsonKey(name: 'data')
|
||||
required final List<FeedBlogPostModel> feedBlogPostList,
|
||||
required this.meta})
|
||||
: _feedBlogPostList = feedBlogPostList;
|
||||
|
||||
factory _$FeedBlogPostSettingsModelImpl.fromJson(Map<String, dynamic> json) => _$$FeedBlogPostSettingsModelImplFromJson(json);
|
||||
factory _$FeedBlogPostSettingsModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$FeedBlogPostSettingsModelImplFromJson(json);
|
||||
|
||||
final List<FeedBlogPostModel> _feedBlogPostList;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'data')
|
||||
List<FeedBlogPostModel> get feedBlogPostList {
|
||||
if (_feedBlogPostList is EqualUnmodifiableListView) return _feedBlogPostList;
|
||||
if (_feedBlogPostList is EqualUnmodifiableListView)
|
||||
return _feedBlogPostList;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_feedBlogPostList);
|
||||
}
|
||||
@@ -157,21 +174,24 @@ class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$FeedBlogPostSettingsModelImpl &&
|
||||
const DeepCollectionEquality().equals(other._feedBlogPostList, _feedBlogPostList) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._feedBlogPostList, _feedBlogPostList) &&
|
||||
(identical(other.meta, meta) || other.meta == meta));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_feedBlogPostList), meta);
|
||||
int get hashCode => Object.hash(runtimeType,
|
||||
const DeepCollectionEquality().hash(_feedBlogPostList), meta);
|
||||
|
||||
/// Create a copy of FeedBlogPostSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl> get copyWith =>
|
||||
__$$FeedBlogPostSettingsModelImplCopyWithImpl<_$FeedBlogPostSettingsModelImpl>(this, _$identity);
|
||||
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
|
||||
get copyWith => __$$FeedBlogPostSettingsModelImplCopyWithImpl<
|
||||
_$FeedBlogPostSettingsModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -182,15 +202,17 @@ class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
|
||||
}
|
||||
|
||||
abstract class _FeedBlogPostSettingsModel implements FeedBlogPostSettingsModel {
|
||||
const factory _FeedBlogPostSettingsModel({@JsonKey(name: 'data') required final List<FeedBlogPostModel> feedBlogPostList, required final Meta meta}) =
|
||||
_$FeedBlogPostSettingsModelImpl;
|
||||
const factory _FeedBlogPostSettingsModel(
|
||||
{@JsonKey(name: 'data')
|
||||
required final List<FeedBlogPostModel> feedBlogPostList,
|
||||
required final Meta meta}) = _$FeedBlogPostSettingsModelImpl;
|
||||
|
||||
factory _FeedBlogPostSettingsModel.fromJson(Map<String, dynamic> json) = _$FeedBlogPostSettingsModelImpl.fromJson;
|
||||
factory _FeedBlogPostSettingsModel.fromJson(Map<String, dynamic> json) =
|
||||
_$FeedBlogPostSettingsModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'data')
|
||||
List<FeedBlogPostModel> get feedBlogPostList;
|
||||
|
||||
@override
|
||||
Meta get meta;
|
||||
|
||||
@@ -198,5 +220,6 @@ abstract class _FeedBlogPostSettingsModel implements FeedBlogPostSettingsModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,12 +6,18 @@ part of 'feed_blog_post_settings_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$FeedBlogPostSettingsModelImpl _$$FeedBlogPostSettingsModelImplFromJson(Map<String, dynamic> json) => _$FeedBlogPostSettingsModelImpl(
|
||||
feedBlogPostList: (json['data'] as List<dynamic>).map((e) => FeedBlogPostModel.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
_$FeedBlogPostSettingsModelImpl _$$FeedBlogPostSettingsModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$FeedBlogPostSettingsModelImpl(
|
||||
feedBlogPostList: (json['data'] as List<dynamic>)
|
||||
.map((e) => FeedBlogPostModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$FeedBlogPostSettingsModelImplToJson(_$FeedBlogPostSettingsModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$FeedBlogPostSettingsModelImplToJson(
|
||||
_$FeedBlogPostSettingsModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.feedBlogPostList,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
@@ -21,44 +21,28 @@ Recipes _$RecipesFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Recipes {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get image => throw _privateConstructorUsedError;
|
||||
|
||||
String get state => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'cooking_time')
|
||||
int get cookingTime => throw _privateConstructorUsedError;
|
||||
|
||||
List<Ingredient> get ingredients => throw _privateConstructorUsedError;
|
||||
|
||||
String get description => throw _privateConstructorUsedError;
|
||||
|
||||
List<Step> get steps => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'video_url')
|
||||
String get videoUrl => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'created_at')
|
||||
DateTime get createdAt => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'updated_at')
|
||||
DateTime get updatedAt => throw _privateConstructorUsedError;
|
||||
|
||||
String get title => throw _privateConstructorUsedError;
|
||||
|
||||
String get type => throw _privateConstructorUsedError;
|
||||
|
||||
String get slug => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'total_comments')
|
||||
int get commentsCount => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'total_likes')
|
||||
int get likesCount => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'total_views')
|
||||
int get viewsCount => throw _privateConstructorUsedError;
|
||||
|
||||
Author get author => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Recipes to a JSON map.
|
||||
@@ -72,8 +56,8 @@ mixin _$Recipes {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $RecipesCopyWith<$Res> {
|
||||
factory $RecipesCopyWith(Recipes value, $Res Function(Recipes) then) = _$RecipesCopyWithImpl<$Res, Recipes>;
|
||||
|
||||
factory $RecipesCopyWith(Recipes value, $Res Function(Recipes) then) =
|
||||
_$RecipesCopyWithImpl<$Res, Recipes>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
@@ -98,12 +82,12 @@ abstract class $RecipesCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$RecipesCopyWithImpl<$Res, $Val extends Recipes> implements $RecipesCopyWith<$Res> {
|
||||
class _$RecipesCopyWithImpl<$Res, $Val extends Recipes>
|
||||
implements $RecipesCopyWith<$Res> {
|
||||
_$RecipesCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -215,8 +199,9 @@ class _$RecipesCopyWithImpl<$Res, $Val extends Recipes> implements $RecipesCopyW
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipesImplCopyWith<$Res> implements $RecipesCopyWith<$Res> {
|
||||
factory _$$RecipesImplCopyWith(_$RecipesImpl value, $Res Function(_$RecipesImpl) then) = __$$RecipesImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$RecipesImplCopyWith(
|
||||
_$RecipesImpl value, $Res Function(_$RecipesImpl) then) =
|
||||
__$$RecipesImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -243,8 +228,12 @@ abstract class _$$RecipesImplCopyWith<$Res> implements $RecipesCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipesImplCopyWithImpl<$Res> extends _$RecipesCopyWithImpl<$Res, _$RecipesImpl> implements _$$RecipesImplCopyWith<$Res> {
|
||||
__$$RecipesImplCopyWithImpl(_$RecipesImpl _value, $Res Function(_$RecipesImpl) _then) : super(_value, _then);
|
||||
class __$$RecipesImplCopyWithImpl<$Res>
|
||||
extends _$RecipesCopyWithImpl<$Res, _$RecipesImpl>
|
||||
implements _$$RecipesImplCopyWith<$Res> {
|
||||
__$$RecipesImplCopyWithImpl(
|
||||
_$RecipesImpl _value, $Res Function(_$RecipesImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Recipes
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -366,7 +355,8 @@ class _$RecipesImpl implements _Recipes {
|
||||
: _ingredients = ingredients,
|
||||
_steps = steps;
|
||||
|
||||
factory _$RecipesImpl.fromJson(Map<String, dynamic> json) => _$$RecipesImplFromJson(json);
|
||||
factory _$RecipesImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$RecipesImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -378,7 +368,6 @@ class _$RecipesImpl implements _Recipes {
|
||||
@JsonKey(name: 'cooking_time')
|
||||
final int cookingTime;
|
||||
final List<Ingredient> _ingredients;
|
||||
|
||||
@override
|
||||
List<Ingredient> get ingredients {
|
||||
if (_ingredients is EqualUnmodifiableListView) return _ingredients;
|
||||
@@ -389,7 +378,6 @@ class _$RecipesImpl implements _Recipes {
|
||||
@override
|
||||
final String description;
|
||||
final List<Step> _steps;
|
||||
|
||||
@override
|
||||
List<Step> get steps {
|
||||
if (_steps is EqualUnmodifiableListView) return _steps;
|
||||
@@ -437,33 +425,60 @@ class _$RecipesImpl implements _Recipes {
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.image, image) || other.image == image) &&
|
||||
(identical(other.state, state) || other.state == state) &&
|
||||
(identical(other.cookingTime, cookingTime) || other.cookingTime == cookingTime) &&
|
||||
const DeepCollectionEquality().equals(other._ingredients, _ingredients) &&
|
||||
(identical(other.description, description) || other.description == description) &&
|
||||
(identical(other.cookingTime, cookingTime) ||
|
||||
other.cookingTime == cookingTime) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._ingredients, _ingredients) &&
|
||||
(identical(other.description, description) ||
|
||||
other.description == description) &&
|
||||
const DeepCollectionEquality().equals(other._steps, _steps) &&
|
||||
(identical(other.videoUrl, videoUrl) || other.videoUrl == videoUrl) &&
|
||||
(identical(other.createdAt, createdAt) || other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) &&
|
||||
(identical(other.videoUrl, videoUrl) ||
|
||||
other.videoUrl == videoUrl) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt) &&
|
||||
(identical(other.title, title) || other.title == title) &&
|
||||
(identical(other.type, type) || other.type == type) &&
|
||||
(identical(other.slug, slug) || other.slug == slug) &&
|
||||
(identical(other.commentsCount, commentsCount) || other.commentsCount == commentsCount) &&
|
||||
(identical(other.likesCount, likesCount) || other.likesCount == likesCount) &&
|
||||
(identical(other.viewsCount, viewsCount) || other.viewsCount == viewsCount) &&
|
||||
(identical(other.commentsCount, commentsCount) ||
|
||||
other.commentsCount == commentsCount) &&
|
||||
(identical(other.likesCount, likesCount) ||
|
||||
other.likesCount == likesCount) &&
|
||||
(identical(other.viewsCount, viewsCount) ||
|
||||
other.viewsCount == viewsCount) &&
|
||||
(identical(other.author, author) || other.author == author));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, image, state, cookingTime, const DeepCollectionEquality().hash(_ingredients), description,
|
||||
const DeepCollectionEquality().hash(_steps), videoUrl, createdAt, updatedAt, title, type, slug, commentsCount, likesCount, viewsCount, author);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
image,
|
||||
state,
|
||||
cookingTime,
|
||||
const DeepCollectionEquality().hash(_ingredients),
|
||||
description,
|
||||
const DeepCollectionEquality().hash(_steps),
|
||||
videoUrl,
|
||||
createdAt,
|
||||
updatedAt,
|
||||
title,
|
||||
type,
|
||||
slug,
|
||||
commentsCount,
|
||||
likesCount,
|
||||
viewsCount,
|
||||
author);
|
||||
|
||||
/// Create a copy of Recipes
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith => __$$RecipesImplCopyWithImpl<_$RecipesImpl>(this, _$identity);
|
||||
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith =>
|
||||
__$$RecipesImplCopyWithImpl<_$RecipesImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -497,59 +512,43 @@ abstract class _Recipes implements Recipes {
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
String get image;
|
||||
|
||||
@override
|
||||
String get state;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'cooking_time')
|
||||
int get cookingTime;
|
||||
|
||||
@override
|
||||
List<Ingredient> get ingredients;
|
||||
|
||||
@override
|
||||
String get description;
|
||||
|
||||
@override
|
||||
List<Step> get steps;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'video_url')
|
||||
String get videoUrl;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'created_at')
|
||||
DateTime get createdAt;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'updated_at')
|
||||
DateTime get updatedAt;
|
||||
|
||||
@override
|
||||
String get title;
|
||||
|
||||
@override
|
||||
String get type;
|
||||
|
||||
@override
|
||||
String get slug;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'total_comments')
|
||||
int get commentsCount;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'total_likes')
|
||||
int get likesCount;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'total_views')
|
||||
int get viewsCount;
|
||||
|
||||
@override
|
||||
Author get author;
|
||||
|
||||
@@ -557,7 +556,8 @@ abstract class _Recipes implements Recipes {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Ingredient _$IngredientFromJson(Map<String, dynamic> json) {
|
||||
@@ -567,9 +567,7 @@ Ingredient _$IngredientFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Ingredient {
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
String? get unit => throw _privateConstructorUsedError;
|
||||
|
||||
String get portion => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Ingredient to a JSON map.
|
||||
@@ -578,24 +576,26 @@ mixin _$Ingredient {
|
||||
/// Create a copy of Ingredient
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$IngredientCopyWith<Ingredient> get copyWith => throw _privateConstructorUsedError;
|
||||
$IngredientCopyWith<Ingredient> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $IngredientCopyWith<$Res> {
|
||||
factory $IngredientCopyWith(Ingredient value, $Res Function(Ingredient) then) = _$IngredientCopyWithImpl<$Res, Ingredient>;
|
||||
|
||||
factory $IngredientCopyWith(
|
||||
Ingredient value, $Res Function(Ingredient) then) =
|
||||
_$IngredientCopyWithImpl<$Res, Ingredient>;
|
||||
@useResult
|
||||
$Res call({String name, String? unit, String portion});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient> implements $IngredientCopyWith<$Res> {
|
||||
class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient>
|
||||
implements $IngredientCopyWith<$Res> {
|
||||
_$IngredientCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -626,17 +626,23 @@ class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient> implements $Ingred
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$IngredientImplCopyWith<$Res> implements $IngredientCopyWith<$Res> {
|
||||
factory _$$IngredientImplCopyWith(_$IngredientImpl value, $Res Function(_$IngredientImpl) then) = __$$IngredientImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$IngredientImplCopyWith<$Res>
|
||||
implements $IngredientCopyWith<$Res> {
|
||||
factory _$$IngredientImplCopyWith(
|
||||
_$IngredientImpl value, $Res Function(_$IngredientImpl) then) =
|
||||
__$$IngredientImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String name, String? unit, String portion});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$IngredientImplCopyWithImpl<$Res> extends _$IngredientCopyWithImpl<$Res, _$IngredientImpl> implements _$$IngredientImplCopyWith<$Res> {
|
||||
__$$IngredientImplCopyWithImpl(_$IngredientImpl _value, $Res Function(_$IngredientImpl) _then) : super(_value, _then);
|
||||
class __$$IngredientImplCopyWithImpl<$Res>
|
||||
extends _$IngredientCopyWithImpl<$Res, _$IngredientImpl>
|
||||
implements _$$IngredientImplCopyWith<$Res> {
|
||||
__$$IngredientImplCopyWithImpl(
|
||||
_$IngredientImpl _value, $Res Function(_$IngredientImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Ingredient
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -667,9 +673,11 @@ class __$$IngredientImplCopyWithImpl<$Res> extends _$IngredientCopyWithImpl<$Res
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$IngredientImpl implements _Ingredient {
|
||||
const _$IngredientImpl({required this.name, this.unit, required this.portion});
|
||||
const _$IngredientImpl(
|
||||
{required this.name, this.unit, required this.portion});
|
||||
|
||||
factory _$IngredientImpl.fromJson(Map<String, dynamic> json) => _$$IngredientImplFromJson(json);
|
||||
factory _$IngredientImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$IngredientImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String name;
|
||||
@@ -702,7 +710,8 @@ class _$IngredientImpl implements _Ingredient {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith => __$$IngredientImplCopyWithImpl<_$IngredientImpl>(this, _$identity);
|
||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
|
||||
__$$IngredientImplCopyWithImpl<_$IngredientImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -713,16 +722,18 @@ class _$IngredientImpl implements _Ingredient {
|
||||
}
|
||||
|
||||
abstract class _Ingredient implements Ingredient {
|
||||
const factory _Ingredient({required final String name, final String? unit, required final String portion}) = _$IngredientImpl;
|
||||
const factory _Ingredient(
|
||||
{required final String name,
|
||||
final String? unit,
|
||||
required final String portion}) = _$IngredientImpl;
|
||||
|
||||
factory _Ingredient.fromJson(Map<String, dynamic> json) = _$IngredientImpl.fromJson;
|
||||
factory _Ingredient.fromJson(Map<String, dynamic> json) =
|
||||
_$IngredientImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get name;
|
||||
|
||||
@override
|
||||
String? get unit;
|
||||
|
||||
@override
|
||||
String get portion;
|
||||
|
||||
@@ -730,7 +741,8 @@ abstract class _Ingredient implements Ingredient {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Step _$StepFromJson(Map<String, dynamic> json) {
|
||||
@@ -740,7 +752,6 @@ Step _$StepFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Step {
|
||||
String get image => throw _privateConstructorUsedError;
|
||||
|
||||
String get description => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Step to a JSON map.
|
||||
@@ -754,19 +765,19 @@ mixin _$Step {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $StepCopyWith<$Res> {
|
||||
factory $StepCopyWith(Step value, $Res Function(Step) then) = _$StepCopyWithImpl<$Res, Step>;
|
||||
|
||||
factory $StepCopyWith(Step value, $Res Function(Step) then) =
|
||||
_$StepCopyWithImpl<$Res, Step>;
|
||||
@useResult
|
||||
$Res call({String image, String description});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$StepCopyWithImpl<$Res, $Val extends Step> implements $StepCopyWith<$Res> {
|
||||
class _$StepCopyWithImpl<$Res, $Val extends Step>
|
||||
implements $StepCopyWith<$Res> {
|
||||
_$StepCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -793,16 +804,20 @@ class _$StepCopyWithImpl<$Res, $Val extends Step> implements $StepCopyWith<$Res>
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$StepImplCopyWith<$Res> implements $StepCopyWith<$Res> {
|
||||
factory _$$StepImplCopyWith(_$StepImpl value, $Res Function(_$StepImpl) then) = __$$StepImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$StepImplCopyWith(
|
||||
_$StepImpl value, $Res Function(_$StepImpl) then) =
|
||||
__$$StepImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String image, String description});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$StepImplCopyWithImpl<$Res> extends _$StepCopyWithImpl<$Res, _$StepImpl> implements _$$StepImplCopyWith<$Res> {
|
||||
__$$StepImplCopyWithImpl(_$StepImpl _value, $Res Function(_$StepImpl) _then) : super(_value, _then);
|
||||
class __$$StepImplCopyWithImpl<$Res>
|
||||
extends _$StepCopyWithImpl<$Res, _$StepImpl>
|
||||
implements _$$StepImplCopyWith<$Res> {
|
||||
__$$StepImplCopyWithImpl(_$StepImpl _value, $Res Function(_$StepImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Step
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -830,7 +845,8 @@ class __$$StepImplCopyWithImpl<$Res> extends _$StepCopyWithImpl<$Res, _$StepImpl
|
||||
class _$StepImpl implements _Step {
|
||||
const _$StepImpl({required this.image, required this.description});
|
||||
|
||||
factory _$StepImpl.fromJson(Map<String, dynamic> json) => _$$StepImplFromJson(json);
|
||||
factory _$StepImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$StepImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String image;
|
||||
@@ -848,7 +864,8 @@ class _$StepImpl implements _Step {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$StepImpl &&
|
||||
(identical(other.image, image) || other.image == image) &&
|
||||
(identical(other.description, description) || other.description == description));
|
||||
(identical(other.description, description) ||
|
||||
other.description == description));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -860,7 +877,8 @@ class _$StepImpl implements _Step {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$StepImplCopyWith<_$StepImpl> get copyWith => __$$StepImplCopyWithImpl<_$StepImpl>(this, _$identity);
|
||||
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
|
||||
__$$StepImplCopyWithImpl<_$StepImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -871,13 +889,14 @@ class _$StepImpl implements _Step {
|
||||
}
|
||||
|
||||
abstract class _Step implements Step {
|
||||
const factory _Step({required final String image, required final String description}) = _$StepImpl;
|
||||
const factory _Step(
|
||||
{required final String image,
|
||||
required final String description}) = _$StepImpl;
|
||||
|
||||
factory _Step.fromJson(Map<String, dynamic> json) = _$StepImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get image;
|
||||
|
||||
@override
|
||||
String get description;
|
||||
|
||||
@@ -885,5 +904,6 @@ abstract class _Step implements Step {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$StepImplCopyWith<_$StepImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,14 +6,19 @@ part of 'recipes_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$RecipesImpl _$$RecipesImplFromJson(Map<String, dynamic> json) => _$RecipesImpl(
|
||||
_$RecipesImpl _$$RecipesImplFromJson(Map<String, dynamic> json) =>
|
||||
_$RecipesImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
image: json['image'] as String,
|
||||
state: json['state'] as String,
|
||||
cookingTime: (json['cooking_time'] as num).toInt(),
|
||||
ingredients: (json['ingredients'] as List<dynamic>).map((e) => Ingredient.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
ingredients: (json['ingredients'] as List<dynamic>)
|
||||
.map((e) => Ingredient.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
description: json['description'] as String,
|
||||
steps: (json['steps'] as List<dynamic>).map((e) => Step.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
steps: (json['steps'] as List<dynamic>)
|
||||
.map((e) => Step.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
videoUrl: json['video_url'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
@@ -26,7 +31,8 @@ _$RecipesImpl _$$RecipesImplFromJson(Map<String, dynamic> json) => _$RecipesImpl
|
||||
author: Author.fromJson(json['author'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$RecipesImplToJson(_$RecipesImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$RecipesImplToJson(_$RecipesImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'image': instance.image,
|
||||
'state': instance.state,
|
||||
@@ -46,13 +52,15 @@ Map<String, dynamic> _$$RecipesImplToJson(_$RecipesImpl instance) => <String, dy
|
||||
'author': instance.author,
|
||||
};
|
||||
|
||||
_$IngredientImpl _$$IngredientImplFromJson(Map<String, dynamic> json) => _$IngredientImpl(
|
||||
_$IngredientImpl _$$IngredientImplFromJson(Map<String, dynamic> json) =>
|
||||
_$IngredientImpl(
|
||||
name: json['name'] as String,
|
||||
unit: json['unit'] as String?,
|
||||
portion: json['portion'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$IngredientImplToJson(_$IngredientImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$IngredientImplToJson(_$IngredientImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'name': instance.name,
|
||||
'unit': instance.unit,
|
||||
'portion': instance.portion,
|
||||
@@ -63,7 +71,8 @@ _$StepImpl _$$StepImplFromJson(Map<String, dynamic> json) => _$StepImpl(
|
||||
description: json['description'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$StepImplToJson(_$StepImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$StepImplToJson(_$StepImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'image': instance.image,
|
||||
'description': instance.description,
|
||||
};
|
||||
|
||||
@@ -29,24 +29,26 @@ mixin _$RecipesPagination {
|
||||
/// Create a copy of RecipesPagination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$RecipesPaginationCopyWith<RecipesPagination> get copyWith => throw _privateConstructorUsedError;
|
||||
$RecipesPaginationCopyWith<RecipesPagination> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $RecipesPaginationCopyWith<$Res> {
|
||||
factory $RecipesPaginationCopyWith(RecipesPagination value, $Res Function(RecipesPagination) then) = _$RecipesPaginationCopyWithImpl<$Res, RecipesPagination>;
|
||||
|
||||
factory $RecipesPaginationCopyWith(
|
||||
RecipesPagination value, $Res Function(RecipesPagination) then) =
|
||||
_$RecipesPaginationCopyWithImpl<$Res, RecipesPagination>;
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: 'data') List<Recipes> recipesList});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$RecipesPaginationCopyWithImpl<$Res, $Val extends RecipesPagination> implements $RecipesPaginationCopyWith<$Res> {
|
||||
class _$RecipesPaginationCopyWithImpl<$Res, $Val extends RecipesPagination>
|
||||
implements $RecipesPaginationCopyWith<$Res> {
|
||||
_$RecipesPaginationCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -67,19 +69,23 @@ class _$RecipesPaginationCopyWithImpl<$Res, $Val extends RecipesPagination> impl
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipesPaginationImplCopyWith<$Res> implements $RecipesPaginationCopyWith<$Res> {
|
||||
factory _$$RecipesPaginationImplCopyWith(_$RecipesPaginationImpl value, $Res Function(_$RecipesPaginationImpl) then) =
|
||||
abstract class _$$RecipesPaginationImplCopyWith<$Res>
|
||||
implements $RecipesPaginationCopyWith<$Res> {
|
||||
factory _$$RecipesPaginationImplCopyWith(_$RecipesPaginationImpl value,
|
||||
$Res Function(_$RecipesPaginationImpl) then) =
|
||||
__$$RecipesPaginationImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: 'data') List<Recipes> recipesList});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipesPaginationImplCopyWithImpl<$Res> extends _$RecipesPaginationCopyWithImpl<$Res, _$RecipesPaginationImpl>
|
||||
class __$$RecipesPaginationImplCopyWithImpl<$Res>
|
||||
extends _$RecipesPaginationCopyWithImpl<$Res, _$RecipesPaginationImpl>
|
||||
implements _$$RecipesPaginationImplCopyWith<$Res> {
|
||||
__$$RecipesPaginationImplCopyWithImpl(_$RecipesPaginationImpl _value, $Res Function(_$RecipesPaginationImpl) _then) : super(_value, _then);
|
||||
__$$RecipesPaginationImplCopyWithImpl(_$RecipesPaginationImpl _value,
|
||||
$Res Function(_$RecipesPaginationImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of RecipesPagination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -100,12 +106,14 @@ class __$$RecipesPaginationImplCopyWithImpl<$Res> extends _$RecipesPaginationCop
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$RecipesPaginationImpl implements _RecipesPagination {
|
||||
const _$RecipesPaginationImpl({@JsonKey(name: 'data') required final List<Recipes> recipesList}) : _recipesList = recipesList;
|
||||
const _$RecipesPaginationImpl(
|
||||
{@JsonKey(name: 'data') required final List<Recipes> recipesList})
|
||||
: _recipesList = recipesList;
|
||||
|
||||
factory _$RecipesPaginationImpl.fromJson(Map<String, dynamic> json) => _$$RecipesPaginationImplFromJson(json);
|
||||
factory _$RecipesPaginationImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$RecipesPaginationImplFromJson(json);
|
||||
|
||||
final List<Recipes> _recipesList;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'data')
|
||||
List<Recipes> get recipesList {
|
||||
@@ -122,19 +130,25 @@ class _$RecipesPaginationImpl implements _RecipesPagination {
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$RecipesPaginationImpl && const DeepCollectionEquality().equals(other._recipesList, _recipesList));
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipesPaginationImpl &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._recipesList, _recipesList));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_recipesList));
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_recipesList));
|
||||
|
||||
/// Create a copy of RecipesPagination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith => __$$RecipesPaginationImplCopyWithImpl<_$RecipesPaginationImpl>(this, _$identity);
|
||||
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith =>
|
||||
__$$RecipesPaginationImplCopyWithImpl<_$RecipesPaginationImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -145,9 +159,12 @@ class _$RecipesPaginationImpl implements _RecipesPagination {
|
||||
}
|
||||
|
||||
abstract class _RecipesPagination implements RecipesPagination {
|
||||
const factory _RecipesPagination({@JsonKey(name: 'data') required final List<Recipes> recipesList}) = _$RecipesPaginationImpl;
|
||||
const factory _RecipesPagination(
|
||||
{@JsonKey(name: 'data') required final List<Recipes> recipesList}) =
|
||||
_$RecipesPaginationImpl;
|
||||
|
||||
factory _RecipesPagination.fromJson(Map<String, dynamic> json) = _$RecipesPaginationImpl.fromJson;
|
||||
factory _RecipesPagination.fromJson(Map<String, dynamic> json) =
|
||||
_$RecipesPaginationImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'data')
|
||||
@@ -157,5 +174,6 @@ abstract class _RecipesPagination implements RecipesPagination {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,10 +6,16 @@ part of 'recipes_pagination_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$RecipesPaginationImpl _$$RecipesPaginationImplFromJson(Map<String, dynamic> json) => _$RecipesPaginationImpl(
|
||||
recipesList: (json['data'] as List<dynamic>).map((e) => Recipes.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
_$RecipesPaginationImpl _$$RecipesPaginationImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$RecipesPaginationImpl(
|
||||
recipesList: (json['data'] as List<dynamic>)
|
||||
.map((e) => Recipes.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$RecipesPaginationImplToJson(_$RecipesPaginationImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$RecipesPaginationImplToJson(
|
||||
_$RecipesPaginationImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.recipesList,
|
||||
};
|
||||
|
||||
@@ -19,13 +19,13 @@ class CommentsCubit extends Cubit<CommentsState> {
|
||||
try {
|
||||
switch (commentSourceType) {
|
||||
case CommentSourceType.blogPost:
|
||||
emit(CommentsState.loaded(comment: await feedRepository.getBlogPostComments(id)));
|
||||
emit(CommentsState.loaded(comment: await feedRepository.getBlogPostComments(id: id)));
|
||||
break;
|
||||
case CommentSourceType.diet:
|
||||
emit(CommentsState.loaded(comment: await feedRepository.getDietsComments(id)));
|
||||
emit(CommentsState.loaded(comment: await feedRepository.getDietsComments(id: id)));
|
||||
break;
|
||||
case CommentSourceType.recipe:
|
||||
emit(CommentsState.loaded(comment: await feedRepository.getRecipesComments(id)));
|
||||
emit(CommentsState.loaded(comment: await feedRepository.getRecipesComments(id: id)));
|
||||
break;
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
@@ -24,7 +24,6 @@ mixin _$CommentsState {
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
@@ -71,16 +70,18 @@ mixin _$CommentsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $CommentsStateCopyWith<$Res> {
|
||||
factory $CommentsStateCopyWith(CommentsState value, $Res Function(CommentsState) then) = _$CommentsStateCopyWithImpl<$Res, CommentsState>;
|
||||
factory $CommentsStateCopyWith(
|
||||
CommentsState value, $Res Function(CommentsState) then) =
|
||||
_$CommentsStateCopyWithImpl<$Res, CommentsState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$CommentsStateCopyWithImpl<$Res, $Val extends CommentsState> implements $CommentsStateCopyWith<$Res> {
|
||||
class _$CommentsStateCopyWithImpl<$Res, $Val extends CommentsState>
|
||||
implements $CommentsStateCopyWith<$Res> {
|
||||
_$CommentsStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -90,12 +91,18 @@ class _$CommentsStateCopyWithImpl<$Res, $Val extends CommentsState> implements $
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CommentsStateImplCopyWith<$Res> {
|
||||
factory _$$CommentsStateImplCopyWith(_$CommentsStateImpl value, $Res Function(_$CommentsStateImpl) then) = __$$CommentsStateImplCopyWithImpl<$Res>;
|
||||
factory _$$CommentsStateImplCopyWith(
|
||||
_$CommentsStateImpl value, $Res Function(_$CommentsStateImpl) then) =
|
||||
__$$CommentsStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CommentsStateImplCopyWithImpl<$Res> extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateImpl> implements _$$CommentsStateImplCopyWith<$Res> {
|
||||
__$$CommentsStateImplCopyWithImpl(_$CommentsStateImpl _value, $Res Function(_$CommentsStateImpl) _then) : super(_value, _then);
|
||||
class __$$CommentsStateImplCopyWithImpl<$Res>
|
||||
extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateImpl>
|
||||
implements _$$CommentsStateImplCopyWith<$Res> {
|
||||
__$$CommentsStateImplCopyWithImpl(
|
||||
_$CommentsStateImpl _value, $Res Function(_$CommentsStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of CommentsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -113,7 +120,8 @@ class _$CommentsStateImpl implements _CommentsState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$CommentsStateImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$CommentsStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -200,14 +208,18 @@ abstract class _CommentsState implements CommentsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CommentsStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$CommentsStateLoadingImplCopyWith(_$CommentsStateLoadingImpl value, $Res Function(_$CommentsStateLoadingImpl) then) =
|
||||
factory _$$CommentsStateLoadingImplCopyWith(_$CommentsStateLoadingImpl value,
|
||||
$Res Function(_$CommentsStateLoadingImpl) then) =
|
||||
__$$CommentsStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CommentsStateLoadingImplCopyWithImpl<$Res> extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateLoadingImpl>
|
||||
class __$$CommentsStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateLoadingImpl>
|
||||
implements _$$CommentsStateLoadingImplCopyWith<$Res> {
|
||||
__$$CommentsStateLoadingImplCopyWithImpl(_$CommentsStateLoadingImpl _value, $Res Function(_$CommentsStateLoadingImpl) _then) : super(_value, _then);
|
||||
__$$CommentsStateLoadingImplCopyWithImpl(_$CommentsStateLoadingImpl _value,
|
||||
$Res Function(_$CommentsStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of CommentsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -225,7 +237,9 @@ class _$CommentsStateLoadingImpl implements CommentsStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$CommentsStateLoadingImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$CommentsStateLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -312,9 +326,9 @@ abstract class CommentsStateLoading implements CommentsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CommentsStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$CommentsStateLoadedImplCopyWith(_$CommentsStateLoadedImpl value, $Res Function(_$CommentsStateLoadedImpl) then) =
|
||||
factory _$$CommentsStateLoadedImplCopyWith(_$CommentsStateLoadedImpl value,
|
||||
$Res Function(_$CommentsStateLoadedImpl) then) =
|
||||
__$$CommentsStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({CommentModel comment, int? replyId});
|
||||
|
||||
@@ -322,9 +336,12 @@ abstract class _$$CommentsStateLoadedImplCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CommentsStateLoadedImplCopyWithImpl<$Res> extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateLoadedImpl>
|
||||
class __$$CommentsStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateLoadedImpl>
|
||||
implements _$$CommentsStateLoadedImplCopyWith<$Res> {
|
||||
__$$CommentsStateLoadedImplCopyWithImpl(_$CommentsStateLoadedImpl _value, $Res Function(_$CommentsStateLoadedImpl) _then) : super(_value, _then);
|
||||
__$$CommentsStateLoadedImplCopyWithImpl(_$CommentsStateLoadedImpl _value,
|
||||
$Res Function(_$CommentsStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of CommentsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -390,7 +407,8 @@ class _$CommentsStateLoadedImpl implements CommentsStateLoaded {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$CommentsStateLoadedImplCopyWith<_$CommentsStateLoadedImpl> get copyWith =>
|
||||
__$$CommentsStateLoadedImplCopyWithImpl<_$CommentsStateLoadedImpl>(this, _$identity);
|
||||
__$$CommentsStateLoadedImplCopyWithImpl<_$CommentsStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -468,31 +486,36 @@ class _$CommentsStateLoadedImpl implements CommentsStateLoaded {
|
||||
}
|
||||
|
||||
abstract class CommentsStateLoaded implements CommentsState {
|
||||
const factory CommentsStateLoaded({required final CommentModel comment, final int? replyId}) = _$CommentsStateLoadedImpl;
|
||||
const factory CommentsStateLoaded(
|
||||
{required final CommentModel comment,
|
||||
final int? replyId}) = _$CommentsStateLoadedImpl;
|
||||
|
||||
CommentModel get comment;
|
||||
|
||||
int? get replyId;
|
||||
|
||||
/// Create a copy of CommentsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$CommentsStateLoadedImplCopyWith<_$CommentsStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$CommentsStateLoadedImplCopyWith<_$CommentsStateLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CommentsStateErrorImplCopyWith<$Res> {
|
||||
factory _$$CommentsStateErrorImplCopyWith(_$CommentsStateErrorImpl value, $Res Function(_$CommentsStateErrorImpl) then) =
|
||||
factory _$$CommentsStateErrorImplCopyWith(_$CommentsStateErrorImpl value,
|
||||
$Res Function(_$CommentsStateErrorImpl) then) =
|
||||
__$$CommentsStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CommentsStateErrorImplCopyWithImpl<$Res> extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateErrorImpl>
|
||||
class __$$CommentsStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateErrorImpl>
|
||||
implements _$$CommentsStateErrorImplCopyWith<$Res> {
|
||||
__$$CommentsStateErrorImplCopyWithImpl(_$CommentsStateErrorImpl _value, $Res Function(_$CommentsStateErrorImpl) _then) : super(_value, _then);
|
||||
__$$CommentsStateErrorImplCopyWithImpl(_$CommentsStateErrorImpl _value,
|
||||
$Res Function(_$CommentsStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of CommentsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -528,7 +551,8 @@ class _$CommentsStateErrorImpl implements CommentsStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$CommentsStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -540,7 +564,8 @@ class _$CommentsStateErrorImpl implements CommentsStateError {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$CommentsStateErrorImplCopyWith<_$CommentsStateErrorImpl> get copyWith =>
|
||||
__$$CommentsStateErrorImplCopyWithImpl<_$CommentsStateErrorImpl>(this, _$identity);
|
||||
__$$CommentsStateErrorImplCopyWithImpl<_$CommentsStateErrorImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -618,12 +643,14 @@ class _$CommentsStateErrorImpl implements CommentsStateError {
|
||||
}
|
||||
|
||||
abstract class CommentsStateError implements CommentsState {
|
||||
const factory CommentsStateError({required final String errorMessage}) = _$CommentsStateErrorImpl;
|
||||
const factory CommentsStateError({required final String errorMessage}) =
|
||||
_$CommentsStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
/// Create a copy of CommentsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$CommentsStateErrorImplCopyWith<_$CommentsStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$CommentsStateErrorImplCopyWith<_$CommentsStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ mixin _$DietsState {
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
@@ -71,16 +70,18 @@ mixin _$DietsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $DietsStateCopyWith<$Res> {
|
||||
factory $DietsStateCopyWith(DietsState value, $Res Function(DietsState) then) = _$DietsStateCopyWithImpl<$Res, DietsState>;
|
||||
factory $DietsStateCopyWith(
|
||||
DietsState value, $Res Function(DietsState) then) =
|
||||
_$DietsStateCopyWithImpl<$Res, DietsState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$DietsStateCopyWithImpl<$Res, $Val extends DietsState> implements $DietsStateCopyWith<$Res> {
|
||||
class _$DietsStateCopyWithImpl<$Res, $Val extends DietsState>
|
||||
implements $DietsStateCopyWith<$Res> {
|
||||
_$DietsStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -90,12 +91,18 @@ class _$DietsStateCopyWithImpl<$Res, $Val extends DietsState> implements $DietsS
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DietsStateImplCopyWith<$Res> {
|
||||
factory _$$DietsStateImplCopyWith(_$DietsStateImpl value, $Res Function(_$DietsStateImpl) then) = __$$DietsStateImplCopyWithImpl<$Res>;
|
||||
factory _$$DietsStateImplCopyWith(
|
||||
_$DietsStateImpl value, $Res Function(_$DietsStateImpl) then) =
|
||||
__$$DietsStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DietsStateImplCopyWithImpl<$Res> extends _$DietsStateCopyWithImpl<$Res, _$DietsStateImpl> implements _$$DietsStateImplCopyWith<$Res> {
|
||||
__$$DietsStateImplCopyWithImpl(_$DietsStateImpl _value, $Res Function(_$DietsStateImpl) _then) : super(_value, _then);
|
||||
class __$$DietsStateImplCopyWithImpl<$Res>
|
||||
extends _$DietsStateCopyWithImpl<$Res, _$DietsStateImpl>
|
||||
implements _$$DietsStateImplCopyWith<$Res> {
|
||||
__$$DietsStateImplCopyWithImpl(
|
||||
_$DietsStateImpl _value, $Res Function(_$DietsStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DietsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -113,7 +120,8 @@ class _$DietsStateImpl implements _DietsState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$DietsStateImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$DietsStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -200,14 +208,18 @@ abstract class _DietsState implements DietsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DietsStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$DietsStateLoadingImplCopyWith(_$DietsStateLoadingImpl value, $Res Function(_$DietsStateLoadingImpl) then) =
|
||||
factory _$$DietsStateLoadingImplCopyWith(_$DietsStateLoadingImpl value,
|
||||
$Res Function(_$DietsStateLoadingImpl) then) =
|
||||
__$$DietsStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DietsStateLoadingImplCopyWithImpl<$Res> extends _$DietsStateCopyWithImpl<$Res, _$DietsStateLoadingImpl>
|
||||
class __$$DietsStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$DietsStateCopyWithImpl<$Res, _$DietsStateLoadingImpl>
|
||||
implements _$$DietsStateLoadingImplCopyWith<$Res> {
|
||||
__$$DietsStateLoadingImplCopyWithImpl(_$DietsStateLoadingImpl _value, $Res Function(_$DietsStateLoadingImpl) _then) : super(_value, _then);
|
||||
__$$DietsStateLoadingImplCopyWithImpl(_$DietsStateLoadingImpl _value,
|
||||
$Res Function(_$DietsStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DietsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -225,7 +237,8 @@ class _$DietsStateLoadingImpl implements DietsStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$DietsStateLoadingImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$DietsStateLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -312,9 +325,9 @@ abstract class DietsStateLoading implements DietsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DietsStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$DietsStateLoadedImplCopyWith(_$DietsStateLoadedImpl value, $Res Function(_$DietsStateLoadedImpl) then) =
|
||||
factory _$$DietsStateLoadedImplCopyWith(_$DietsStateLoadedImpl value,
|
||||
$Res Function(_$DietsStateLoadedImpl) then) =
|
||||
__$$DietsStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({DietsPagination diets});
|
||||
|
||||
@@ -322,9 +335,12 @@ abstract class _$$DietsStateLoadedImplCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DietsStateLoadedImplCopyWithImpl<$Res> extends _$DietsStateCopyWithImpl<$Res, _$DietsStateLoadedImpl>
|
||||
class __$$DietsStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$DietsStateCopyWithImpl<$Res, _$DietsStateLoadedImpl>
|
||||
implements _$$DietsStateLoadedImplCopyWith<$Res> {
|
||||
__$$DietsStateLoadedImplCopyWithImpl(_$DietsStateLoadedImpl _value, $Res Function(_$DietsStateLoadedImpl) _then) : super(_value, _then);
|
||||
__$$DietsStateLoadedImplCopyWithImpl(_$DietsStateLoadedImpl _value,
|
||||
$Res Function(_$DietsStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DietsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -368,7 +384,9 @@ class _$DietsStateLoadedImpl implements DietsStateLoaded {
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$DietsStateLoadedImpl && (identical(other.diets, diets) || other.diets == diets));
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$DietsStateLoadedImpl &&
|
||||
(identical(other.diets, diets) || other.diets == diets));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -379,7 +397,9 @@ class _$DietsStateLoadedImpl implements DietsStateLoaded {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DietsStateLoadedImplCopyWith<_$DietsStateLoadedImpl> get copyWith => __$$DietsStateLoadedImplCopyWithImpl<_$DietsStateLoadedImpl>(this, _$identity);
|
||||
_$$DietsStateLoadedImplCopyWith<_$DietsStateLoadedImpl> get copyWith =>
|
||||
__$$DietsStateLoadedImplCopyWithImpl<_$DietsStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -457,27 +477,34 @@ class _$DietsStateLoadedImpl implements DietsStateLoaded {
|
||||
}
|
||||
|
||||
abstract class DietsStateLoaded implements DietsState {
|
||||
const factory DietsStateLoaded({required final DietsPagination diets}) = _$DietsStateLoadedImpl;
|
||||
const factory DietsStateLoaded({required final DietsPagination diets}) =
|
||||
_$DietsStateLoadedImpl;
|
||||
|
||||
DietsPagination get diets;
|
||||
|
||||
/// Create a copy of DietsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DietsStateLoadedImplCopyWith<_$DietsStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$DietsStateLoadedImplCopyWith<_$DietsStateLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DietsStateErrorImplCopyWith<$Res> {
|
||||
factory _$$DietsStateErrorImplCopyWith(_$DietsStateErrorImpl value, $Res Function(_$DietsStateErrorImpl) then) = __$$DietsStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$DietsStateErrorImplCopyWith(_$DietsStateErrorImpl value,
|
||||
$Res Function(_$DietsStateErrorImpl) then) =
|
||||
__$$DietsStateErrorImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DietsStateErrorImplCopyWithImpl<$Res> extends _$DietsStateCopyWithImpl<$Res, _$DietsStateErrorImpl> implements _$$DietsStateErrorImplCopyWith<$Res> {
|
||||
__$$DietsStateErrorImplCopyWithImpl(_$DietsStateErrorImpl _value, $Res Function(_$DietsStateErrorImpl) _then) : super(_value, _then);
|
||||
class __$$DietsStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$DietsStateCopyWithImpl<$Res, _$DietsStateErrorImpl>
|
||||
implements _$$DietsStateErrorImplCopyWith<$Res> {
|
||||
__$$DietsStateErrorImplCopyWithImpl(
|
||||
_$DietsStateErrorImpl _value, $Res Function(_$DietsStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DietsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -513,7 +540,8 @@ class _$DietsStateErrorImpl implements DietsStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$DietsStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -524,7 +552,9 @@ class _$DietsStateErrorImpl implements DietsStateError {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DietsStateErrorImplCopyWith<_$DietsStateErrorImpl> get copyWith => __$$DietsStateErrorImplCopyWithImpl<_$DietsStateErrorImpl>(this, _$identity);
|
||||
_$$DietsStateErrorImplCopyWith<_$DietsStateErrorImpl> get copyWith =>
|
||||
__$$DietsStateErrorImplCopyWithImpl<_$DietsStateErrorImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -602,12 +632,14 @@ class _$DietsStateErrorImpl implements DietsStateError {
|
||||
}
|
||||
|
||||
abstract class DietsStateError implements DietsState {
|
||||
const factory DietsStateError({required final String errorMessage}) = _$DietsStateErrorImpl;
|
||||
const factory DietsStateError({required final String errorMessage}) =
|
||||
_$DietsStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
/// Create a copy of DietsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DietsStateErrorImplCopyWith<_$DietsStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$DietsStateErrorImplCopyWith<_$DietsStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -7,12 +7,16 @@ class FeedCubit extends Cubit<FeedState> {
|
||||
int currentPage = 1;
|
||||
late int lastPage;
|
||||
bool isLoading = false;
|
||||
String? _query;
|
||||
|
||||
FeedCubit({required this.feedRepository}) : super(const FeedState.loading());
|
||||
|
||||
loadFeedBlogPostList() async {
|
||||
loadFeedBlogPostList({
|
||||
String? query,
|
||||
}) async {
|
||||
try {
|
||||
final feedBlogPosts = await feedRepository.getFeedBlogPosts();
|
||||
_query = query;
|
||||
final feedBlogPosts = await feedRepository.getFeedBlogPosts(query: query);
|
||||
lastPage = feedBlogPosts.meta.lastPage;
|
||||
emit(
|
||||
FeedState.loaded(
|
||||
@@ -34,7 +38,10 @@ class FeedCubit extends Cubit<FeedState> {
|
||||
try {
|
||||
if (currentPage < lastPage) {
|
||||
currentPage++;
|
||||
final feedBlogPosts = await feedRepository.getFeedBlogPosts(page: currentPage);
|
||||
final feedBlogPosts = await feedRepository.getFeedBlogPosts(
|
||||
page: currentPage,
|
||||
query: _query,
|
||||
);
|
||||
isLoading = false;
|
||||
emit(
|
||||
FeedState.loaded(
|
||||
@@ -52,7 +59,7 @@ class FeedCubit extends Cubit<FeedState> {
|
||||
}
|
||||
}
|
||||
|
||||
likePost(int id) async => await feedRepository.likeBlogPost(id);
|
||||
likePost(int id) async => await feedRepository.likeBlogPost(id: id);
|
||||
|
||||
unlikedPost(int id) async => await feedRepository.unlikedBlogPost(id);
|
||||
unlikedPost(int id) async => await feedRepository.unlikedBlogPost(id: id);
|
||||
}
|
||||
|
||||
@@ -20,16 +20,18 @@ mixin _$FeedState {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading) loaded,
|
||||
required TResult Function(
|
||||
List<FeedBlogPostModel> feedBlogPostList, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@@ -37,7 +39,8 @@ mixin _$FeedState {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
@@ -71,16 +74,17 @@ 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;
|
||||
|
||||
@@ -90,12 +94,18 @@ class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState> implements $FeedStat
|
||||
|
||||
/// @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);
|
||||
|
||||
/// Create a copy of FeedState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -113,7 +123,8 @@ 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
|
||||
@@ -124,7 +135,9 @@ class _$FeedStateImpl implements _FeedState {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading) loaded,
|
||||
required TResult Function(
|
||||
List<FeedBlogPostModel> feedBlogPostList, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return $default();
|
||||
@@ -135,7 +148,8 @@ class _$FeedStateImpl implements _FeedState {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return $default?.call();
|
||||
@@ -146,7 +160,8 @@ class _$FeedStateImpl implements _FeedState {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -200,14 +215,18 @@ 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);
|
||||
|
||||
/// Create a copy of FeedState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -225,7 +244,8 @@ 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
|
||||
@@ -236,7 +256,9 @@ class _$FeedStateLoadingImpl implements FeedStateLoading {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading) loaded,
|
||||
required TResult Function(
|
||||
List<FeedBlogPostModel> feedBlogPostList, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loading();
|
||||
@@ -247,7 +269,8 @@ class _$FeedStateLoadingImpl implements FeedStateLoading {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loading?.call();
|
||||
@@ -258,7 +281,8 @@ class _$FeedStateLoadingImpl implements FeedStateLoading {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -312,15 +336,20 @@ 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, bool isLoading});
|
||||
}
|
||||
|
||||
/// @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);
|
||||
|
||||
/// Create a copy of FeedState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -346,13 +375,16 @@ class __$$FeedStateLoadedImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<
|
||||
/// @nodoc
|
||||
|
||||
class _$FeedStateLoadedImpl implements FeedStateLoaded {
|
||||
const _$FeedStateLoadedImpl({required final List<FeedBlogPostModel> feedBlogPostList, required this.isLoading}) : _feedBlogPostList = feedBlogPostList;
|
||||
const _$FeedStateLoadedImpl(
|
||||
{required final List<FeedBlogPostModel> feedBlogPostList,
|
||||
required this.isLoading})
|
||||
: _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,26 +402,33 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$FeedStateLoadedImpl &&
|
||||
const DeepCollectionEquality().equals(other._feedBlogPostList, _feedBlogPostList) &&
|
||||
(identical(other.isLoading, isLoading) || other.isLoading == isLoading));
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._feedBlogPostList, _feedBlogPostList) &&
|
||||
(identical(other.isLoading, isLoading) ||
|
||||
other.isLoading == isLoading));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_feedBlogPostList), isLoading);
|
||||
int get hashCode => Object.hash(runtimeType,
|
||||
const DeepCollectionEquality().hash(_feedBlogPostList), isLoading);
|
||||
|
||||
/// Create a copy of FeedState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith => __$$FeedStateLoadedImplCopyWithImpl<_$FeedStateLoadedImpl>(this, _$identity);
|
||||
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith =>
|
||||
__$$FeedStateLoadedImplCopyWithImpl<_$FeedStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading) loaded,
|
||||
required TResult Function(
|
||||
List<FeedBlogPostModel> feedBlogPostList, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loaded(feedBlogPostList, isLoading);
|
||||
@@ -400,7 +439,8 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loaded?.call(feedBlogPostList, isLoading);
|
||||
@@ -411,7 +451,8 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -460,29 +501,36 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
|
||||
}
|
||||
|
||||
abstract class FeedStateLoaded implements FeedState {
|
||||
const factory FeedStateLoaded({required final List<FeedBlogPostModel> feedBlogPostList, required final bool isLoading}) = _$FeedStateLoadedImpl;
|
||||
const factory FeedStateLoaded(
|
||||
{required final List<FeedBlogPostModel> feedBlogPostList,
|
||||
required final bool isLoading}) = _$FeedStateLoadedImpl;
|
||||
|
||||
List<FeedBlogPostModel> get feedBlogPostList;
|
||||
|
||||
bool get isLoading;
|
||||
|
||||
/// Create a copy of FeedState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$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);
|
||||
|
||||
/// Create a copy of FeedState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -518,7 +566,8 @@ 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
|
||||
@@ -529,14 +578,18 @@ class _$FeedStateErrorImpl implements FeedStateError {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith => __$$FeedStateErrorImplCopyWithImpl<_$FeedStateErrorImpl>(this, _$identity);
|
||||
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith =>
|
||||
__$$FeedStateErrorImplCopyWithImpl<_$FeedStateErrorImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading) loaded,
|
||||
required TResult Function(
|
||||
List<FeedBlogPostModel> feedBlogPostList, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return error(errorMessage);
|
||||
@@ -547,7 +600,8 @@ class _$FeedStateErrorImpl implements FeedStateError {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return error?.call(errorMessage);
|
||||
@@ -558,7 +612,8 @@ class _$FeedStateErrorImpl implements FeedStateError {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -607,12 +662,14 @@ 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;
|
||||
|
||||
/// Create a copy of FeedState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -13,11 +13,6 @@ class RecipesCubit extends Cubit<RecipesState> {
|
||||
bool isLoading = false;
|
||||
String? _query;
|
||||
|
||||
RecipesCubit({
|
||||
required this.feedRepository,
|
||||
required this.recipeRepository,
|
||||
}) : super(const RecipesState.loading());
|
||||
|
||||
loadRecipesList({
|
||||
String? query,
|
||||
}) async {
|
||||
@@ -40,6 +35,11 @@ class RecipesCubit extends Cubit<RecipesState> {
|
||||
}
|
||||
}
|
||||
|
||||
RecipesCubit({
|
||||
required this.feedRepository,
|
||||
required this.recipeRepository,
|
||||
}) : super(const RecipesState.loading());
|
||||
|
||||
loadNextPage() async {
|
||||
if (currentPage < lastPage && !isLoading) {
|
||||
isLoading = true;
|
||||
|
||||
@@ -20,16 +20,23 @@ mixin _$RecipesState {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading) loaded,
|
||||
required TResult Function(
|
||||
List<Recipes> recipesList,
|
||||
List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags,
|
||||
int selectedTagsCounter,
|
||||
bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
|
||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@@ -37,7 +44,9 @@ mixin _$RecipesState {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
|
||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
@@ -71,16 +80,18 @@ 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;
|
||||
|
||||
@@ -90,12 +101,18 @@ class _$RecipesStateCopyWithImpl<$Res, $Val extends RecipesState> implements $Re
|
||||
|
||||
/// @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);
|
||||
|
||||
/// Create a copy of RecipesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -113,7 +130,8 @@ 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
|
||||
@@ -124,7 +142,13 @@ class _$RecipesStateImpl implements _RecipesState {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading) loaded,
|
||||
required TResult Function(
|
||||
List<Recipes> recipesList,
|
||||
List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags,
|
||||
int selectedTagsCounter,
|
||||
bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return $default();
|
||||
@@ -135,7 +159,9 @@ class _$RecipesStateImpl implements _RecipesState {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
|
||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return $default?.call();
|
||||
@@ -146,7 +172,9 @@ class _$RecipesStateImpl implements _RecipesState {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
|
||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -200,14 +228,18 @@ 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);
|
||||
|
||||
/// Create a copy of RecipesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -225,7 +257,9 @@ 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
|
||||
@@ -236,7 +270,13 @@ class _$RecipesStateLoadingImpl implements RecipesStateLoading {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading) loaded,
|
||||
required TResult Function(
|
||||
List<Recipes> recipesList,
|
||||
List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags,
|
||||
int selectedTagsCounter,
|
||||
bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loading();
|
||||
@@ -247,7 +287,9 @@ class _$RecipesStateLoadingImpl implements RecipesStateLoading {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
|
||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loading?.call();
|
||||
@@ -258,7 +300,9 @@ class _$RecipesStateLoadingImpl implements RecipesStateLoading {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
|
||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -312,17 +356,25 @@ 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, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading});
|
||||
$Res call(
|
||||
{List<Recipes> recipesList,
|
||||
List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags,
|
||||
int selectedTagsCounter,
|
||||
bool isLoading});
|
||||
}
|
||||
|
||||
/// @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);
|
||||
|
||||
/// Create a copy of RecipesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -374,7 +426,6 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
||||
_selectedTags = selectedTags;
|
||||
|
||||
final List<Recipes> _recipesList;
|
||||
|
||||
@override
|
||||
List<Recipes> get recipesList {
|
||||
if (_recipesList is EqualUnmodifiableListView) return _recipesList;
|
||||
@@ -383,7 +434,6 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
||||
}
|
||||
|
||||
final List<RecipeTag> _recipesTags;
|
||||
|
||||
@override
|
||||
List<RecipeTag> get recipesTags {
|
||||
if (_recipesTags is EqualUnmodifiableListView) return _recipesTags;
|
||||
@@ -392,7 +442,6 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
||||
}
|
||||
|
||||
final Set<int> _selectedTags;
|
||||
|
||||
@override
|
||||
Set<int> get selectedTags {
|
||||
if (_selectedTags is EqualUnmodifiableSetView) return _selectedTags;
|
||||
@@ -415,16 +464,26 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipesStateLoadedImpl &&
|
||||
const DeepCollectionEquality().equals(other._recipesList, _recipesList) &&
|
||||
const DeepCollectionEquality().equals(other._recipesTags, _recipesTags) &&
|
||||
const DeepCollectionEquality().equals(other._selectedTags, _selectedTags) &&
|
||||
(identical(other.selectedTagsCounter, selectedTagsCounter) || other.selectedTagsCounter == selectedTagsCounter) &&
|
||||
(identical(other.isLoading, isLoading) || other.isLoading == isLoading));
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._recipesList, _recipesList) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._recipesTags, _recipesTags) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._selectedTags, _selectedTags) &&
|
||||
(identical(other.selectedTagsCounter, selectedTagsCounter) ||
|
||||
other.selectedTagsCounter == selectedTagsCounter) &&
|
||||
(identical(other.isLoading, isLoading) ||
|
||||
other.isLoading == isLoading));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_recipesList), const DeepCollectionEquality().hash(_recipesTags),
|
||||
const DeepCollectionEquality().hash(_selectedTags), selectedTagsCounter, isLoading);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
const DeepCollectionEquality().hash(_recipesList),
|
||||
const DeepCollectionEquality().hash(_recipesTags),
|
||||
const DeepCollectionEquality().hash(_selectedTags),
|
||||
selectedTagsCounter,
|
||||
isLoading);
|
||||
|
||||
/// Create a copy of RecipesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -432,17 +491,25 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith =>
|
||||
__$$RecipesStateLoadedImplCopyWithImpl<_$RecipesStateLoadedImpl>(this, _$identity);
|
||||
__$$RecipesStateLoadedImplCopyWithImpl<_$RecipesStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading) loaded,
|
||||
required TResult Function(
|
||||
List<Recipes> recipesList,
|
||||
List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags,
|
||||
int selectedTagsCounter,
|
||||
bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loaded(recipesList, recipesTags, selectedTags, selectedTagsCounter, isLoading);
|
||||
return loaded(
|
||||
recipesList, recipesTags, selectedTags, selectedTagsCounter, isLoading);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -450,10 +517,13 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
|
||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loaded?.call(recipesList, recipesTags, selectedTags, selectedTagsCounter, isLoading);
|
||||
return loaded?.call(
|
||||
recipesList, recipesTags, selectedTags, selectedTagsCounter, isLoading);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -461,12 +531,15 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
|
||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (loaded != null) {
|
||||
return loaded(recipesList, recipesTags, selectedTags, selectedTagsCounter, isLoading);
|
||||
return loaded(recipesList, recipesTags, selectedTags, selectedTagsCounter,
|
||||
isLoading);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
@@ -518,34 +591,34 @@ abstract class RecipesStateLoaded implements RecipesState {
|
||||
required final bool isLoading}) = _$RecipesStateLoadedImpl;
|
||||
|
||||
List<Recipes> get recipesList;
|
||||
|
||||
List<RecipeTag> get recipesTags;
|
||||
|
||||
Set<int> get selectedTags;
|
||||
|
||||
int get selectedTagsCounter;
|
||||
|
||||
bool get isLoading;
|
||||
|
||||
/// Create a copy of RecipesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$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);
|
||||
|
||||
/// Create a copy of RecipesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -581,7 +654,8 @@ 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
|
||||
@@ -592,14 +666,22 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith => __$$RecipesStateErrorImplCopyWithImpl<_$RecipesStateErrorImpl>(this, _$identity);
|
||||
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith =>
|
||||
__$$RecipesStateErrorImplCopyWithImpl<_$RecipesStateErrorImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading) loaded,
|
||||
required TResult Function(
|
||||
List<Recipes> recipesList,
|
||||
List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags,
|
||||
int selectedTagsCounter,
|
||||
bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return error(errorMessage);
|
||||
@@ -610,7 +692,9 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
|
||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return error?.call(errorMessage);
|
||||
@@ -621,7 +705,9 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
|
||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -670,12 +756,14 @@ 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;
|
||||
|
||||
/// Create a copy of RecipesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -87,22 +87,11 @@ class _FeedScreenState extends State<FeedScreen> {
|
||||
await showModalBottomSheet(
|
||||
useRootNavigator: true,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return BlocBuilder<RecipesCubit, RecipesState>(
|
||||
builder: (BuildContext context, RecipesState state) {
|
||||
if (state is RecipesStateLoaded) {
|
||||
return TagsModalWidget(
|
||||
tagsList: state.recipesTags,
|
||||
selectedTags: state.selectedTags,
|
||||
);
|
||||
} else {
|
||||
return Container();
|
||||
}
|
||||
},
|
||||
);
|
||||
},
|
||||
builder: (context) => TagsModalWidget(
|
||||
recipesCubit: recipesCubit,
|
||||
),
|
||||
);
|
||||
context.read<RecipesCubit>().loadRecipesList();
|
||||
recipesCubit.loadRecipesList();
|
||||
},
|
||||
)
|
||||
: null,
|
||||
@@ -402,8 +391,11 @@ class _FeedScreenState extends State<FeedScreen> {
|
||||
Duration(milliseconds: 500),
|
||||
() {
|
||||
switch (_selectedChipIndex) {
|
||||
case 0:
|
||||
feedCubit.loadFeedBlogPostList(query: query);
|
||||
break;
|
||||
case 1:
|
||||
context.read<RecipesCubit>().loadRecipesList(query: query);
|
||||
recipesCubit.loadRecipesList(query: query);
|
||||
break;
|
||||
}
|
||||
},
|
||||
@@ -414,8 +406,12 @@ class _FeedScreenState extends State<FeedScreen> {
|
||||
Duration(milliseconds: 500),
|
||||
() {
|
||||
switch (_selectedChipIndex) {
|
||||
case 0:
|
||||
feedCubit.loadFeedBlogPostList();
|
||||
break;
|
||||
case 1:
|
||||
context.read<RecipesCubit>().loadRecipesList(query: query);
|
||||
recipesCubit.loadRecipesList();
|
||||
break;
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
@@ -105,7 +105,9 @@ class _BlogPostWidgetState extends State<BlogPostWidget> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||
child: Html(
|
||||
data: widget.feedBlogPostModel.description,
|
||||
data: widget.feedBlogPostModel.description.length > 200
|
||||
? widget.feedBlogPostModel.description.substring(0, 200)
|
||||
: widget.feedBlogPostModel.description,
|
||||
style: {
|
||||
"*": Style(
|
||||
color: Colors.black87,
|
||||
@@ -113,6 +115,18 @@ class _BlogPostWidgetState extends State<BlogPostWidget> {
|
||||
},
|
||||
),
|
||||
),
|
||||
if (widget.feedBlogPostModel.description.length > 200)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
'Читать полностью...',
|
||||
style: TextStyle(
|
||||
height: 1,
|
||||
color: appTheme.blueA400,
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (widget.feedBlogPostModel.title.isNotEmpty || widget.feedBlogPostModel.description.isNotEmpty) SizedBox(height: 8),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:eatvio_app/core/const.dart';
|
||||
import 'package:eatvio_app/features/feed/models/diets_pagination_model.dart';
|
||||
import 'package:eatvio_app/theme/theme_helper.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_html/flutter_html.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
@@ -124,17 +125,30 @@ class _DietsWidgetState extends State<DietsWidget> {
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||
child: Html(
|
||||
data: widget.diet.details,
|
||||
style: {
|
||||
"*": Style(
|
||||
color: Colors.black87,
|
||||
),
|
||||
},
|
||||
if (widget.diet.details.isNotEmpty)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||
child: Html(
|
||||
data: widget.diet.details.length > 200 ? widget.diet.details.substring(0, 200) : widget.diet.details,
|
||||
style: {
|
||||
"*": Style(
|
||||
color: Colors.black87,
|
||||
),
|
||||
},
|
||||
),
|
||||
),
|
||||
if (widget.diet.details.length > 200)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
'Читать полностью...',
|
||||
style: TextStyle(
|
||||
height: 1,
|
||||
color: appTheme.blueA400,
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:eatvio_app/core/const.dart';
|
||||
import 'package:eatvio_app/features/feed/models/recipes_model.dart';
|
||||
import 'package:eatvio_app/theme/theme_helper.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_html/flutter_html.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
@@ -124,17 +125,30 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||
child: Html(
|
||||
data: widget.recipes.description,
|
||||
style: {
|
||||
"*": Style(
|
||||
color: Colors.black87,
|
||||
),
|
||||
},
|
||||
if (widget.recipes.description.isNotEmpty)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||
child: Html(
|
||||
data: widget.recipes.description.length > 200 ? widget.recipes.description.substring(0, 200) : widget.recipes.description,
|
||||
style: {
|
||||
"*": Style(
|
||||
color: Colors.black87,
|
||||
),
|
||||
},
|
||||
),
|
||||
),
|
||||
if (widget.recipes.description.length > 200)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
'Читать полностью...',
|
||||
style: TextStyle(
|
||||
height: 1,
|
||||
color: appTheme.blueA400,
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
import 'package:eatvio_app/features/feed/presentation/bloc/recipes_cubit/recipes_cubit.dart';
|
||||
import 'package:eatvio_app/features/feed/presentation/bloc/recipes_cubit/recipes_state.dart';
|
||||
import 'package:eatvio_app/features/recipes/models/recipe_tag_model.dart';
|
||||
import 'package:eatvio_app/theme/theme_helper.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
|
||||
class TagsModalWidget extends StatefulWidget {
|
||||
final List<RecipeTag> tagsList;
|
||||
final Set<int> selectedTags;
|
||||
final RecipesCubit recipesCubit;
|
||||
|
||||
const TagsModalWidget({
|
||||
super.key,
|
||||
required this.tagsList,
|
||||
required this.selectedTags,
|
||||
required this.recipesCubit,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -21,20 +20,29 @@ class TagsModalWidget extends StatefulWidget {
|
||||
class _TagsModalWidgetState extends State<TagsModalWidget> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: EdgeInsets.all(16),
|
||||
width: MediaQuery.of(context).size.width,
|
||||
child: Wrap(
|
||||
spacing: 8,
|
||||
runSpacing: -8,
|
||||
children: [
|
||||
for (int i = 0; i < widget.tagsList.length; i++)
|
||||
_tagChip(
|
||||
tag: widget.tagsList[i],
|
||||
isSelected: widget.selectedTags.contains(widget.tagsList[i].id),
|
||||
return BlocBuilder<RecipesCubit, RecipesState>(
|
||||
bloc: widget.recipesCubit,
|
||||
builder: (BuildContext context, RecipesState state) {
|
||||
if (state is RecipesStateLoaded) {
|
||||
return Container(
|
||||
padding: EdgeInsets.all(16),
|
||||
width: MediaQuery.of(context).size.width,
|
||||
child: Wrap(
|
||||
spacing: 8,
|
||||
runSpacing: -8,
|
||||
children: [
|
||||
for (int i = 0; i < state.recipesTags.length; i++)
|
||||
_tagChip(
|
||||
tag: state.recipesTags[i],
|
||||
isSelected: state.selectedTags.contains(state.recipesTags[i].id),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Container();
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -58,7 +66,7 @@ class _TagsModalWidgetState extends State<TagsModalWidget> {
|
||||
),
|
||||
selected: isSelected,
|
||||
backgroundColor: appTheme.gray100,
|
||||
onSelected: (bool selected) => context.read<RecipesCubit>().updateTags(tag),
|
||||
onSelected: (bool selected) => widget.recipesCubit.updateTags(tag),
|
||||
label: Text(
|
||||
'${tag.name} ${tag.recipesCount}',
|
||||
),
|
||||
|
||||
@@ -7,17 +7,29 @@ import 'package:eatvio_app/features/feed/services/feed_service.dart';
|
||||
class FeedRepository {
|
||||
final FeedService feedService;
|
||||
|
||||
FeedRepository({required this.feedService});
|
||||
FeedRepository({
|
||||
required this.feedService,
|
||||
});
|
||||
|
||||
Future<FeedBlogPostSettingsModel> getFeedBlogPosts({int page = 1}) async {
|
||||
Future<FeedBlogPostSettingsModel> getFeedBlogPosts({
|
||||
String? query,
|
||||
int page = 1,
|
||||
}) async {
|
||||
try {
|
||||
return (await feedService.getBlogPostList(page: page));
|
||||
return (await feedService.getBlogPostList(
|
||||
page: page,
|
||||
query: query,
|
||||
));
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Future<List<Recipes>> getRecipes({String? query, List<int>? tags, int page = 1}) async {
|
||||
Future<List<Recipes>> getRecipes({
|
||||
String? query,
|
||||
List<int>? tags,
|
||||
int page = 1,
|
||||
}) async {
|
||||
try {
|
||||
return (await feedService.getRecipes(
|
||||
query: query,
|
||||
@@ -30,15 +42,23 @@ class FeedRepository {
|
||||
}
|
||||
}
|
||||
|
||||
Future<DietsPagination> getDiets({int page = 1}) async {
|
||||
Future<DietsPagination> getDiets({
|
||||
int page = 1,
|
||||
String? query,
|
||||
}) async {
|
||||
try {
|
||||
return (await feedService.getDiets(page: page));
|
||||
return (await feedService.getDiets(
|
||||
page: page,
|
||||
query: query,
|
||||
));
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Future<CommentModel> getBlogPostComments(String id) async {
|
||||
Future<CommentModel> getBlogPostComments({
|
||||
required String id,
|
||||
}) async {
|
||||
try {
|
||||
return (await feedService.getBlogPostComments(id: id));
|
||||
} catch (e) {
|
||||
@@ -62,7 +82,9 @@ class FeedRepository {
|
||||
}
|
||||
}
|
||||
|
||||
Future<CommentModel> getDietsComments(String id) async {
|
||||
Future<CommentModel> getDietsComments({
|
||||
required String id,
|
||||
}) async {
|
||||
try {
|
||||
return (await feedService.getDietsComments(id: id));
|
||||
} catch (e) {
|
||||
@@ -86,7 +108,9 @@ class FeedRepository {
|
||||
}
|
||||
}
|
||||
|
||||
Future<CommentModel> getRecipesComments(String id) async {
|
||||
Future<CommentModel> getRecipesComments({
|
||||
required String id,
|
||||
}) async {
|
||||
try {
|
||||
return (await feedService.getRecipesComments(id: id));
|
||||
} catch (e) {
|
||||
@@ -110,7 +134,9 @@ class FeedRepository {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> likeBlogPost(int id) async {
|
||||
Future<void> likeBlogPost({
|
||||
required int id,
|
||||
}) async {
|
||||
try {
|
||||
await feedService.likeBlogPost(id: id);
|
||||
} catch (e) {
|
||||
@@ -118,7 +144,9 @@ class FeedRepository {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> unlikedBlogPost(int id) async {
|
||||
Future<void> unlikedBlogPost({
|
||||
required int id,
|
||||
}) async {
|
||||
try {
|
||||
await feedService.unlikedBlogPost(id: id);
|
||||
} catch (e) {
|
||||
|
||||
@@ -11,9 +11,10 @@ part 'feed_service.g.dart';
|
||||
abstract class FeedService {
|
||||
factory FeedService(Dio dio, {String baseUrl}) = _FeedService;
|
||||
|
||||
@GET('/api/blogPosts/index?page={page}')
|
||||
@GET('/api/blogPosts/index')
|
||||
Future<FeedBlogPostSettingsModel> getBlogPostList({
|
||||
@Path() required int page,
|
||||
@Query('query_search') String? query,
|
||||
});
|
||||
|
||||
@GET('/api/recipes/index')
|
||||
@@ -26,6 +27,7 @@ abstract class FeedService {
|
||||
@GET('/api/diets/index')
|
||||
Future<DietsPagination> getDiets({
|
||||
@Path() required int page,
|
||||
@Query('query_search') String? query,
|
||||
});
|
||||
|
||||
@GET('/api/blogPosts/{id}/comments/show')
|
||||
|
||||
@@ -22,9 +22,13 @@ class _FeedService implements FeedService {
|
||||
final ParseErrorLogger? errorLogger;
|
||||
|
||||
@override
|
||||
Future<FeedBlogPostSettingsModel> getBlogPostList({required int page}) async {
|
||||
Future<FeedBlogPostSettingsModel> getBlogPostList({
|
||||
required int page,
|
||||
String? query,
|
||||
}) async {
|
||||
final _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{r'query_search': query};
|
||||
queryParameters.removeWhere((k, v) => v == null);
|
||||
final _headers = <String, dynamic>{};
|
||||
const Map<String, dynamic>? _data = null;
|
||||
final _options = _setStreamType<FeedBlogPostSettingsModel>(Options(
|
||||
@@ -34,7 +38,7 @@ class _FeedService implements FeedService {
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/blogPosts/index?page=${page}',
|
||||
'/api/blogPosts/index',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
@@ -96,9 +100,13 @@ class _FeedService implements FeedService {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<DietsPagination> getDiets({required int page}) async {
|
||||
Future<DietsPagination> getDiets({
|
||||
required int page,
|
||||
String? query,
|
||||
}) async {
|
||||
final _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{r'query_search': query};
|
||||
queryParameters.removeWhere((k, v) => v == null);
|
||||
final _headers = <String, dynamic>{};
|
||||
const Map<String, dynamic>? _data = null;
|
||||
final _options = _setStreamType<DietsPagination>(Options(
|
||||
@@ -398,7 +406,9 @@ class _FeedService implements FeedService {
|
||||
}
|
||||
|
||||
RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
|
||||
if (T != dynamic && !(requestOptions.responseType == ResponseType.bytes || requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T != dynamic &&
|
||||
!(requestOptions.responseType == ResponseType.bytes ||
|
||||
requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T == String) {
|
||||
requestOptions.responseType = ResponseType.plain;
|
||||
} else {
|
||||
|
||||
@@ -22,10 +22,8 @@ PlanPaginationModel _$PlanPaginationModelFromJson(Map<String, dynamic> json) {
|
||||
mixin _$PlanPaginationModel {
|
||||
@JsonKey(name: "data")
|
||||
List<PlanModel> get data => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "links")
|
||||
Links get links => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "meta")
|
||||
Meta get meta => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -35,29 +33,32 @@ mixin _$PlanPaginationModel {
|
||||
/// Create a copy of PlanPaginationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$PlanPaginationModelCopyWith<PlanPaginationModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$PlanPaginationModelCopyWith<PlanPaginationModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $PlanPaginationModelCopyWith<$Res> {
|
||||
factory $PlanPaginationModelCopyWith(PlanPaginationModel value, $Res Function(PlanPaginationModel) then) =
|
||||
factory $PlanPaginationModelCopyWith(
|
||||
PlanPaginationModel value, $Res Function(PlanPaginationModel) then) =
|
||||
_$PlanPaginationModelCopyWithImpl<$Res, PlanPaginationModel>;
|
||||
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "data") List<PlanModel> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
|
||||
$Res call(
|
||||
{@JsonKey(name: "data") List<PlanModel> data,
|
||||
@JsonKey(name: "links") Links links,
|
||||
@JsonKey(name: "meta") Meta meta});
|
||||
|
||||
$LinksCopyWith<$Res> get links;
|
||||
|
||||
$MetaCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$PlanPaginationModelCopyWithImpl<$Res, $Val extends PlanPaginationModel> implements $PlanPaginationModelCopyWith<$Res> {
|
||||
class _$PlanPaginationModelCopyWithImpl<$Res, $Val extends PlanPaginationModel>
|
||||
implements $PlanPaginationModelCopyWith<$Res> {
|
||||
_$PlanPaginationModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -108,25 +109,31 @@ class _$PlanPaginationModelCopyWithImpl<$Res, $Val extends PlanPaginationModel>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$PlanPaginationModelImplCopyWith<$Res> implements $PlanPaginationModelCopyWith<$Res> {
|
||||
factory _$$PlanPaginationModelImplCopyWith(_$PlanPaginationModelImpl value, $Res Function(_$PlanPaginationModelImpl) then) =
|
||||
abstract class _$$PlanPaginationModelImplCopyWith<$Res>
|
||||
implements $PlanPaginationModelCopyWith<$Res> {
|
||||
factory _$$PlanPaginationModelImplCopyWith(_$PlanPaginationModelImpl value,
|
||||
$Res Function(_$PlanPaginationModelImpl) then) =
|
||||
__$$PlanPaginationModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "data") List<PlanModel> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
|
||||
$Res call(
|
||||
{@JsonKey(name: "data") List<PlanModel> data,
|
||||
@JsonKey(name: "links") Links links,
|
||||
@JsonKey(name: "meta") Meta meta});
|
||||
|
||||
@override
|
||||
$LinksCopyWith<$Res> get links;
|
||||
|
||||
@override
|
||||
$MetaCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$PlanPaginationModelImplCopyWithImpl<$Res> extends _$PlanPaginationModelCopyWithImpl<$Res, _$PlanPaginationModelImpl>
|
||||
class __$$PlanPaginationModelImplCopyWithImpl<$Res>
|
||||
extends _$PlanPaginationModelCopyWithImpl<$Res, _$PlanPaginationModelImpl>
|
||||
implements _$$PlanPaginationModelImplCopyWith<$Res> {
|
||||
__$$PlanPaginationModelImplCopyWithImpl(_$PlanPaginationModelImpl _value, $Res Function(_$PlanPaginationModelImpl) _then) : super(_value, _then);
|
||||
__$$PlanPaginationModelImplCopyWithImpl(_$PlanPaginationModelImpl _value,
|
||||
$Res Function(_$PlanPaginationModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of PlanPaginationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -158,13 +165,15 @@ class __$$PlanPaginationModelImplCopyWithImpl<$Res> extends _$PlanPaginationMode
|
||||
@JsonSerializable()
|
||||
class _$PlanPaginationModelImpl implements _PlanPaginationModel {
|
||||
const _$PlanPaginationModelImpl(
|
||||
{@JsonKey(name: "data") required final List<PlanModel> data, @JsonKey(name: "links") required this.links, @JsonKey(name: "meta") required this.meta})
|
||||
{@JsonKey(name: "data") required final List<PlanModel> data,
|
||||
@JsonKey(name: "links") required this.links,
|
||||
@JsonKey(name: "meta") required this.meta})
|
||||
: _data = data;
|
||||
|
||||
factory _$PlanPaginationModelImpl.fromJson(Map<String, dynamic> json) => _$$PlanPaginationModelImplFromJson(json);
|
||||
factory _$PlanPaginationModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$PlanPaginationModelImplFromJson(json);
|
||||
|
||||
final List<PlanModel> _data;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "data")
|
||||
List<PlanModel> get data {
|
||||
@@ -197,7 +206,8 @@ class _$PlanPaginationModelImpl implements _PlanPaginationModel {
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
||||
|
||||
/// Create a copy of PlanPaginationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -205,7 +215,8 @@ class _$PlanPaginationModelImpl implements _PlanPaginationModel {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$PlanPaginationModelImplCopyWith<_$PlanPaginationModelImpl> get copyWith =>
|
||||
__$$PlanPaginationModelImplCopyWithImpl<_$PlanPaginationModelImpl>(this, _$identity);
|
||||
__$$PlanPaginationModelImplCopyWithImpl<_$PlanPaginationModelImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -217,20 +228,20 @@ class _$PlanPaginationModelImpl implements _PlanPaginationModel {
|
||||
|
||||
abstract class _PlanPaginationModel implements PlanPaginationModel {
|
||||
const factory _PlanPaginationModel(
|
||||
{@JsonKey(name: "data") required final List<PlanModel> data,
|
||||
@JsonKey(name: "links") required final Links links,
|
||||
@JsonKey(name: "meta") required final Meta meta}) = _$PlanPaginationModelImpl;
|
||||
{@JsonKey(name: "data") required final List<PlanModel> data,
|
||||
@JsonKey(name: "links") required final Links links,
|
||||
@JsonKey(name: "meta") required final Meta meta}) =
|
||||
_$PlanPaginationModelImpl;
|
||||
|
||||
factory _PlanPaginationModel.fromJson(Map<String, dynamic> json) = _$PlanPaginationModelImpl.fromJson;
|
||||
factory _PlanPaginationModel.fromJson(Map<String, dynamic> json) =
|
||||
_$PlanPaginationModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "data")
|
||||
List<PlanModel> get data;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "links")
|
||||
Links get links;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "meta")
|
||||
Meta get meta;
|
||||
@@ -239,7 +250,8 @@ abstract class _PlanPaginationModel implements PlanPaginationModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$PlanPaginationModelImplCopyWith<_$PlanPaginationModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$PlanPaginationModelImplCopyWith<_$PlanPaginationModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
PlanModel _$PlanModelFromJson(Map<String, dynamic> json) {
|
||||
@@ -250,46 +262,32 @@ PlanModel _$PlanModelFromJson(Map<String, dynamic> json) {
|
||||
mixin _$PlanModel {
|
||||
@JsonKey(name: "id")
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "name")
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "image")
|
||||
String get image => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "duration")
|
||||
int get duration => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "state")
|
||||
String get state => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "type")
|
||||
PlanType get type => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "details")
|
||||
String get details => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "packets_count")
|
||||
int get packetsCount => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "packet1_options")
|
||||
dynamic get packet1Options => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "packet2_options")
|
||||
dynamic get packet2Options => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "packet3_options")
|
||||
dynamic get packet3Options => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "author")
|
||||
Author get author => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "total_likes")
|
||||
int get totalLikes => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "total_views")
|
||||
int get totalViews => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "total_comments")
|
||||
int get totalComments => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -299,13 +297,14 @@ mixin _$PlanModel {
|
||||
/// Create a copy of PlanModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$PlanModelCopyWith<PlanModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$PlanModelCopyWith<PlanModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $PlanModelCopyWith<$Res> {
|
||||
factory $PlanModelCopyWith(PlanModel value, $Res Function(PlanModel) then) = _$PlanModelCopyWithImpl<$Res, PlanModel>;
|
||||
|
||||
factory $PlanModelCopyWith(PlanModel value, $Res Function(PlanModel) then) =
|
||||
_$PlanModelCopyWithImpl<$Res, PlanModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "id") int id,
|
||||
@@ -325,17 +324,16 @@ abstract class $PlanModelCopyWith<$Res> {
|
||||
@JsonKey(name: "total_comments") int totalComments});
|
||||
|
||||
$PlanTypeCopyWith<$Res> get type;
|
||||
|
||||
$AuthorCopyWith<$Res> get author;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$PlanModelCopyWithImpl<$Res, $Val extends PlanModel> implements $PlanModelCopyWith<$Res> {
|
||||
class _$PlanModelCopyWithImpl<$Res, $Val extends PlanModel>
|
||||
implements $PlanModelCopyWith<$Res> {
|
||||
_$PlanModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -446,9 +444,11 @@ class _$PlanModelCopyWithImpl<$Res, $Val extends PlanModel> implements $PlanMode
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$PlanModelImplCopyWith<$Res> implements $PlanModelCopyWith<$Res> {
|
||||
factory _$$PlanModelImplCopyWith(_$PlanModelImpl value, $Res Function(_$PlanModelImpl) then) = __$$PlanModelImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$PlanModelImplCopyWith<$Res>
|
||||
implements $PlanModelCopyWith<$Res> {
|
||||
factory _$$PlanModelImplCopyWith(
|
||||
_$PlanModelImpl value, $Res Function(_$PlanModelImpl) then) =
|
||||
__$$PlanModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -470,14 +470,17 @@ abstract class _$$PlanModelImplCopyWith<$Res> implements $PlanModelCopyWith<$Res
|
||||
|
||||
@override
|
||||
$PlanTypeCopyWith<$Res> get type;
|
||||
|
||||
@override
|
||||
$AuthorCopyWith<$Res> get author;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$PlanModelImplCopyWithImpl<$Res> extends _$PlanModelCopyWithImpl<$Res, _$PlanModelImpl> implements _$$PlanModelImplCopyWith<$Res> {
|
||||
__$$PlanModelImplCopyWithImpl(_$PlanModelImpl _value, $Res Function(_$PlanModelImpl) _then) : super(_value, _then);
|
||||
class __$$PlanModelImplCopyWithImpl<$Res>
|
||||
extends _$PlanModelCopyWithImpl<$Res, _$PlanModelImpl>
|
||||
implements _$$PlanModelImplCopyWith<$Res> {
|
||||
__$$PlanModelImplCopyWithImpl(
|
||||
_$PlanModelImpl _value, $Res Function(_$PlanModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of PlanModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -585,7 +588,8 @@ class _$PlanModelImpl implements _PlanModel {
|
||||
@JsonKey(name: "total_views") required this.totalViews,
|
||||
@JsonKey(name: "total_comments") required this.totalComments});
|
||||
|
||||
factory _$PlanModelImpl.fromJson(Map<String, dynamic> json) => _$$PlanModelImplFromJson(json);
|
||||
factory _$PlanModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$PlanModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
@@ -646,18 +650,26 @@ class _$PlanModelImpl implements _PlanModel {
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
(identical(other.image, image) || other.image == image) &&
|
||||
(identical(other.duration, duration) || other.duration == duration) &&
|
||||
(identical(other.duration, duration) ||
|
||||
other.duration == duration) &&
|
||||
(identical(other.state, state) || other.state == state) &&
|
||||
(identical(other.type, type) || other.type == type) &&
|
||||
(identical(other.details, details) || other.details == details) &&
|
||||
(identical(other.packetsCount, packetsCount) || other.packetsCount == packetsCount) &&
|
||||
const DeepCollectionEquality().equals(other.packet1Options, packet1Options) &&
|
||||
const DeepCollectionEquality().equals(other.packet2Options, packet2Options) &&
|
||||
const DeepCollectionEquality().equals(other.packet3Options, packet3Options) &&
|
||||
(identical(other.packetsCount, packetsCount) ||
|
||||
other.packetsCount == packetsCount) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other.packet1Options, packet1Options) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other.packet2Options, packet2Options) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other.packet3Options, packet3Options) &&
|
||||
(identical(other.author, author) || other.author == author) &&
|
||||
(identical(other.totalLikes, totalLikes) || other.totalLikes == totalLikes) &&
|
||||
(identical(other.totalViews, totalViews) || other.totalViews == totalViews) &&
|
||||
(identical(other.totalComments, totalComments) || other.totalComments == totalComments));
|
||||
(identical(other.totalLikes, totalLikes) ||
|
||||
other.totalLikes == totalLikes) &&
|
||||
(identical(other.totalViews, totalViews) ||
|
||||
other.totalViews == totalViews) &&
|
||||
(identical(other.totalComments, totalComments) ||
|
||||
other.totalComments == totalComments));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -685,7 +697,8 @@ class _$PlanModelImpl implements _PlanModel {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$PlanModelImplCopyWith<_$PlanModelImpl> get copyWith => __$$PlanModelImplCopyWithImpl<_$PlanModelImpl>(this, _$identity);
|
||||
_$$PlanModelImplCopyWith<_$PlanModelImpl> get copyWith =>
|
||||
__$$PlanModelImplCopyWithImpl<_$PlanModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -697,80 +710,68 @@ class _$PlanModelImpl implements _PlanModel {
|
||||
|
||||
abstract class _PlanModel implements PlanModel {
|
||||
const factory _PlanModel(
|
||||
{@JsonKey(name: "id") required final int id,
|
||||
@JsonKey(name: "name") required final String name,
|
||||
@JsonKey(name: "image") required final String image,
|
||||
@JsonKey(name: "duration") required final int duration,
|
||||
@JsonKey(name: "state") required final String state,
|
||||
@JsonKey(name: "type") required final PlanType type,
|
||||
@JsonKey(name: "details") required final String details,
|
||||
@JsonKey(name: "packets_count") required final int packetsCount,
|
||||
@JsonKey(name: "packet1_options") final dynamic packet1Options,
|
||||
@JsonKey(name: "packet2_options") final dynamic packet2Options,
|
||||
@JsonKey(name: "packet3_options") final dynamic packet3Options,
|
||||
@JsonKey(name: "author") required final Author author,
|
||||
@JsonKey(name: "total_likes") required final int totalLikes,
|
||||
@JsonKey(name: "total_views") required final int totalViews,
|
||||
@JsonKey(name: "total_comments") required final int totalComments}) = _$PlanModelImpl;
|
||||
{@JsonKey(name: "id") required final int id,
|
||||
@JsonKey(name: "name") required final String name,
|
||||
@JsonKey(name: "image") required final String image,
|
||||
@JsonKey(name: "duration") required final int duration,
|
||||
@JsonKey(name: "state") required final String state,
|
||||
@JsonKey(name: "type") required final PlanType type,
|
||||
@JsonKey(name: "details") required final String details,
|
||||
@JsonKey(name: "packets_count") required final int packetsCount,
|
||||
@JsonKey(name: "packet1_options") final dynamic packet1Options,
|
||||
@JsonKey(name: "packet2_options") final dynamic packet2Options,
|
||||
@JsonKey(name: "packet3_options") final dynamic packet3Options,
|
||||
@JsonKey(name: "author") required final Author author,
|
||||
@JsonKey(name: "total_likes") required final int totalLikes,
|
||||
@JsonKey(name: "total_views") required final int totalViews,
|
||||
@JsonKey(name: "total_comments") required final int totalComments}) =
|
||||
_$PlanModelImpl;
|
||||
|
||||
factory _PlanModel.fromJson(Map<String, dynamic> json) = _$PlanModelImpl.fromJson;
|
||||
factory _PlanModel.fromJson(Map<String, dynamic> json) =
|
||||
_$PlanModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
int get id;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "name")
|
||||
String get name;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "image")
|
||||
String get image;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "duration")
|
||||
int get duration;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "state")
|
||||
String get state;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "type")
|
||||
PlanType get type;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "details")
|
||||
String get details;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "packets_count")
|
||||
int get packetsCount;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "packet1_options")
|
||||
dynamic get packet1Options;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "packet2_options")
|
||||
dynamic get packet2Options;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "packet3_options")
|
||||
dynamic get packet3Options;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "author")
|
||||
Author get author;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "total_likes")
|
||||
int get totalLikes;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "total_views")
|
||||
int get totalViews;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "total_comments")
|
||||
int get totalComments;
|
||||
@@ -779,7 +780,8 @@ abstract class _PlanModel implements PlanModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$PlanModelImplCopyWith<_$PlanModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$PlanModelImplCopyWith<_$PlanModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
PacketOptions _$PacketOptionsFromJson(Map<String, dynamic> json) {
|
||||
@@ -790,13 +792,10 @@ PacketOptions _$PacketOptionsFromJson(Map<String, dynamic> json) {
|
||||
mixin _$PacketOptions {
|
||||
@JsonKey(name: "items")
|
||||
List<String> get items => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "price")
|
||||
dynamic get price => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "short")
|
||||
String get short => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "description")
|
||||
String get description => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -806,13 +805,15 @@ mixin _$PacketOptions {
|
||||
/// Create a copy of PacketOptions
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$PacketOptionsCopyWith<PacketOptions> get copyWith => throw _privateConstructorUsedError;
|
||||
$PacketOptionsCopyWith<PacketOptions> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $PacketOptionsCopyWith<$Res> {
|
||||
factory $PacketOptionsCopyWith(PacketOptions value, $Res Function(PacketOptions) then) = _$PacketOptionsCopyWithImpl<$Res, PacketOptions>;
|
||||
|
||||
factory $PacketOptionsCopyWith(
|
||||
PacketOptions value, $Res Function(PacketOptions) then) =
|
||||
_$PacketOptionsCopyWithImpl<$Res, PacketOptions>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "items") List<String> items,
|
||||
@@ -822,12 +823,12 @@ abstract class $PacketOptionsCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$PacketOptionsCopyWithImpl<$Res, $Val extends PacketOptions> implements $PacketOptionsCopyWith<$Res> {
|
||||
class _$PacketOptionsCopyWithImpl<$Res, $Val extends PacketOptions>
|
||||
implements $PacketOptionsCopyWith<$Res> {
|
||||
_$PacketOptionsCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -863,9 +864,11 @@ class _$PacketOptionsCopyWithImpl<$Res, $Val extends PacketOptions> implements $
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$PacketOptionsImplCopyWith<$Res> implements $PacketOptionsCopyWith<$Res> {
|
||||
factory _$$PacketOptionsImplCopyWith(_$PacketOptionsImpl value, $Res Function(_$PacketOptionsImpl) then) = __$$PacketOptionsImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$PacketOptionsImplCopyWith<$Res>
|
||||
implements $PacketOptionsCopyWith<$Res> {
|
||||
factory _$$PacketOptionsImplCopyWith(
|
||||
_$PacketOptionsImpl value, $Res Function(_$PacketOptionsImpl) then) =
|
||||
__$$PacketOptionsImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -876,8 +879,12 @@ abstract class _$$PacketOptionsImplCopyWith<$Res> implements $PacketOptionsCopyW
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$PacketOptionsImplCopyWithImpl<$Res> extends _$PacketOptionsCopyWithImpl<$Res, _$PacketOptionsImpl> implements _$$PacketOptionsImplCopyWith<$Res> {
|
||||
__$$PacketOptionsImplCopyWithImpl(_$PacketOptionsImpl _value, $Res Function(_$PacketOptionsImpl) _then) : super(_value, _then);
|
||||
class __$$PacketOptionsImplCopyWithImpl<$Res>
|
||||
extends _$PacketOptionsCopyWithImpl<$Res, _$PacketOptionsImpl>
|
||||
implements _$$PacketOptionsImplCopyWith<$Res> {
|
||||
__$$PacketOptionsImplCopyWithImpl(
|
||||
_$PacketOptionsImpl _value, $Res Function(_$PacketOptionsImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of PacketOptions
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -920,10 +927,10 @@ class _$PacketOptionsImpl implements _PacketOptions {
|
||||
@JsonKey(name: "description") required this.description})
|
||||
: _items = items;
|
||||
|
||||
factory _$PacketOptionsImpl.fromJson(Map<String, dynamic> json) => _$$PacketOptionsImplFromJson(json);
|
||||
factory _$PacketOptionsImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$PacketOptionsImplFromJson(json);
|
||||
|
||||
final List<String> _items;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "items")
|
||||
List<String> get items {
|
||||
@@ -955,19 +962,26 @@ class _$PacketOptionsImpl implements _PacketOptions {
|
||||
const DeepCollectionEquality().equals(other._items, _items) &&
|
||||
const DeepCollectionEquality().equals(other.price, price) &&
|
||||
(identical(other.short, short) || other.short == short) &&
|
||||
(identical(other.description, description) || other.description == description));
|
||||
(identical(other.description, description) ||
|
||||
other.description == description));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_items), const DeepCollectionEquality().hash(price), short, description);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
const DeepCollectionEquality().hash(_items),
|
||||
const DeepCollectionEquality().hash(price),
|
||||
short,
|
||||
description);
|
||||
|
||||
/// Create a copy of PacketOptions
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$PacketOptionsImplCopyWith<_$PacketOptionsImpl> get copyWith => __$$PacketOptionsImplCopyWithImpl<_$PacketOptionsImpl>(this, _$identity);
|
||||
_$$PacketOptionsImplCopyWith<_$PacketOptionsImpl> get copyWith =>
|
||||
__$$PacketOptionsImplCopyWithImpl<_$PacketOptionsImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -979,25 +993,24 @@ class _$PacketOptionsImpl implements _PacketOptions {
|
||||
|
||||
abstract class _PacketOptions implements PacketOptions {
|
||||
const factory _PacketOptions(
|
||||
{@JsonKey(name: "items") required final List<String> items,
|
||||
@JsonKey(name: "price") required final dynamic price,
|
||||
@JsonKey(name: "short") required final String short,
|
||||
@JsonKey(name: "description") required final String description}) = _$PacketOptionsImpl;
|
||||
{@JsonKey(name: "items") required final List<String> items,
|
||||
@JsonKey(name: "price") required final dynamic price,
|
||||
@JsonKey(name: "short") required final String short,
|
||||
@JsonKey(name: "description") required final String description}) =
|
||||
_$PacketOptionsImpl;
|
||||
|
||||
factory _PacketOptions.fromJson(Map<String, dynamic> json) = _$PacketOptionsImpl.fromJson;
|
||||
factory _PacketOptions.fromJson(Map<String, dynamic> json) =
|
||||
_$PacketOptionsImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "items")
|
||||
List<String> get items;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "price")
|
||||
dynamic get price;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "short")
|
||||
String get short;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "description")
|
||||
String get description;
|
||||
@@ -1006,7 +1019,8 @@ abstract class _PacketOptions implements PacketOptions {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$PacketOptionsImplCopyWith<_$PacketOptionsImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$PacketOptionsImplCopyWith<_$PacketOptionsImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
PlanType _$PlanTypeFromJson(Map<String, dynamic> json) {
|
||||
@@ -1017,13 +1031,10 @@ PlanType _$PlanTypeFromJson(Map<String, dynamic> json) {
|
||||
mixin _$PlanType {
|
||||
@JsonKey(name: "fit")
|
||||
bool get fit => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "slim")
|
||||
bool get slim => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "behavior")
|
||||
bool get behavior => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "wellness")
|
||||
bool get wellness => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -1033,25 +1044,29 @@ mixin _$PlanType {
|
||||
/// Create a copy of PlanType
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$PlanTypeCopyWith<PlanType> get copyWith => throw _privateConstructorUsedError;
|
||||
$PlanTypeCopyWith<PlanType> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $PlanTypeCopyWith<$Res> {
|
||||
factory $PlanTypeCopyWith(PlanType value, $Res Function(PlanType) then) = _$PlanTypeCopyWithImpl<$Res, PlanType>;
|
||||
|
||||
factory $PlanTypeCopyWith(PlanType value, $Res Function(PlanType) then) =
|
||||
_$PlanTypeCopyWithImpl<$Res, PlanType>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "fit") bool fit, @JsonKey(name: "slim") bool slim, @JsonKey(name: "behavior") bool behavior, @JsonKey(name: "wellness") bool wellness});
|
||||
{@JsonKey(name: "fit") bool fit,
|
||||
@JsonKey(name: "slim") bool slim,
|
||||
@JsonKey(name: "behavior") bool behavior,
|
||||
@JsonKey(name: "wellness") bool wellness});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$PlanTypeCopyWithImpl<$Res, $Val extends PlanType> implements $PlanTypeCopyWith<$Res> {
|
||||
class _$PlanTypeCopyWithImpl<$Res, $Val extends PlanType>
|
||||
implements $PlanTypeCopyWith<$Res> {
|
||||
_$PlanTypeCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -1087,18 +1102,27 @@ class _$PlanTypeCopyWithImpl<$Res, $Val extends PlanType> implements $PlanTypeCo
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$PlanTypeImplCopyWith<$Res> implements $PlanTypeCopyWith<$Res> {
|
||||
factory _$$PlanTypeImplCopyWith(_$PlanTypeImpl value, $Res Function(_$PlanTypeImpl) then) = __$$PlanTypeImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$PlanTypeImplCopyWith<$Res>
|
||||
implements $PlanTypeCopyWith<$Res> {
|
||||
factory _$$PlanTypeImplCopyWith(
|
||||
_$PlanTypeImpl value, $Res Function(_$PlanTypeImpl) then) =
|
||||
__$$PlanTypeImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "fit") bool fit, @JsonKey(name: "slim") bool slim, @JsonKey(name: "behavior") bool behavior, @JsonKey(name: "wellness") bool wellness});
|
||||
{@JsonKey(name: "fit") bool fit,
|
||||
@JsonKey(name: "slim") bool slim,
|
||||
@JsonKey(name: "behavior") bool behavior,
|
||||
@JsonKey(name: "wellness") bool wellness});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$PlanTypeImplCopyWithImpl<$Res> extends _$PlanTypeCopyWithImpl<$Res, _$PlanTypeImpl> implements _$$PlanTypeImplCopyWith<$Res> {
|
||||
__$$PlanTypeImplCopyWithImpl(_$PlanTypeImpl _value, $Res Function(_$PlanTypeImpl) _then) : super(_value, _then);
|
||||
class __$$PlanTypeImplCopyWithImpl<$Res>
|
||||
extends _$PlanTypeCopyWithImpl<$Res, _$PlanTypeImpl>
|
||||
implements _$$PlanTypeImplCopyWith<$Res> {
|
||||
__$$PlanTypeImplCopyWithImpl(
|
||||
_$PlanTypeImpl _value, $Res Function(_$PlanTypeImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of PlanType
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -1140,7 +1164,8 @@ class _$PlanTypeImpl implements _PlanType {
|
||||
@JsonKey(name: "behavior") required this.behavior,
|
||||
@JsonKey(name: "wellness") required this.wellness});
|
||||
|
||||
factory _$PlanTypeImpl.fromJson(Map<String, dynamic> json) => _$$PlanTypeImplFromJson(json);
|
||||
factory _$PlanTypeImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$PlanTypeImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "fit")
|
||||
@@ -1167,8 +1192,10 @@ class _$PlanTypeImpl implements _PlanType {
|
||||
other is _$PlanTypeImpl &&
|
||||
(identical(other.fit, fit) || other.fit == fit) &&
|
||||
(identical(other.slim, slim) || other.slim == slim) &&
|
||||
(identical(other.behavior, behavior) || other.behavior == behavior) &&
|
||||
(identical(other.wellness, wellness) || other.wellness == wellness));
|
||||
(identical(other.behavior, behavior) ||
|
||||
other.behavior == behavior) &&
|
||||
(identical(other.wellness, wellness) ||
|
||||
other.wellness == wellness));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -1180,7 +1207,8 @@ class _$PlanTypeImpl implements _PlanType {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$PlanTypeImplCopyWith<_$PlanTypeImpl> get copyWith => __$$PlanTypeImplCopyWithImpl<_$PlanTypeImpl>(this, _$identity);
|
||||
_$$PlanTypeImplCopyWith<_$PlanTypeImpl> get copyWith =>
|
||||
__$$PlanTypeImplCopyWithImpl<_$PlanTypeImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -1192,25 +1220,24 @@ class _$PlanTypeImpl implements _PlanType {
|
||||
|
||||
abstract class _PlanType implements PlanType {
|
||||
const factory _PlanType(
|
||||
{@JsonKey(name: "fit") required final bool fit,
|
||||
@JsonKey(name: "slim") required final bool slim,
|
||||
@JsonKey(name: "behavior") required final bool behavior,
|
||||
@JsonKey(name: "wellness") required final bool wellness}) = _$PlanTypeImpl;
|
||||
{@JsonKey(name: "fit") required final bool fit,
|
||||
@JsonKey(name: "slim") required final bool slim,
|
||||
@JsonKey(name: "behavior") required final bool behavior,
|
||||
@JsonKey(name: "wellness") required final bool wellness}) =
|
||||
_$PlanTypeImpl;
|
||||
|
||||
factory _PlanType.fromJson(Map<String, dynamic> json) = _$PlanTypeImpl.fromJson;
|
||||
factory _PlanType.fromJson(Map<String, dynamic> json) =
|
||||
_$PlanTypeImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "fit")
|
||||
bool get fit;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "slim")
|
||||
bool get slim;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "behavior")
|
||||
bool get behavior;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "wellness")
|
||||
bool get wellness;
|
||||
@@ -1219,5 +1246,6 @@ abstract class _PlanType implements PlanType {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$PlanTypeImplCopyWith<_$PlanTypeImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$PlanTypeImplCopyWith<_$PlanTypeImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,19 +6,26 @@ part of 'plan_pagination_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$PlanPaginationModelImpl _$$PlanPaginationModelImplFromJson(Map<String, dynamic> json) => _$PlanPaginationModelImpl(
|
||||
data: (json['data'] as List<dynamic>).map((e) => PlanModel.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
_$PlanPaginationModelImpl _$$PlanPaginationModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$PlanPaginationModelImpl(
|
||||
data: (json['data'] as List<dynamic>)
|
||||
.map((e) => PlanModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
links: Links.fromJson(json['links'] as Map<String, dynamic>),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$PlanPaginationModelImplToJson(_$PlanPaginationModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$PlanPaginationModelImplToJson(
|
||||
_$PlanPaginationModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.data,
|
||||
'links': instance.links,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
_$PlanModelImpl _$$PlanModelImplFromJson(Map<String, dynamic> json) => _$PlanModelImpl(
|
||||
_$PlanModelImpl _$$PlanModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$PlanModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
name: json['name'] as String,
|
||||
image: json['image'] as String,
|
||||
@@ -36,7 +43,8 @@ _$PlanModelImpl _$$PlanModelImplFromJson(Map<String, dynamic> json) => _$PlanMod
|
||||
totalComments: (json['total_comments'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$PlanModelImplToJson(_$PlanModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$PlanModelImplToJson(_$PlanModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'image': instance.image,
|
||||
@@ -54,28 +62,32 @@ Map<String, dynamic> _$$PlanModelImplToJson(_$PlanModelImpl instance) => <String
|
||||
'total_comments': instance.totalComments,
|
||||
};
|
||||
|
||||
_$PacketOptionsImpl _$$PacketOptionsImplFromJson(Map<String, dynamic> json) => _$PacketOptionsImpl(
|
||||
_$PacketOptionsImpl _$$PacketOptionsImplFromJson(Map<String, dynamic> json) =>
|
||||
_$PacketOptionsImpl(
|
||||
items: (json['items'] as List<dynamic>).map((e) => e as String).toList(),
|
||||
price: json['price'],
|
||||
short: json['short'] as String,
|
||||
description: json['description'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$PacketOptionsImplToJson(_$PacketOptionsImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$PacketOptionsImplToJson(_$PacketOptionsImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'items': instance.items,
|
||||
'price': instance.price,
|
||||
'short': instance.short,
|
||||
'description': instance.description,
|
||||
};
|
||||
|
||||
_$PlanTypeImpl _$$PlanTypeImplFromJson(Map<String, dynamic> json) => _$PlanTypeImpl(
|
||||
_$PlanTypeImpl _$$PlanTypeImplFromJson(Map<String, dynamic> json) =>
|
||||
_$PlanTypeImpl(
|
||||
fit: json['fit'] as bool,
|
||||
slim: json['slim'] as bool,
|
||||
behavior: json['behavior'] as bool,
|
||||
wellness: json['wellness'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$PlanTypeImplToJson(_$PlanTypeImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$PlanTypeImplToJson(_$PlanTypeImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'fit': instance.fit,
|
||||
'slim': instance.slim,
|
||||
'behavior': instance.behavior,
|
||||
|
||||
@@ -24,7 +24,6 @@ mixin _$PlansState {
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
@@ -71,16 +70,18 @@ mixin _$PlansState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $PlansStateCopyWith<$Res> {
|
||||
factory $PlansStateCopyWith(PlansState value, $Res Function(PlansState) then) = _$PlansStateCopyWithImpl<$Res, PlansState>;
|
||||
factory $PlansStateCopyWith(
|
||||
PlansState value, $Res Function(PlansState) then) =
|
||||
_$PlansStateCopyWithImpl<$Res, PlansState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$PlansStateCopyWithImpl<$Res, $Val extends PlansState> implements $PlansStateCopyWith<$Res> {
|
||||
class _$PlansStateCopyWithImpl<$Res, $Val extends PlansState>
|
||||
implements $PlansStateCopyWith<$Res> {
|
||||
_$PlansStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -90,12 +91,18 @@ class _$PlansStateCopyWithImpl<$Res, $Val extends PlansState> implements $PlansS
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$PlansStateImplCopyWith<$Res> {
|
||||
factory _$$PlansStateImplCopyWith(_$PlansStateImpl value, $Res Function(_$PlansStateImpl) then) = __$$PlansStateImplCopyWithImpl<$Res>;
|
||||
factory _$$PlansStateImplCopyWith(
|
||||
_$PlansStateImpl value, $Res Function(_$PlansStateImpl) then) =
|
||||
__$$PlansStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$PlansStateImplCopyWithImpl<$Res> extends _$PlansStateCopyWithImpl<$Res, _$PlansStateImpl> implements _$$PlansStateImplCopyWith<$Res> {
|
||||
__$$PlansStateImplCopyWithImpl(_$PlansStateImpl _value, $Res Function(_$PlansStateImpl) _then) : super(_value, _then);
|
||||
class __$$PlansStateImplCopyWithImpl<$Res>
|
||||
extends _$PlansStateCopyWithImpl<$Res, _$PlansStateImpl>
|
||||
implements _$$PlansStateImplCopyWith<$Res> {
|
||||
__$$PlansStateImplCopyWithImpl(
|
||||
_$PlansStateImpl _value, $Res Function(_$PlansStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of PlansState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -113,7 +120,8 @@ class _$PlansStateImpl implements _PlansState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$PlansStateImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$PlansStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -200,14 +208,18 @@ abstract class _PlansState implements PlansState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$PlansStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$PlansStateLoadingImplCopyWith(_$PlansStateLoadingImpl value, $Res Function(_$PlansStateLoadingImpl) then) =
|
||||
factory _$$PlansStateLoadingImplCopyWith(_$PlansStateLoadingImpl value,
|
||||
$Res Function(_$PlansStateLoadingImpl) then) =
|
||||
__$$PlansStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$PlansStateLoadingImplCopyWithImpl<$Res> extends _$PlansStateCopyWithImpl<$Res, _$PlansStateLoadingImpl>
|
||||
class __$$PlansStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$PlansStateCopyWithImpl<$Res, _$PlansStateLoadingImpl>
|
||||
implements _$$PlansStateLoadingImplCopyWith<$Res> {
|
||||
__$$PlansStateLoadingImplCopyWithImpl(_$PlansStateLoadingImpl _value, $Res Function(_$PlansStateLoadingImpl) _then) : super(_value, _then);
|
||||
__$$PlansStateLoadingImplCopyWithImpl(_$PlansStateLoadingImpl _value,
|
||||
$Res Function(_$PlansStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of PlansState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -225,7 +237,8 @@ class _$PlansStateLoadingImpl implements PlansStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$PlansStateLoadingImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$PlansStateLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -312,9 +325,9 @@ abstract class PlansStateLoading implements PlansState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$PlansStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$PlansStateLoadedImplCopyWith(_$PlansStateLoadedImpl value, $Res Function(_$PlansStateLoadedImpl) then) =
|
||||
factory _$$PlansStateLoadedImplCopyWith(_$PlansStateLoadedImpl value,
|
||||
$Res Function(_$PlansStateLoadedImpl) then) =
|
||||
__$$PlansStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({PlanPaginationModel plansModel});
|
||||
|
||||
@@ -322,9 +335,12 @@ abstract class _$$PlansStateLoadedImplCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$PlansStateLoadedImplCopyWithImpl<$Res> extends _$PlansStateCopyWithImpl<$Res, _$PlansStateLoadedImpl>
|
||||
class __$$PlansStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$PlansStateCopyWithImpl<$Res, _$PlansStateLoadedImpl>
|
||||
implements _$$PlansStateLoadedImplCopyWith<$Res> {
|
||||
__$$PlansStateLoadedImplCopyWithImpl(_$PlansStateLoadedImpl _value, $Res Function(_$PlansStateLoadedImpl) _then) : super(_value, _then);
|
||||
__$$PlansStateLoadedImplCopyWithImpl(_$PlansStateLoadedImpl _value,
|
||||
$Res Function(_$PlansStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of PlansState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -368,7 +384,10 @@ class _$PlansStateLoadedImpl implements PlansStateLoaded {
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$PlansStateLoadedImpl && (identical(other.plansModel, plansModel) || other.plansModel == plansModel));
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$PlansStateLoadedImpl &&
|
||||
(identical(other.plansModel, plansModel) ||
|
||||
other.plansModel == plansModel));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -379,7 +398,9 @@ class _$PlansStateLoadedImpl implements PlansStateLoaded {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$PlansStateLoadedImplCopyWith<_$PlansStateLoadedImpl> get copyWith => __$$PlansStateLoadedImplCopyWithImpl<_$PlansStateLoadedImpl>(this, _$identity);
|
||||
_$$PlansStateLoadedImplCopyWith<_$PlansStateLoadedImpl> get copyWith =>
|
||||
__$$PlansStateLoadedImplCopyWithImpl<_$PlansStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -457,27 +478,34 @@ class _$PlansStateLoadedImpl implements PlansStateLoaded {
|
||||
}
|
||||
|
||||
abstract class PlansStateLoaded implements PlansState {
|
||||
const factory PlansStateLoaded({required final PlanPaginationModel plansModel}) = _$PlansStateLoadedImpl;
|
||||
const factory PlansStateLoaded(
|
||||
{required final PlanPaginationModel plansModel}) = _$PlansStateLoadedImpl;
|
||||
|
||||
PlanPaginationModel get plansModel;
|
||||
|
||||
/// Create a copy of PlansState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$PlansStateLoadedImplCopyWith<_$PlansStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$PlansStateLoadedImplCopyWith<_$PlansStateLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$PlansStateErrorImplCopyWith<$Res> {
|
||||
factory _$$PlansStateErrorImplCopyWith(_$PlansStateErrorImpl value, $Res Function(_$PlansStateErrorImpl) then) = __$$PlansStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$PlansStateErrorImplCopyWith(_$PlansStateErrorImpl value,
|
||||
$Res Function(_$PlansStateErrorImpl) then) =
|
||||
__$$PlansStateErrorImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$PlansStateErrorImplCopyWithImpl<$Res> extends _$PlansStateCopyWithImpl<$Res, _$PlansStateErrorImpl> implements _$$PlansStateErrorImplCopyWith<$Res> {
|
||||
__$$PlansStateErrorImplCopyWithImpl(_$PlansStateErrorImpl _value, $Res Function(_$PlansStateErrorImpl) _then) : super(_value, _then);
|
||||
class __$$PlansStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$PlansStateCopyWithImpl<$Res, _$PlansStateErrorImpl>
|
||||
implements _$$PlansStateErrorImplCopyWith<$Res> {
|
||||
__$$PlansStateErrorImplCopyWithImpl(
|
||||
_$PlansStateErrorImpl _value, $Res Function(_$PlansStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of PlansState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -513,7 +541,8 @@ class _$PlansStateErrorImpl implements PlansStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$PlansStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -524,7 +553,9 @@ class _$PlansStateErrorImpl implements PlansStateError {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$PlansStateErrorImplCopyWith<_$PlansStateErrorImpl> get copyWith => __$$PlansStateErrorImplCopyWithImpl<_$PlansStateErrorImpl>(this, _$identity);
|
||||
_$$PlansStateErrorImplCopyWith<_$PlansStateErrorImpl> get copyWith =>
|
||||
__$$PlansStateErrorImplCopyWithImpl<_$PlansStateErrorImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -602,12 +633,14 @@ class _$PlansStateErrorImpl implements PlansStateError {
|
||||
}
|
||||
|
||||
abstract class PlansStateError implements PlansState {
|
||||
const factory PlansStateError({required final String errorMessage}) = _$PlansStateErrorImpl;
|
||||
const factory PlansStateError({required final String errorMessage}) =
|
||||
_$PlansStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
/// Create a copy of PlansState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$PlansStateErrorImplCopyWith<_$PlansStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$PlansStateErrorImplCopyWith<_$PlansStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,9 @@ class _PlansService implements PlansService {
|
||||
}
|
||||
|
||||
RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
|
||||
if (T != dynamic && !(requestOptions.responseType == ResponseType.bytes || requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T != dynamic &&
|
||||
!(requestOptions.responseType == ResponseType.bytes ||
|
||||
requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T == String) {
|
||||
requestOptions.responseType = ResponseType.plain;
|
||||
} else {
|
||||
|
||||
19
lib/features/profile/models/circumference_model.dart
Normal file
19
lib/features/profile/models/circumference_model.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'circumference_model.freezed.dart';
|
||||
part 'circumference_model.g.dart';
|
||||
|
||||
@freezed
|
||||
class CircumferenceModel with _$CircumferenceModel {
|
||||
const factory CircumferenceModel({
|
||||
@JsonKey(name: "id") required int id,
|
||||
@JsonKey(name: "user_id") required int userId,
|
||||
@JsonKey(name: "chest_circumference") required int chestCircumference,
|
||||
@JsonKey(name: "waist_circumference") required int waistCircumference,
|
||||
@JsonKey(name: "hip_circumference") required int hipCircumference,
|
||||
@JsonKey(name: "created_at") required DateTime createdAt,
|
||||
@JsonKey(name: "updated_at") required DateTime updatedAt,
|
||||
}) = _CircumferenceModel;
|
||||
|
||||
factory CircumferenceModel.fromJson(Map<String, dynamic> json) => _$CircumferenceModelFromJson(json);
|
||||
}
|
||||
319
lib/features/profile/models/circumference_model.freezed.dart
Normal file
319
lib/features/profile/models/circumference_model.freezed.dart
Normal file
@@ -0,0 +1,319 @@
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// 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
|
||||
|
||||
part of 'circumference_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
T _$identity<T>(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');
|
||||
|
||||
CircumferenceModel _$CircumferenceModelFromJson(Map<String, dynamic> json) {
|
||||
return _CircumferenceModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$CircumferenceModel {
|
||||
@JsonKey(name: "id")
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "user_id")
|
||||
int get userId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "chest_circumference")
|
||||
int get chestCircumference => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "waist_circumference")
|
||||
int get waistCircumference => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "hip_circumference")
|
||||
int get hipCircumference => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this CircumferenceModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of CircumferenceModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$CircumferenceModelCopyWith<CircumferenceModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $CircumferenceModelCopyWith<$Res> {
|
||||
factory $CircumferenceModelCopyWith(
|
||||
CircumferenceModel value, $Res Function(CircumferenceModel) then) =
|
||||
_$CircumferenceModelCopyWithImpl<$Res, CircumferenceModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "id") int id,
|
||||
@JsonKey(name: "user_id") int userId,
|
||||
@JsonKey(name: "chest_circumference") int chestCircumference,
|
||||
@JsonKey(name: "waist_circumference") int waistCircumference,
|
||||
@JsonKey(name: "hip_circumference") int hipCircumference,
|
||||
@JsonKey(name: "created_at") DateTime createdAt,
|
||||
@JsonKey(name: "updated_at") DateTime updatedAt});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$CircumferenceModelCopyWithImpl<$Res, $Val extends CircumferenceModel>
|
||||
implements $CircumferenceModelCopyWith<$Res> {
|
||||
_$CircumferenceModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of CircumferenceModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? userId = null,
|
||||
Object? chestCircumference = null,
|
||||
Object? waistCircumference = null,
|
||||
Object? hipCircumference = null,
|
||||
Object? createdAt = null,
|
||||
Object? updatedAt = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
userId: null == userId
|
||||
? _value.userId
|
||||
: userId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
chestCircumference: null == chestCircumference
|
||||
? _value.chestCircumference
|
||||
: chestCircumference // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
waistCircumference: null == waistCircumference
|
||||
? _value.waistCircumference
|
||||
: waistCircumference // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
hipCircumference: null == hipCircumference
|
||||
? _value.hipCircumference
|
||||
: hipCircumference // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
createdAt: null == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
updatedAt: null == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CircumferenceModelImplCopyWith<$Res>
|
||||
implements $CircumferenceModelCopyWith<$Res> {
|
||||
factory _$$CircumferenceModelImplCopyWith(_$CircumferenceModelImpl value,
|
||||
$Res Function(_$CircumferenceModelImpl) then) =
|
||||
__$$CircumferenceModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "id") int id,
|
||||
@JsonKey(name: "user_id") int userId,
|
||||
@JsonKey(name: "chest_circumference") int chestCircumference,
|
||||
@JsonKey(name: "waist_circumference") int waistCircumference,
|
||||
@JsonKey(name: "hip_circumference") int hipCircumference,
|
||||
@JsonKey(name: "created_at") DateTime createdAt,
|
||||
@JsonKey(name: "updated_at") DateTime updatedAt});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CircumferenceModelImplCopyWithImpl<$Res>
|
||||
extends _$CircumferenceModelCopyWithImpl<$Res, _$CircumferenceModelImpl>
|
||||
implements _$$CircumferenceModelImplCopyWith<$Res> {
|
||||
__$$CircumferenceModelImplCopyWithImpl(_$CircumferenceModelImpl _value,
|
||||
$Res Function(_$CircumferenceModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of CircumferenceModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? userId = null,
|
||||
Object? chestCircumference = null,
|
||||
Object? waistCircumference = null,
|
||||
Object? hipCircumference = null,
|
||||
Object? createdAt = null,
|
||||
Object? updatedAt = null,
|
||||
}) {
|
||||
return _then(_$CircumferenceModelImpl(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
userId: null == userId
|
||||
? _value.userId
|
||||
: userId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
chestCircumference: null == chestCircumference
|
||||
? _value.chestCircumference
|
||||
: chestCircumference // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
waistCircumference: null == waistCircumference
|
||||
? _value.waistCircumference
|
||||
: waistCircumference // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
hipCircumference: null == hipCircumference
|
||||
? _value.hipCircumference
|
||||
: hipCircumference // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
createdAt: null == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
updatedAt: null == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$CircumferenceModelImpl implements _CircumferenceModel {
|
||||
const _$CircumferenceModelImpl(
|
||||
{@JsonKey(name: "id") required this.id,
|
||||
@JsonKey(name: "user_id") required this.userId,
|
||||
@JsonKey(name: "chest_circumference") required this.chestCircumference,
|
||||
@JsonKey(name: "waist_circumference") required this.waistCircumference,
|
||||
@JsonKey(name: "hip_circumference") required this.hipCircumference,
|
||||
@JsonKey(name: "created_at") required this.createdAt,
|
||||
@JsonKey(name: "updated_at") required this.updatedAt});
|
||||
|
||||
factory _$CircumferenceModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$CircumferenceModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
final int id;
|
||||
@override
|
||||
@JsonKey(name: "user_id")
|
||||
final int userId;
|
||||
@override
|
||||
@JsonKey(name: "chest_circumference")
|
||||
final int chestCircumference;
|
||||
@override
|
||||
@JsonKey(name: "waist_circumference")
|
||||
final int waistCircumference;
|
||||
@override
|
||||
@JsonKey(name: "hip_circumference")
|
||||
final int hipCircumference;
|
||||
@override
|
||||
@JsonKey(name: "created_at")
|
||||
final DateTime createdAt;
|
||||
@override
|
||||
@JsonKey(name: "updated_at")
|
||||
final DateTime updatedAt;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CircumferenceModel(id: $id, userId: $userId, chestCircumference: $chestCircumference, waistCircumference: $waistCircumference, hipCircumference: $hipCircumference, createdAt: $createdAt, updatedAt: $updatedAt)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$CircumferenceModelImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.userId, userId) || other.userId == userId) &&
|
||||
(identical(other.chestCircumference, chestCircumference) ||
|
||||
other.chestCircumference == chestCircumference) &&
|
||||
(identical(other.waistCircumference, waistCircumference) ||
|
||||
other.waistCircumference == waistCircumference) &&
|
||||
(identical(other.hipCircumference, hipCircumference) ||
|
||||
other.hipCircumference == hipCircumference) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, userId, chestCircumference,
|
||||
waistCircumference, hipCircumference, createdAt, updatedAt);
|
||||
|
||||
/// Create a copy of CircumferenceModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$CircumferenceModelImplCopyWith<_$CircumferenceModelImpl> get copyWith =>
|
||||
__$$CircumferenceModelImplCopyWithImpl<_$CircumferenceModelImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$CircumferenceModelImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _CircumferenceModel implements CircumferenceModel {
|
||||
const factory _CircumferenceModel(
|
||||
{@JsonKey(name: "id") required final int id,
|
||||
@JsonKey(name: "user_id") required final int userId,
|
||||
@JsonKey(name: "chest_circumference")
|
||||
required final int chestCircumference,
|
||||
@JsonKey(name: "waist_circumference")
|
||||
required final int waistCircumference,
|
||||
@JsonKey(name: "hip_circumference") required final int hipCircumference,
|
||||
@JsonKey(name: "created_at") required final DateTime createdAt,
|
||||
@JsonKey(name: "updated_at")
|
||||
required final DateTime updatedAt}) = _$CircumferenceModelImpl;
|
||||
|
||||
factory _CircumferenceModel.fromJson(Map<String, dynamic> json) =
|
||||
_$CircumferenceModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
int get id;
|
||||
@override
|
||||
@JsonKey(name: "user_id")
|
||||
int get userId;
|
||||
@override
|
||||
@JsonKey(name: "chest_circumference")
|
||||
int get chestCircumference;
|
||||
@override
|
||||
@JsonKey(name: "waist_circumference")
|
||||
int get waistCircumference;
|
||||
@override
|
||||
@JsonKey(name: "hip_circumference")
|
||||
int get hipCircumference;
|
||||
@override
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt;
|
||||
@override
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt;
|
||||
|
||||
/// Create a copy of CircumferenceModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$CircumferenceModelImplCopyWith<_$CircumferenceModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
31
lib/features/profile/models/circumference_model.g.dart
Normal file
31
lib/features/profile/models/circumference_model.g.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'circumference_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$CircumferenceModelImpl _$$CircumferenceModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$CircumferenceModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
userId: (json['user_id'] as num).toInt(),
|
||||
chestCircumference: (json['chest_circumference'] as num).toInt(),
|
||||
waistCircumference: (json['waist_circumference'] as num).toInt(),
|
||||
hipCircumference: (json['hip_circumference'] as num).toInt(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$CircumferenceModelImplToJson(
|
||||
_$CircumferenceModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'user_id': instance.userId,
|
||||
'chest_circumference': instance.chestCircumference,
|
||||
'waist_circumference': instance.waistCircumference,
|
||||
'hip_circumference': instance.hipCircumference,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
};
|
||||
@@ -22,28 +22,20 @@ ProfileModel _$ProfileModelFromJson(Map<String, dynamic> json) {
|
||||
mixin _$ProfileModel {
|
||||
@JsonKey(name: "id")
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "name")
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "email")
|
||||
String get email => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "email_verified_at")
|
||||
DateTime? get emailVerifiedAt => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime? get createdAt => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime? get updatedAt => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "is_public_profile")
|
||||
bool get isPublicProfile => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "slug")
|
||||
String get slug => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "profile_photo_url")
|
||||
String get profilePhotoUrl => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -53,13 +45,15 @@ mixin _$ProfileModel {
|
||||
/// Create a copy of ProfileModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ProfileModelCopyWith<ProfileModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$ProfileModelCopyWith<ProfileModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ProfileModelCopyWith<$Res> {
|
||||
factory $ProfileModelCopyWith(ProfileModel value, $Res Function(ProfileModel) then) = _$ProfileModelCopyWithImpl<$Res, ProfileModel>;
|
||||
|
||||
factory $ProfileModelCopyWith(
|
||||
ProfileModel value, $Res Function(ProfileModel) then) =
|
||||
_$ProfileModelCopyWithImpl<$Res, ProfileModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "id") int id,
|
||||
@@ -74,12 +68,12 @@ abstract class $ProfileModelCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ProfileModelCopyWithImpl<$Res, $Val extends ProfileModel> implements $ProfileModelCopyWith<$Res> {
|
||||
class _$ProfileModelCopyWithImpl<$Res, $Val extends ProfileModel>
|
||||
implements $ProfileModelCopyWith<$Res> {
|
||||
_$ProfileModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -140,9 +134,11 @@ class _$ProfileModelCopyWithImpl<$Res, $Val extends ProfileModel> implements $Pr
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ProfileModelImplCopyWith<$Res> implements $ProfileModelCopyWith<$Res> {
|
||||
factory _$$ProfileModelImplCopyWith(_$ProfileModelImpl value, $Res Function(_$ProfileModelImpl) then) = __$$ProfileModelImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$ProfileModelImplCopyWith<$Res>
|
||||
implements $ProfileModelCopyWith<$Res> {
|
||||
factory _$$ProfileModelImplCopyWith(
|
||||
_$ProfileModelImpl value, $Res Function(_$ProfileModelImpl) then) =
|
||||
__$$ProfileModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -158,8 +154,12 @@ abstract class _$$ProfileModelImplCopyWith<$Res> implements $ProfileModelCopyWit
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ProfileModelImplCopyWithImpl<$Res> extends _$ProfileModelCopyWithImpl<$Res, _$ProfileModelImpl> implements _$$ProfileModelImplCopyWith<$Res> {
|
||||
__$$ProfileModelImplCopyWithImpl(_$ProfileModelImpl _value, $Res Function(_$ProfileModelImpl) _then) : super(_value, _then);
|
||||
class __$$ProfileModelImplCopyWithImpl<$Res>
|
||||
extends _$ProfileModelCopyWithImpl<$Res, _$ProfileModelImpl>
|
||||
implements _$$ProfileModelImplCopyWith<$Res> {
|
||||
__$$ProfileModelImplCopyWithImpl(
|
||||
_$ProfileModelImpl _value, $Res Function(_$ProfileModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ProfileModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -231,7 +231,8 @@ class _$ProfileModelImpl implements _ProfileModel {
|
||||
@JsonKey(name: "slug") required this.slug,
|
||||
@JsonKey(name: "profile_photo_url") required this.profilePhotoUrl});
|
||||
|
||||
factory _$ProfileModelImpl.fromJson(Map<String, dynamic> json) => _$$ProfileModelImplFromJson(json);
|
||||
factory _$ProfileModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ProfileModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
@@ -274,24 +275,31 @@ class _$ProfileModelImpl implements _ProfileModel {
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
(identical(other.email, email) || other.email == email) &&
|
||||
(identical(other.emailVerifiedAt, emailVerifiedAt) || other.emailVerifiedAt == emailVerifiedAt) &&
|
||||
(identical(other.createdAt, createdAt) || other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) &&
|
||||
(identical(other.isPublicProfile, isPublicProfile) || other.isPublicProfile == isPublicProfile) &&
|
||||
(identical(other.emailVerifiedAt, emailVerifiedAt) ||
|
||||
other.emailVerifiedAt == emailVerifiedAt) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt) &&
|
||||
(identical(other.isPublicProfile, isPublicProfile) ||
|
||||
other.isPublicProfile == isPublicProfile) &&
|
||||
(identical(other.slug, slug) || other.slug == slug) &&
|
||||
(identical(other.profilePhotoUrl, profilePhotoUrl) || other.profilePhotoUrl == profilePhotoUrl));
|
||||
(identical(other.profilePhotoUrl, profilePhotoUrl) ||
|
||||
other.profilePhotoUrl == profilePhotoUrl));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, name, email, emailVerifiedAt, createdAt, updatedAt, isPublicProfile, slug, profilePhotoUrl);
|
||||
int get hashCode => Object.hash(runtimeType, id, name, email, emailVerifiedAt,
|
||||
createdAt, updatedAt, isPublicProfile, slug, profilePhotoUrl);
|
||||
|
||||
/// Create a copy of ProfileModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ProfileModelImplCopyWith<_$ProfileModelImpl> get copyWith => __$$ProfileModelImplCopyWithImpl<_$ProfileModelImpl>(this, _$identity);
|
||||
_$$ProfileModelImplCopyWith<_$ProfileModelImpl> get copyWith =>
|
||||
__$$ProfileModelImplCopyWithImpl<_$ProfileModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -311,42 +319,36 @@ abstract class _ProfileModel implements ProfileModel {
|
||||
@JsonKey(name: "updated_at") final DateTime? updatedAt,
|
||||
@JsonKey(name: "is_public_profile") required final bool isPublicProfile,
|
||||
@JsonKey(name: "slug") required final String slug,
|
||||
@JsonKey(name: "profile_photo_url") required final String profilePhotoUrl}) = _$ProfileModelImpl;
|
||||
@JsonKey(name: "profile_photo_url")
|
||||
required final String profilePhotoUrl}) = _$ProfileModelImpl;
|
||||
|
||||
factory _ProfileModel.fromJson(Map<String, dynamic> json) = _$ProfileModelImpl.fromJson;
|
||||
factory _ProfileModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ProfileModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
int get id;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "name")
|
||||
String get name;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "email")
|
||||
String get email;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "email_verified_at")
|
||||
DateTime? get emailVerifiedAt;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime? get createdAt;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime? get updatedAt;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "is_public_profile")
|
||||
bool get isPublicProfile;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "slug")
|
||||
String get slug;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "profile_photo_url")
|
||||
String get profilePhotoUrl;
|
||||
@@ -355,7 +357,8 @@ abstract class _ProfileModel implements ProfileModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ProfileModelImplCopyWith<_$ProfileModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$ProfileModelImplCopyWith<_$ProfileModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
ProfileDetailsModel _$ProfileDetailsModelFromJson(Map<String, dynamic> json) {
|
||||
@@ -366,82 +369,56 @@ ProfileDetailsModel _$ProfileDetailsModelFromJson(Map<String, dynamic> json) {
|
||||
mixin _$ProfileDetailsModel {
|
||||
@JsonKey(name: "first_name")
|
||||
String get firstName => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "last_name")
|
||||
String get lastName => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "birthdate")
|
||||
String get birthdate => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "gender")
|
||||
String get gender => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "country")
|
||||
String get country => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "city")
|
||||
String get city => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "lang")
|
||||
String get lang => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "weight")
|
||||
double get weight => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "height")
|
||||
int get height => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "chest_circumference")
|
||||
int get chestCircumference => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "waist_circumference")
|
||||
int get waistCircumference => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "hip_circumference")
|
||||
int get hipCircumference => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "blood_pressure_up")
|
||||
int get bloodPressureUp => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "blood_pressure_down")
|
||||
int get bloodPressureDown => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "has_hypo")
|
||||
bool get hasHypo => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "has_hyper")
|
||||
bool get hasHyper => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "about_alergy")
|
||||
String get aboutAlergy => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "about_taking_pils")
|
||||
String get aboutTakingPils => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "about_sport_hobbies")
|
||||
String get aboutSportHobbies => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "favorite_foods")
|
||||
String get favoriteFoods => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "unfavorite_foods")
|
||||
String get unfavoriteFoods => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "additional_info")
|
||||
String get additionalInfo => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime? get createdAt => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime? get updatedAt => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "is_mood_fillable")
|
||||
bool get isMoodFillable => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "is_bedtime_fillable")
|
||||
bool get isBedtimeFillable => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "activity_coefficient")
|
||||
double get activityCoefficient => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -451,14 +428,15 @@ mixin _$ProfileDetailsModel {
|
||||
/// Create a copy of ProfileDetailsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ProfileDetailsModelCopyWith<ProfileDetailsModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$ProfileDetailsModelCopyWith<ProfileDetailsModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ProfileDetailsModelCopyWith<$Res> {
|
||||
factory $ProfileDetailsModelCopyWith(ProfileDetailsModel value, $Res Function(ProfileDetailsModel) then) =
|
||||
factory $ProfileDetailsModelCopyWith(
|
||||
ProfileDetailsModel value, $Res Function(ProfileDetailsModel) then) =
|
||||
_$ProfileDetailsModelCopyWithImpl<$Res, ProfileDetailsModel>;
|
||||
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "first_name") String firstName,
|
||||
@@ -491,12 +469,12 @@ abstract class $ProfileDetailsModelCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ProfileDetailsModelCopyWithImpl<$Res, $Val extends ProfileDetailsModel> implements $ProfileDetailsModelCopyWith<$Res> {
|
||||
class _$ProfileDetailsModelCopyWithImpl<$Res, $Val extends ProfileDetailsModel>
|
||||
implements $ProfileDetailsModelCopyWith<$Res> {
|
||||
_$ProfileDetailsModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -647,10 +625,11 @@ class _$ProfileDetailsModelCopyWithImpl<$Res, $Val extends ProfileDetailsModel>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ProfileDetailsModelImplCopyWith<$Res> implements $ProfileDetailsModelCopyWith<$Res> {
|
||||
factory _$$ProfileDetailsModelImplCopyWith(_$ProfileDetailsModelImpl value, $Res Function(_$ProfileDetailsModelImpl) then) =
|
||||
abstract class _$$ProfileDetailsModelImplCopyWith<$Res>
|
||||
implements $ProfileDetailsModelCopyWith<$Res> {
|
||||
factory _$$ProfileDetailsModelImplCopyWith(_$ProfileDetailsModelImpl value,
|
||||
$Res Function(_$ProfileDetailsModelImpl) then) =
|
||||
__$$ProfileDetailsModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -684,9 +663,12 @@ abstract class _$$ProfileDetailsModelImplCopyWith<$Res> implements $ProfileDetai
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ProfileDetailsModelImplCopyWithImpl<$Res> extends _$ProfileDetailsModelCopyWithImpl<$Res, _$ProfileDetailsModelImpl>
|
||||
class __$$ProfileDetailsModelImplCopyWithImpl<$Res>
|
||||
extends _$ProfileDetailsModelCopyWithImpl<$Res, _$ProfileDetailsModelImpl>
|
||||
implements _$$ProfileDetailsModelImplCopyWith<$Res> {
|
||||
__$$ProfileDetailsModelImplCopyWithImpl(_$ProfileDetailsModelImpl _value, $Res Function(_$ProfileDetailsModelImpl) _then) : super(_value, _then);
|
||||
__$$ProfileDetailsModelImplCopyWithImpl(_$ProfileDetailsModelImpl _value,
|
||||
$Res Function(_$ProfileDetailsModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ProfileDetailsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -864,9 +846,11 @@ class _$ProfileDetailsModelImpl implements _ProfileDetailsModel {
|
||||
@JsonKey(name: "updated_at") this.updatedAt,
|
||||
@JsonKey(name: "is_mood_fillable") required this.isMoodFillable,
|
||||
@JsonKey(name: "is_bedtime_fillable") required this.isBedtimeFillable,
|
||||
@JsonKey(name: "activity_coefficient") required this.activityCoefficient});
|
||||
@JsonKey(name: "activity_coefficient")
|
||||
required this.activityCoefficient});
|
||||
|
||||
factory _$ProfileDetailsModelImpl.fromJson(Map<String, dynamic> json) => _$$ProfileDetailsModelImplFromJson(json);
|
||||
factory _$ProfileDetailsModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ProfileDetailsModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "first_name")
|
||||
@@ -960,33 +944,53 @@ class _$ProfileDetailsModelImpl implements _ProfileDetailsModel {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ProfileDetailsModelImpl &&
|
||||
(identical(other.firstName, firstName) || other.firstName == firstName) &&
|
||||
(identical(other.lastName, lastName) || other.lastName == lastName) &&
|
||||
(identical(other.birthdate, birthdate) || other.birthdate == birthdate) &&
|
||||
(identical(other.firstName, firstName) ||
|
||||
other.firstName == firstName) &&
|
||||
(identical(other.lastName, lastName) ||
|
||||
other.lastName == lastName) &&
|
||||
(identical(other.birthdate, birthdate) ||
|
||||
other.birthdate == birthdate) &&
|
||||
(identical(other.gender, gender) || other.gender == gender) &&
|
||||
(identical(other.country, country) || other.country == country) &&
|
||||
(identical(other.city, city) || other.city == city) &&
|
||||
(identical(other.lang, lang) || other.lang == lang) &&
|
||||
(identical(other.weight, weight) || other.weight == weight) &&
|
||||
(identical(other.height, height) || other.height == height) &&
|
||||
(identical(other.chestCircumference, chestCircumference) || other.chestCircumference == chestCircumference) &&
|
||||
(identical(other.waistCircumference, waistCircumference) || other.waistCircumference == waistCircumference) &&
|
||||
(identical(other.hipCircumference, hipCircumference) || other.hipCircumference == hipCircumference) &&
|
||||
(identical(other.bloodPressureUp, bloodPressureUp) || other.bloodPressureUp == bloodPressureUp) &&
|
||||
(identical(other.bloodPressureDown, bloodPressureDown) || other.bloodPressureDown == bloodPressureDown) &&
|
||||
(identical(other.chestCircumference, chestCircumference) ||
|
||||
other.chestCircumference == chestCircumference) &&
|
||||
(identical(other.waistCircumference, waistCircumference) ||
|
||||
other.waistCircumference == waistCircumference) &&
|
||||
(identical(other.hipCircumference, hipCircumference) ||
|
||||
other.hipCircumference == hipCircumference) &&
|
||||
(identical(other.bloodPressureUp, bloodPressureUp) ||
|
||||
other.bloodPressureUp == bloodPressureUp) &&
|
||||
(identical(other.bloodPressureDown, bloodPressureDown) ||
|
||||
other.bloodPressureDown == bloodPressureDown) &&
|
||||
(identical(other.hasHypo, hasHypo) || other.hasHypo == hasHypo) &&
|
||||
(identical(other.hasHyper, hasHyper) || other.hasHyper == hasHyper) &&
|
||||
(identical(other.aboutAlergy, aboutAlergy) || other.aboutAlergy == aboutAlergy) &&
|
||||
(identical(other.aboutTakingPils, aboutTakingPils) || other.aboutTakingPils == aboutTakingPils) &&
|
||||
(identical(other.aboutSportHobbies, aboutSportHobbies) || other.aboutSportHobbies == aboutSportHobbies) &&
|
||||
(identical(other.favoriteFoods, favoriteFoods) || other.favoriteFoods == favoriteFoods) &&
|
||||
(identical(other.unfavoriteFoods, unfavoriteFoods) || other.unfavoriteFoods == unfavoriteFoods) &&
|
||||
(identical(other.additionalInfo, additionalInfo) || other.additionalInfo == additionalInfo) &&
|
||||
(identical(other.createdAt, createdAt) || other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) &&
|
||||
(identical(other.isMoodFillable, isMoodFillable) || other.isMoodFillable == isMoodFillable) &&
|
||||
(identical(other.isBedtimeFillable, isBedtimeFillable) || other.isBedtimeFillable == isBedtimeFillable) &&
|
||||
(identical(other.activityCoefficient, activityCoefficient) || other.activityCoefficient == activityCoefficient));
|
||||
(identical(other.hasHyper, hasHyper) ||
|
||||
other.hasHyper == hasHyper) &&
|
||||
(identical(other.aboutAlergy, aboutAlergy) ||
|
||||
other.aboutAlergy == aboutAlergy) &&
|
||||
(identical(other.aboutTakingPils, aboutTakingPils) ||
|
||||
other.aboutTakingPils == aboutTakingPils) &&
|
||||
(identical(other.aboutSportHobbies, aboutSportHobbies) ||
|
||||
other.aboutSportHobbies == aboutSportHobbies) &&
|
||||
(identical(other.favoriteFoods, favoriteFoods) ||
|
||||
other.favoriteFoods == favoriteFoods) &&
|
||||
(identical(other.unfavoriteFoods, unfavoriteFoods) ||
|
||||
other.unfavoriteFoods == unfavoriteFoods) &&
|
||||
(identical(other.additionalInfo, additionalInfo) ||
|
||||
other.additionalInfo == additionalInfo) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt) &&
|
||||
(identical(other.isMoodFillable, isMoodFillable) ||
|
||||
other.isMoodFillable == isMoodFillable) &&
|
||||
(identical(other.isBedtimeFillable, isBedtimeFillable) ||
|
||||
other.isBedtimeFillable == isBedtimeFillable) &&
|
||||
(identical(other.activityCoefficient, activityCoefficient) ||
|
||||
other.activityCoefficient == activityCoefficient));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -1028,7 +1032,8 @@ class _$ProfileDetailsModelImpl implements _ProfileDetailsModel {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ProfileDetailsModelImplCopyWith<_$ProfileDetailsModelImpl> get copyWith =>
|
||||
__$$ProfileDetailsModelImplCopyWithImpl<_$ProfileDetailsModelImpl>(this, _$identity);
|
||||
__$$ProfileDetailsModelImplCopyWithImpl<_$ProfileDetailsModelImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -1049,131 +1054,112 @@ abstract class _ProfileDetailsModel implements ProfileDetailsModel {
|
||||
@JsonKey(name: "lang") required final String lang,
|
||||
@JsonKey(name: "weight") required final double weight,
|
||||
@JsonKey(name: "height") required final int height,
|
||||
@JsonKey(name: "chest_circumference") required final int chestCircumference,
|
||||
@JsonKey(name: "waist_circumference") required final int waistCircumference,
|
||||
@JsonKey(name: "chest_circumference")
|
||||
required final int chestCircumference,
|
||||
@JsonKey(name: "waist_circumference")
|
||||
required final int waistCircumference,
|
||||
@JsonKey(name: "hip_circumference") required final int hipCircumference,
|
||||
@JsonKey(name: "blood_pressure_up") required final int bloodPressureUp,
|
||||
@JsonKey(name: "blood_pressure_down") required final int bloodPressureDown,
|
||||
@JsonKey(name: "blood_pressure_down")
|
||||
required final int bloodPressureDown,
|
||||
@JsonKey(name: "has_hypo") required final bool hasHypo,
|
||||
@JsonKey(name: "has_hyper") required final bool hasHyper,
|
||||
@JsonKey(name: "about_alergy") required final String aboutAlergy,
|
||||
@JsonKey(name: "about_taking_pils") required final String aboutTakingPils,
|
||||
@JsonKey(name: "about_sport_hobbies") required final String aboutSportHobbies,
|
||||
@JsonKey(name: "about_sport_hobbies")
|
||||
required final String aboutSportHobbies,
|
||||
@JsonKey(name: "favorite_foods") required final String favoriteFoods,
|
||||
@JsonKey(name: "unfavorite_foods") required final String unfavoriteFoods,
|
||||
@JsonKey(name: "additional_info") required final String additionalInfo,
|
||||
@JsonKey(name: "created_at") final DateTime? createdAt,
|
||||
@JsonKey(name: "updated_at") final DateTime? updatedAt,
|
||||
@JsonKey(name: "is_mood_fillable") required final bool isMoodFillable,
|
||||
@JsonKey(name: "is_bedtime_fillable") required final bool isBedtimeFillable,
|
||||
@JsonKey(name: "activity_coefficient") required final double activityCoefficient}) = _$ProfileDetailsModelImpl;
|
||||
@JsonKey(name: "is_bedtime_fillable")
|
||||
required final bool isBedtimeFillable,
|
||||
@JsonKey(name: "activity_coefficient")
|
||||
required final double activityCoefficient}) = _$ProfileDetailsModelImpl;
|
||||
|
||||
factory _ProfileDetailsModel.fromJson(Map<String, dynamic> json) = _$ProfileDetailsModelImpl.fromJson;
|
||||
factory _ProfileDetailsModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ProfileDetailsModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "first_name")
|
||||
String get firstName;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "last_name")
|
||||
String get lastName;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "birthdate")
|
||||
String get birthdate;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "gender")
|
||||
String get gender;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "country")
|
||||
String get country;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "city")
|
||||
String get city;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "lang")
|
||||
String get lang;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "weight")
|
||||
double get weight;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "height")
|
||||
int get height;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "chest_circumference")
|
||||
int get chestCircumference;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "waist_circumference")
|
||||
int get waistCircumference;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "hip_circumference")
|
||||
int get hipCircumference;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "blood_pressure_up")
|
||||
int get bloodPressureUp;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "blood_pressure_down")
|
||||
int get bloodPressureDown;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "has_hypo")
|
||||
bool get hasHypo;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "has_hyper")
|
||||
bool get hasHyper;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "about_alergy")
|
||||
String get aboutAlergy;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "about_taking_pils")
|
||||
String get aboutTakingPils;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "about_sport_hobbies")
|
||||
String get aboutSportHobbies;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "favorite_foods")
|
||||
String get favoriteFoods;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "unfavorite_foods")
|
||||
String get unfavoriteFoods;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "additional_info")
|
||||
String get additionalInfo;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime? get createdAt;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime? get updatedAt;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "is_mood_fillable")
|
||||
bool get isMoodFillable;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "is_bedtime_fillable")
|
||||
bool get isBedtimeFillable;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "activity_coefficient")
|
||||
double get activityCoefficient;
|
||||
@@ -1182,5 +1168,6 @@ abstract class _ProfileDetailsModel implements ProfileDetailsModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ProfileDetailsModelImplCopyWith<_$ProfileDetailsModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$ProfileDetailsModelImplCopyWith<_$ProfileDetailsModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,19 +6,27 @@ part of 'profile_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ProfileModelImpl _$$ProfileModelImplFromJson(Map<String, dynamic> json) => _$ProfileModelImpl(
|
||||
_$ProfileModelImpl _$$ProfileModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ProfileModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
name: json['name'] as String,
|
||||
email: json['email'] as String,
|
||||
emailVerifiedAt: json['email_verified_at'] == null ? null : DateTime.parse(json['email_verified_at'] as String),
|
||||
createdAt: json['created_at'] == null ? null : DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: json['updated_at'] == null ? null : DateTime.parse(json['updated_at'] as String),
|
||||
emailVerifiedAt: json['email_verified_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['email_verified_at'] as String),
|
||||
createdAt: json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String),
|
||||
isPublicProfile: json['is_public_profile'] as bool,
|
||||
slug: json['slug'] as String,
|
||||
profilePhotoUrl: json['profile_photo_url'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ProfileModelImplToJson(_$ProfileModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$ProfileModelImplToJson(_$ProfileModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'email': instance.email,
|
||||
@@ -30,7 +38,9 @@ Map<String, dynamic> _$$ProfileModelImplToJson(_$ProfileModelImpl instance) => <
|
||||
'profile_photo_url': instance.profilePhotoUrl,
|
||||
};
|
||||
|
||||
_$ProfileDetailsModelImpl _$$ProfileDetailsModelImplFromJson(Map<String, dynamic> json) => _$ProfileDetailsModelImpl(
|
||||
_$ProfileDetailsModelImpl _$$ProfileDetailsModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ProfileDetailsModelImpl(
|
||||
firstName: json['first_name'] as String,
|
||||
lastName: json['last_name'] as String,
|
||||
birthdate: json['birthdate'] as String,
|
||||
@@ -53,14 +63,20 @@ _$ProfileDetailsModelImpl _$$ProfileDetailsModelImplFromJson(Map<String, dynamic
|
||||
favoriteFoods: json['favorite_foods'] as String,
|
||||
unfavoriteFoods: json['unfavorite_foods'] as String,
|
||||
additionalInfo: json['additional_info'] as String,
|
||||
createdAt: json['created_at'] == null ? null : DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: json['updated_at'] == null ? null : DateTime.parse(json['updated_at'] as String),
|
||||
createdAt: json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String),
|
||||
isMoodFillable: json['is_mood_fillable'] as bool,
|
||||
isBedtimeFillable: json['is_bedtime_fillable'] as bool,
|
||||
activityCoefficient: (json['activity_coefficient'] as num).toDouble(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ProfileDetailsModelImplToJson(_$ProfileDetailsModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$ProfileDetailsModelImplToJson(
|
||||
_$ProfileDetailsModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'first_name': instance.firstName,
|
||||
'last_name': instance.lastName,
|
||||
'birthdate': instance.birthdate,
|
||||
|
||||
18
lib/features/profile/models/weight_model.dart
Normal file
18
lib/features/profile/models/weight_model.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'weight_model.freezed.dart';
|
||||
part 'weight_model.g.dart';
|
||||
|
||||
@freezed
|
||||
class WeightModel with _$WeightModel {
|
||||
const factory WeightModel({
|
||||
@JsonKey(name: "id") required int id,
|
||||
@JsonKey(name: "user_id") required int userId,
|
||||
@JsonKey(name: "weight") required int weight,
|
||||
@JsonKey(name: "created_at") required DateTime createdAt,
|
||||
@JsonKey(name: "updated_at") required DateTime updatedAt,
|
||||
@JsonKey(name: "bmi") required double bmi,
|
||||
}) = _WeightModel;
|
||||
|
||||
factory WeightModel.fromJson(Map<String, dynamic> json) => _$WeightModelFromJson(json);
|
||||
}
|
||||
289
lib/features/profile/models/weight_model.freezed.dart
Normal file
289
lib/features/profile/models/weight_model.freezed.dart
Normal file
@@ -0,0 +1,289 @@
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// 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
|
||||
|
||||
part of 'weight_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
T _$identity<T>(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');
|
||||
|
||||
WeightModel _$WeightModelFromJson(Map<String, dynamic> json) {
|
||||
return _WeightModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$WeightModel {
|
||||
@JsonKey(name: "id")
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "user_id")
|
||||
int get userId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "weight")
|
||||
int get weight => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "bmi")
|
||||
double get bmi => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this WeightModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of WeightModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$WeightModelCopyWith<WeightModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $WeightModelCopyWith<$Res> {
|
||||
factory $WeightModelCopyWith(
|
||||
WeightModel value, $Res Function(WeightModel) then) =
|
||||
_$WeightModelCopyWithImpl<$Res, WeightModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "id") int id,
|
||||
@JsonKey(name: "user_id") int userId,
|
||||
@JsonKey(name: "weight") int weight,
|
||||
@JsonKey(name: "created_at") DateTime createdAt,
|
||||
@JsonKey(name: "updated_at") DateTime updatedAt,
|
||||
@JsonKey(name: "bmi") double bmi});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$WeightModelCopyWithImpl<$Res, $Val extends WeightModel>
|
||||
implements $WeightModelCopyWith<$Res> {
|
||||
_$WeightModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of WeightModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? userId = null,
|
||||
Object? weight = null,
|
||||
Object? createdAt = null,
|
||||
Object? updatedAt = null,
|
||||
Object? bmi = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
userId: null == userId
|
||||
? _value.userId
|
||||
: userId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
weight: null == weight
|
||||
? _value.weight
|
||||
: weight // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
createdAt: null == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
updatedAt: null == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
bmi: null == bmi
|
||||
? _value.bmi
|
||||
: bmi // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$WeightModelImplCopyWith<$Res>
|
||||
implements $WeightModelCopyWith<$Res> {
|
||||
factory _$$WeightModelImplCopyWith(
|
||||
_$WeightModelImpl value, $Res Function(_$WeightModelImpl) then) =
|
||||
__$$WeightModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "id") int id,
|
||||
@JsonKey(name: "user_id") int userId,
|
||||
@JsonKey(name: "weight") int weight,
|
||||
@JsonKey(name: "created_at") DateTime createdAt,
|
||||
@JsonKey(name: "updated_at") DateTime updatedAt,
|
||||
@JsonKey(name: "bmi") double bmi});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$WeightModelImplCopyWithImpl<$Res>
|
||||
extends _$WeightModelCopyWithImpl<$Res, _$WeightModelImpl>
|
||||
implements _$$WeightModelImplCopyWith<$Res> {
|
||||
__$$WeightModelImplCopyWithImpl(
|
||||
_$WeightModelImpl _value, $Res Function(_$WeightModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of WeightModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? userId = null,
|
||||
Object? weight = null,
|
||||
Object? createdAt = null,
|
||||
Object? updatedAt = null,
|
||||
Object? bmi = null,
|
||||
}) {
|
||||
return _then(_$WeightModelImpl(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
userId: null == userId
|
||||
? _value.userId
|
||||
: userId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
weight: null == weight
|
||||
? _value.weight
|
||||
: weight // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
createdAt: null == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
updatedAt: null == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
bmi: null == bmi
|
||||
? _value.bmi
|
||||
: bmi // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$WeightModelImpl implements _WeightModel {
|
||||
const _$WeightModelImpl(
|
||||
{@JsonKey(name: "id") required this.id,
|
||||
@JsonKey(name: "user_id") required this.userId,
|
||||
@JsonKey(name: "weight") required this.weight,
|
||||
@JsonKey(name: "created_at") required this.createdAt,
|
||||
@JsonKey(name: "updated_at") required this.updatedAt,
|
||||
@JsonKey(name: "bmi") required this.bmi});
|
||||
|
||||
factory _$WeightModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$WeightModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
final int id;
|
||||
@override
|
||||
@JsonKey(name: "user_id")
|
||||
final int userId;
|
||||
@override
|
||||
@JsonKey(name: "weight")
|
||||
final int weight;
|
||||
@override
|
||||
@JsonKey(name: "created_at")
|
||||
final DateTime createdAt;
|
||||
@override
|
||||
@JsonKey(name: "updated_at")
|
||||
final DateTime updatedAt;
|
||||
@override
|
||||
@JsonKey(name: "bmi")
|
||||
final double bmi;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'WeightModel(id: $id, userId: $userId, weight: $weight, createdAt: $createdAt, updatedAt: $updatedAt, bmi: $bmi)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$WeightModelImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.userId, userId) || other.userId == userId) &&
|
||||
(identical(other.weight, weight) || other.weight == weight) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt) &&
|
||||
(identical(other.bmi, bmi) || other.bmi == bmi));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, id, userId, weight, createdAt, updatedAt, bmi);
|
||||
|
||||
/// Create a copy of WeightModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$WeightModelImplCopyWith<_$WeightModelImpl> get copyWith =>
|
||||
__$$WeightModelImplCopyWithImpl<_$WeightModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$WeightModelImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _WeightModel implements WeightModel {
|
||||
const factory _WeightModel(
|
||||
{@JsonKey(name: "id") required final int id,
|
||||
@JsonKey(name: "user_id") required final int userId,
|
||||
@JsonKey(name: "weight") required final int weight,
|
||||
@JsonKey(name: "created_at") required final DateTime createdAt,
|
||||
@JsonKey(name: "updated_at") required final DateTime updatedAt,
|
||||
@JsonKey(name: "bmi") required final double bmi}) = _$WeightModelImpl;
|
||||
|
||||
factory _WeightModel.fromJson(Map<String, dynamic> json) =
|
||||
_$WeightModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
int get id;
|
||||
@override
|
||||
@JsonKey(name: "user_id")
|
||||
int get userId;
|
||||
@override
|
||||
@JsonKey(name: "weight")
|
||||
int get weight;
|
||||
@override
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt;
|
||||
@override
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt;
|
||||
@override
|
||||
@JsonKey(name: "bmi")
|
||||
double get bmi;
|
||||
|
||||
/// Create a copy of WeightModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$WeightModelImplCopyWith<_$WeightModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
27
lib/features/profile/models/weight_model.g.dart
Normal file
27
lib/features/profile/models/weight_model.g.dart
Normal file
@@ -0,0 +1,27 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'weight_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$WeightModelImpl _$$WeightModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$WeightModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
userId: (json['user_id'] as num).toInt(),
|
||||
weight: (json['weight'] as num).toInt(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
bmi: (json['bmi'] as num).toDouble(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$WeightModelImplToJson(_$WeightModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'user_id': instance.userId,
|
||||
'weight': instance.weight,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'bmi': instance.bmi,
|
||||
};
|
||||
@@ -15,6 +15,8 @@ class ProfileCubit extends Cubit<ProfileState> {
|
||||
profile: await profileRepository.getProfileBySlug(slug),
|
||||
profileDetails: await profileRepository.getMyProfileDetails(),
|
||||
blogPosts: await profileRepository.getBlogPostsByAuthorSlug(slug: slug),
|
||||
weightPoints: await profileRepository.getWeight(period: '1', slug: slug),
|
||||
circumferencePoints: await profileRepository.getCircumferences(period: '1', slug: slug),
|
||||
));
|
||||
} catch (e) {
|
||||
emit(ProfileState.error(errorMessage: e.toString()));
|
||||
@@ -29,6 +31,8 @@ class ProfileCubit extends Cubit<ProfileState> {
|
||||
profile: profile,
|
||||
profileDetails: await profileRepository.getMyProfileDetails(),
|
||||
blogPosts: await profileRepository.getBlogPostsByAuthorSlug(slug: profile.slug),
|
||||
weightPoints: await profileRepository.getWeight(period: '1'),
|
||||
circumferencePoints: await profileRepository.getCircumferences(period: '1'),
|
||||
));
|
||||
} catch (e) {
|
||||
emit(ProfileState.error(errorMessage: e.toString()));
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import 'package:eatvio_app/features/feed/models/feed_blog_post_model.dart';
|
||||
import 'package:eatvio_app/features/profile/models/circumference_model.dart';
|
||||
import 'package:eatvio_app/features/profile/models/profile_model.dart';
|
||||
import 'package:eatvio_app/features/profile/models/weight_model.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'profile_state.freezed.dart';
|
||||
@@ -14,6 +16,8 @@ abstract class ProfileState with _$ProfileState {
|
||||
required ProfileModel profile,
|
||||
required ProfileDetailsModel profileDetails,
|
||||
required List<FeedBlogPostModel> blogPosts,
|
||||
required List<WeightModel> weightPoints,
|
||||
required List<CircumferenceModel> circumferencePoints,
|
||||
}) = ProfileStateLoaded;
|
||||
|
||||
const factory ProfileState.error({
|
||||
|
||||
@@ -20,16 +20,27 @@ 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,
|
||||
List<WeightModel> weightPoints,
|
||||
List<CircumferenceModel> circumferencePoints)
|
||||
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,
|
||||
List<WeightModel> weightPoints,
|
||||
List<CircumferenceModel> circumferencePoints)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@@ -37,7 +48,13 @@ 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,
|
||||
List<WeightModel> weightPoints,
|
||||
List<CircumferenceModel> circumferencePoints)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
@@ -71,16 +88,18 @@ 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;
|
||||
|
||||
@@ -90,12 +109,18 @@ class _$ProfileStateCopyWithImpl<$Res, $Val extends ProfileState> implements $Pr
|
||||
|
||||
/// @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.
|
||||
@@ -113,7 +138,8 @@ 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
|
||||
@@ -124,7 +150,13 @@ 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,
|
||||
List<WeightModel> weightPoints,
|
||||
List<CircumferenceModel> circumferencePoints)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return $default();
|
||||
@@ -135,7 +167,13 @@ 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,
|
||||
List<WeightModel> weightPoints,
|
||||
List<CircumferenceModel> circumferencePoints)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return $default?.call();
|
||||
@@ -146,7 +184,13 @@ 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,
|
||||
List<WeightModel> weightPoints,
|
||||
List<CircumferenceModel> circumferencePoints)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -200,14 +244,18 @@ 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.
|
||||
@@ -225,7 +273,9 @@ 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
|
||||
@@ -236,7 +286,13 @@ 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,
|
||||
List<WeightModel> weightPoints,
|
||||
List<CircumferenceModel> circumferencePoints)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loading();
|
||||
@@ -247,7 +303,13 @@ 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,
|
||||
List<WeightModel> weightPoints,
|
||||
List<CircumferenceModel> circumferencePoints)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loading?.call();
|
||||
@@ -258,7 +320,13 @@ 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,
|
||||
List<WeightModel> weightPoints,
|
||||
List<CircumferenceModel> circumferencePoints)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -312,21 +380,28 @@ 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,
|
||||
List<WeightModel> weightPoints,
|
||||
List<CircumferenceModel> circumferencePoints});
|
||||
|
||||
$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.
|
||||
@@ -336,6 +411,8 @@ class __$$ProfileStateLoadedImplCopyWithImpl<$Res> extends _$ProfileStateCopyWit
|
||||
Object? profile = null,
|
||||
Object? profileDetails = null,
|
||||
Object? blogPosts = null,
|
||||
Object? weightPoints = null,
|
||||
Object? circumferencePoints = null,
|
||||
}) {
|
||||
return _then(_$ProfileStateLoadedImpl(
|
||||
profile: null == profile
|
||||
@@ -350,6 +427,14 @@ class __$$ProfileStateLoadedImplCopyWithImpl<$Res> extends _$ProfileStateCopyWit
|
||||
? _value._blogPosts
|
||||
: blogPosts // ignore: cast_nullable_to_non_nullable
|
||||
as List<FeedBlogPostModel>,
|
||||
weightPoints: null == weightPoints
|
||||
? _value._weightPoints
|
||||
: weightPoints // ignore: cast_nullable_to_non_nullable
|
||||
as List<WeightModel>,
|
||||
circumferencePoints: null == circumferencePoints
|
||||
? _value._circumferencePoints
|
||||
: circumferencePoints // ignore: cast_nullable_to_non_nullable
|
||||
as List<CircumferenceModel>,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -377,15 +462,21 @@ class __$$ProfileStateLoadedImplCopyWithImpl<$Res> extends _$ProfileStateCopyWit
|
||||
/// @nodoc
|
||||
|
||||
class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
|
||||
const _$ProfileStateLoadedImpl({required this.profile, required this.profileDetails, required final List<FeedBlogPostModel> blogPosts})
|
||||
: _blogPosts = blogPosts;
|
||||
const _$ProfileStateLoadedImpl(
|
||||
{required this.profile,
|
||||
required this.profileDetails,
|
||||
required final List<FeedBlogPostModel> blogPosts,
|
||||
required final List<WeightModel> weightPoints,
|
||||
required final List<CircumferenceModel> circumferencePoints})
|
||||
: _blogPosts = blogPosts,
|
||||
_weightPoints = weightPoints,
|
||||
_circumferencePoints = circumferencePoints;
|
||||
|
||||
@override
|
||||
final ProfileModel profile;
|
||||
@override
|
||||
final ProfileDetailsModel profileDetails;
|
||||
final List<FeedBlogPostModel> _blogPosts;
|
||||
|
||||
@override
|
||||
List<FeedBlogPostModel> get blogPosts {
|
||||
if (_blogPosts is EqualUnmodifiableListView) return _blogPosts;
|
||||
@@ -393,9 +484,26 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
|
||||
return EqualUnmodifiableListView(_blogPosts);
|
||||
}
|
||||
|
||||
final List<WeightModel> _weightPoints;
|
||||
@override
|
||||
List<WeightModel> get weightPoints {
|
||||
if (_weightPoints is EqualUnmodifiableListView) return _weightPoints;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_weightPoints);
|
||||
}
|
||||
|
||||
final List<CircumferenceModel> _circumferencePoints;
|
||||
@override
|
||||
List<CircumferenceModel> get circumferencePoints {
|
||||
if (_circumferencePoints is EqualUnmodifiableListView)
|
||||
return _circumferencePoints;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_circumferencePoints);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ProfileState.loaded(profile: $profile, profileDetails: $profileDetails, blogPosts: $blogPosts)';
|
||||
return 'ProfileState.loaded(profile: $profile, profileDetails: $profileDetails, blogPosts: $blogPosts, weightPoints: $weightPoints, circumferencePoints: $circumferencePoints)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -404,12 +512,24 @@ 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) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._weightPoints, _weightPoints) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._circumferencePoints, _circumferencePoints));
|
||||
}
|
||||
|
||||
@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),
|
||||
const DeepCollectionEquality().hash(_weightPoints),
|
||||
const DeepCollectionEquality().hash(_circumferencePoints));
|
||||
|
||||
/// Create a copy of ProfileState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -417,17 +537,25 @@ 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,
|
||||
List<WeightModel> weightPoints,
|
||||
List<CircumferenceModel> circumferencePoints)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loaded(profile, profileDetails, blogPosts);
|
||||
return loaded(
|
||||
profile, profileDetails, blogPosts, weightPoints, circumferencePoints);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -435,10 +563,17 @@ 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,
|
||||
List<WeightModel> weightPoints,
|
||||
List<CircumferenceModel> circumferencePoints)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loaded?.call(profile, profileDetails, blogPosts);
|
||||
return loaded?.call(
|
||||
profile, profileDetails, blogPosts, weightPoints, circumferencePoints);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -446,12 +581,19 @@ 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,
|
||||
List<WeightModel> weightPoints,
|
||||
List<CircumferenceModel> circumferencePoints)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (loaded != null) {
|
||||
return loaded(profile, profileDetails, blogPosts);
|
||||
return loaded(profile, profileDetails, blogPosts, weightPoints,
|
||||
circumferencePoints);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
@@ -496,35 +638,42 @@ 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,
|
||||
required final List<WeightModel> weightPoints,
|
||||
required final List<CircumferenceModel> circumferencePoints}) =
|
||||
_$ProfileStateLoadedImpl;
|
||||
|
||||
ProfileModel get profile;
|
||||
|
||||
ProfileDetailsModel get profileDetails;
|
||||
|
||||
List<FeedBlogPostModel> get blogPosts;
|
||||
List<WeightModel> get weightPoints;
|
||||
List<CircumferenceModel> get circumferencePoints;
|
||||
|
||||
/// 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.
|
||||
@@ -560,7 +709,8 @@ 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
|
||||
@@ -571,14 +721,22 @@ 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,
|
||||
List<WeightModel> weightPoints,
|
||||
List<CircumferenceModel> circumferencePoints)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return error(errorMessage);
|
||||
@@ -589,7 +747,13 @@ 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,
|
||||
List<WeightModel> weightPoints,
|
||||
List<CircumferenceModel> circumferencePoints)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return error?.call(errorMessage);
|
||||
@@ -600,7 +764,13 @@ 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,
|
||||
List<WeightModel> weightPoints,
|
||||
List<CircumferenceModel> circumferencePoints)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -649,12 +819,14 @@ 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;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
import 'package:eatvio_app/core/const.dart';
|
||||
import 'package:eatvio_app/features/feed/models/diets_pagination_model.dart';
|
||||
import 'package:eatvio_app/features/feed/presentation/widgets/blog_post_widget.dart';
|
||||
import 'package:eatvio_app/features/profile/models/circumference_model.dart';
|
||||
import 'package:eatvio_app/features/profile/models/weight_model.dart';
|
||||
import 'package:eatvio_app/features/profile/presentation/bloc/profile_cubit/profile_cubit.dart';
|
||||
import 'package:eatvio_app/features/profile/presentation/bloc/profile_cubit/profile_state.dart';
|
||||
import 'package:eatvio_app/features/profile/presentation/widgets/circumference_chart_widget.dart';
|
||||
import 'package:eatvio_app/features/profile/presentation/widgets/imt_chart_widget.dart';
|
||||
import 'package:eatvio_app/features/profile/presentation/widgets/weight_chart_widget.dart';
|
||||
import 'package:eatvio_app/locator_service.dart';
|
||||
import 'package:eatvio_app/theme/theme_helper.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -21,8 +26,8 @@ class ProfileScreen extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _ProfileScreenState extends State<ProfileScreen> {
|
||||
// List<Circumference> chartData = [];
|
||||
// List<ChartPointModel> chartPoints = [];
|
||||
List<CircumferenceModel> circumferencePoints = [];
|
||||
List<WeightModel> weightPoints = [];
|
||||
final List<String> chipsLabelList = ['Вес', 'Замеры', 'ИМТ'];
|
||||
final List<String> chipsIntervalLabelList = ['1М', '3М', '6М', '1Г', 'ВСЁ ВРЕМЯ'];
|
||||
int _selectedChipIndex = 0;
|
||||
@@ -40,8 +45,8 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
child: BlocBuilder<ProfileCubit, ProfileState>(
|
||||
builder: (BuildContext context, ProfileState state) {
|
||||
if (state is ProfileStateLoaded) {
|
||||
// chartData = state.profile.circumferences;
|
||||
// chartPoints = state.profile.chartPoints;
|
||||
circumferencePoints = state.circumferencePoints;
|
||||
weightPoints = state.weightPoints;
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.grey.shade200,
|
||||
appBar: widget.author == null ? AppBar(toolbarHeight: 0) : AppBar(),
|
||||
@@ -209,25 +214,27 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
],
|
||||
),
|
||||
),
|
||||
// Builder(
|
||||
// builder: (context) {
|
||||
// switch (_selectedChipIndex) {
|
||||
// case 0:
|
||||
// return WeightChartWidget(
|
||||
// chartPoints: chartPoints,
|
||||
// profileCubit: context.read<ProfileCubit>(),
|
||||
// );
|
||||
// case 1:
|
||||
// return CircumferenceChartWidget(
|
||||
// chartData: chartData,
|
||||
// profileCubit: context.read<ProfileCubit>(),
|
||||
// );
|
||||
// case 2:
|
||||
// return ImtChartWidget(chartPoints: chartPoints);
|
||||
// }
|
||||
// return SizedBox.shrink();
|
||||
// },
|
||||
// ),
|
||||
Builder(
|
||||
builder: (context) {
|
||||
switch (_selectedChipIndex) {
|
||||
case 0:
|
||||
return WeightChartWidget(
|
||||
weightPoints: weightPoints,
|
||||
profileCubit: context.read<ProfileCubit>(),
|
||||
);
|
||||
case 1:
|
||||
return CircumferenceChartWidget(
|
||||
circumferencePoints: circumferencePoints,
|
||||
profileCubit: context.read<ProfileCubit>(),
|
||||
);
|
||||
case 2:
|
||||
return ImtChartWidget(
|
||||
weightPoints: weightPoints,
|
||||
);
|
||||
}
|
||||
return SizedBox.shrink();
|
||||
},
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
Row(
|
||||
children: [
|
||||
|
||||
@@ -1,374 +1,374 @@
|
||||
//
|
||||
// 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';
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:intl/intl.dart';
|
||||
// import 'package:syncfusion_flutter_charts/charts.dart';
|
||||
//
|
||||
// class CircumferenceChartWidget extends StatefulWidget {
|
||||
// final List<Circumference> chartData;
|
||||
// final ProfileCubit profileCubit;
|
||||
//
|
||||
// const CircumferenceChartWidget({
|
||||
// super.key,
|
||||
// required this.chartData,
|
||||
// required this.profileCubit,
|
||||
// });
|
||||
//
|
||||
// @override
|
||||
// State<CircumferenceChartWidget> createState() => _CircumferenceChartWidgetState();
|
||||
// }
|
||||
//
|
||||
// class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
|
||||
// late FixedExtentScrollController chestController;
|
||||
// late FixedExtentScrollController waistController;
|
||||
// late FixedExtentScrollController hipController;
|
||||
// late int chest;
|
||||
// late int waist;
|
||||
// late int hip;
|
||||
//
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Column(
|
||||
// children: [
|
||||
// if (widget.chartData.isNotEmpty)
|
||||
// Padding(
|
||||
// padding: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
// child: Row(
|
||||
// children: [
|
||||
// Text(
|
||||
// '${widget.chartData.last.chestCircumference}',
|
||||
// style: TextStyle(
|
||||
// color: Colors.black,
|
||||
// fontSize: 40,
|
||||
// fontWeight: FontWeight.w500,
|
||||
// ),
|
||||
// ),
|
||||
// if (widget.chartData.length == 1)
|
||||
// Container(
|
||||
// margin: EdgeInsets.symmetric(horizontal: 12),
|
||||
// width: 8,
|
||||
// height: 8,
|
||||
// decoration: BoxDecoration(
|
||||
// shape: BoxShape.circle,
|
||||
// color: Colors.black12,
|
||||
// ),
|
||||
// ),
|
||||
// if (widget.chartData.length > 1)
|
||||
// widget.chartData.last.chestCircumference > widget.chartData[widget.chartData.length - 2].chestCircumference
|
||||
// ? Icon(
|
||||
// Icons.arrow_drop_up,
|
||||
// size: 40,
|
||||
// color: Colors.grey,
|
||||
// )
|
||||
// : Icon(
|
||||
// Icons.arrow_drop_down,
|
||||
// size: 40,
|
||||
// color: Colors.grey,
|
||||
// ),
|
||||
// Text(
|
||||
// '${widget.chartData.last.waistCircumference}',
|
||||
// style: TextStyle(
|
||||
// color: Colors.black,
|
||||
// fontSize: 40,
|
||||
// fontWeight: FontWeight.w500,
|
||||
// ),
|
||||
// ),
|
||||
// if (widget.chartData.length == 1)
|
||||
// Container(
|
||||
// margin: EdgeInsets.symmetric(horizontal: 12),
|
||||
// width: 8,
|
||||
// height: 8,
|
||||
// decoration: BoxDecoration(
|
||||
// shape: BoxShape.circle,
|
||||
// color: Colors.black12,
|
||||
// ),
|
||||
// ),
|
||||
// if (widget.chartData.length > 1)
|
||||
// widget.chartData.last.waistCircumference > widget.chartData[widget.chartData.length - 2].waistCircumference
|
||||
// ? Icon(
|
||||
// Icons.arrow_drop_up,
|
||||
// size: 40,
|
||||
// color: Colors.grey,
|
||||
// )
|
||||
// : Icon(
|
||||
// Icons.arrow_drop_down,
|
||||
// size: 40,
|
||||
// color: Colors.grey,
|
||||
// ),
|
||||
// Text(
|
||||
// '${widget.chartData.last.hipCircumference}',
|
||||
// style: TextStyle(
|
||||
// color: Colors.black,
|
||||
// fontSize: 40,
|
||||
// fontWeight: FontWeight.w500,
|
||||
// ),
|
||||
// ),
|
||||
// if (widget.chartData.length == 1)
|
||||
// Container(
|
||||
// margin: EdgeInsets.symmetric(horizontal: 12),
|
||||
// width: 8,
|
||||
// height: 8,
|
||||
// decoration: BoxDecoration(
|
||||
// shape: BoxShape.circle,
|
||||
// color: Colors.black12,
|
||||
// ),
|
||||
// ),
|
||||
// if (widget.chartData.length > 1)
|
||||
// widget.chartData.last.hipCircumference > widget.chartData[widget.chartData.length - 2].hipCircumference
|
||||
// ? Icon(
|
||||
// Icons.arrow_drop_up,
|
||||
// size: 40,
|
||||
// color: Colors.grey,
|
||||
// )
|
||||
// : Icon(
|
||||
// Icons.arrow_drop_down,
|
||||
// size: 40,
|
||||
// color: Colors.grey,
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// Stack(
|
||||
// alignment: Alignment.bottomRight,
|
||||
// children: [
|
||||
// SfCartesianChart(
|
||||
// margin: EdgeInsets.symmetric(horizontal: 8),
|
||||
// enableAxisAnimation: true,
|
||||
// plotAreaBorderWidth: 0,
|
||||
// trackballBehavior: TrackballBehavior(
|
||||
// enable: true,
|
||||
// activationMode: ActivationMode.singleTap,
|
||||
// tooltipDisplayMode: TrackballDisplayMode.groupAllPoints,
|
||||
// tooltipSettings: InteractiveTooltip(),
|
||||
// lineType: TrackballLineType.vertical,
|
||||
// ),
|
||||
// primaryXAxis: DateTimeCategoryAxis(
|
||||
// tickPosition: TickPosition.inside,
|
||||
// majorTickLines: MajorTickLines(
|
||||
// size: 0,
|
||||
// ),
|
||||
// edgeLabelPlacement: EdgeLabelPlacement.shift,
|
||||
// dateFormat: DateFormat.MMMd('ru'),
|
||||
// labelStyle: TextStyle(
|
||||
// color: Colors.grey,
|
||||
// ),
|
||||
// majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey.withOpacity(0.3)),
|
||||
// axisLine: AxisLine(
|
||||
// color: Colors.grey.withOpacity(0.3),
|
||||
// width: 0.4,
|
||||
// ),
|
||||
// ),
|
||||
// primaryYAxis: NumericAxis(
|
||||
// isVisible: false,
|
||||
// labelFormat: '{value} см',
|
||||
// axisLine: AxisLine(
|
||||
// width: 1,
|
||||
// ),
|
||||
// majorTickLines: MajorTickLines(size: 0),
|
||||
// ),
|
||||
// series: _getSplineSeries(),
|
||||
// tooltipBehavior: TooltipBehavior(enable: true),
|
||||
// ),
|
||||
// FloatingActionButton.small(
|
||||
// heroTag: 'addCircumference',
|
||||
// onPressed: () {
|
||||
// if (widget.chartData.isNotEmpty) {
|
||||
// chest = widget.chartData.last.chestCircumference;
|
||||
// waist = widget.chartData.last.waistCircumference;
|
||||
// hip = widget.chartData.last.hipCircumference;
|
||||
// chestController = FixedExtentScrollController(initialItem: chest - 20);
|
||||
// waistController = FixedExtentScrollController(initialItem: waist - 20);
|
||||
// hipController = FixedExtentScrollController(initialItem: hip - 20);
|
||||
// } else {
|
||||
// chestController = FixedExtentScrollController();
|
||||
// waistController = FixedExtentScrollController();
|
||||
// hipController = FixedExtentScrollController();
|
||||
// }
|
||||
// showModalBottomSheet(
|
||||
// useRootNavigator: true,
|
||||
// context: context,
|
||||
// builder: (context) {
|
||||
// return Column(
|
||||
// children: [
|
||||
// Expanded(
|
||||
// child: Row(
|
||||
// children: [
|
||||
// Expanded(
|
||||
// child: CupertinoPicker(
|
||||
// magnification: 1.22,
|
||||
// squeeze: 1.2,
|
||||
// useMagnifier: true,
|
||||
// scrollController: chestController,
|
||||
// itemExtent: 24,
|
||||
// onSelectedItemChanged: (int value) {
|
||||
// chest = value;
|
||||
// },
|
||||
// children: [
|
||||
// for (int i = 20; i < 200; i++) Text('$i'),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// Expanded(
|
||||
// child: CupertinoPicker(
|
||||
// magnification: 1.22,
|
||||
// squeeze: 1.2,
|
||||
// useMagnifier: true,
|
||||
// scrollController: waistController,
|
||||
// itemExtent: 24,
|
||||
// onSelectedItemChanged: (int value) {
|
||||
// waist = value;
|
||||
// },
|
||||
// children: [
|
||||
// for (int i = 20; i < 200; i++) Text('$i'),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// Expanded(
|
||||
// child: CupertinoPicker(
|
||||
// magnification: 1.22,
|
||||
// squeeze: 1.2,
|
||||
// useMagnifier: true,
|
||||
// scrollController: hipController,
|
||||
// itemExtent: 24,
|
||||
// onSelectedItemChanged: (int value) {
|
||||
// hip = value;
|
||||
// },
|
||||
// children: [
|
||||
// for (int i = 20; i < 200; i++) Text('$i'),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// InkWell(
|
||||
// onTap: () {
|
||||
// widget.profileCubit.addCircumference(
|
||||
// chestCircumference: chest,
|
||||
// waistCircumference: waist,
|
||||
// hipCircumference: hip,
|
||||
// );
|
||||
// Navigator.of(context).pop();
|
||||
// },
|
||||
// borderRadius: BorderRadius.circular(16),
|
||||
// child: Ink(
|
||||
// width: MediaQuery.of(context).size.width - 32,
|
||||
// padding: EdgeInsets.all(16),
|
||||
// decoration: BoxDecoration(
|
||||
// color: appTheme.blueA400,
|
||||
// borderRadius: BorderRadius.circular(16),
|
||||
// ),
|
||||
// child: Center(
|
||||
// child: Text(
|
||||
// 'Сохранить',
|
||||
// style: TextStyle(
|
||||
// color: Colors.white,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
// },
|
||||
// );
|
||||
// },
|
||||
// backgroundColor: Colors.red,
|
||||
// shape: CircleBorder(),
|
||||
// child: Icon(
|
||||
// Icons.add,
|
||||
// color: Colors.white,
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// List<CartesianSeries<Circumference, DateTime>> _getSplineSeries() {
|
||||
// final Color seriesColor1 = Colors.red;
|
||||
// final Color seriesColor2 = appTheme.blueA400;
|
||||
// final Color seriesColor3 = Colors.green;
|
||||
//
|
||||
// return <CartesianSeries<Circumference, DateTime>>[
|
||||
// SplineAreaSeries<Circumference, DateTime>(
|
||||
// markerSettings: MarkerSettings(
|
||||
// isVisible: true,
|
||||
// color: seriesColor1,
|
||||
// height: 8,
|
||||
// width: 8,
|
||||
// ),
|
||||
// dataLabelSettings: DataLabelSettings(
|
||||
// labelAlignment: ChartDataLabelAlignment.top,
|
||||
// isVisible: true,
|
||||
// ),
|
||||
// dataSource: widget.chartData,
|
||||
// borderColor: seriesColor1,
|
||||
// gradient: LinearGradient(
|
||||
// colors: [
|
||||
// seriesColor1.withOpacity(0.14),
|
||||
// Colors.transparent,
|
||||
// ],
|
||||
// begin: Alignment.topCenter,
|
||||
// end: Alignment(0, 0.6),
|
||||
// ),
|
||||
// name: 'Грудь',
|
||||
// xValueMapper: (Circumference value, int index) => value.createdAt,
|
||||
// yValueMapper: (Circumference value, int index) => value.chestCircumference,
|
||||
// ),
|
||||
// SplineAreaSeries<Circumference, DateTime>(
|
||||
// markerSettings: MarkerSettings(
|
||||
// isVisible: true,
|
||||
// color: seriesColor2,
|
||||
// height: 8,
|
||||
// width: 8,
|
||||
// ),
|
||||
// dataLabelSettings: DataLabelSettings(
|
||||
// labelAlignment: ChartDataLabelAlignment.top,
|
||||
// isVisible: true,
|
||||
// ),
|
||||
// dataSource: widget.chartData,
|
||||
// borderColor: seriesColor2,
|
||||
// gradient: LinearGradient(
|
||||
// colors: [
|
||||
// seriesColor2.withOpacity(0.14),
|
||||
// Colors.transparent,
|
||||
// ],
|
||||
// begin: Alignment.topCenter,
|
||||
// end: Alignment(0, 0.6),
|
||||
// ),
|
||||
// name: 'Талия',
|
||||
// xValueMapper: (Circumference value, int index) => value.createdAt,
|
||||
// yValueMapper: (Circumference value, int index) => value.waistCircumference,
|
||||
// ),
|
||||
// SplineAreaSeries<Circumference, DateTime>(
|
||||
// markerSettings: MarkerSettings(
|
||||
// isVisible: true,
|
||||
// color: seriesColor3,
|
||||
// height: 8,
|
||||
// width: 8,
|
||||
// ),
|
||||
// dataLabelSettings: DataLabelSettings(
|
||||
// labelAlignment: ChartDataLabelAlignment.top,
|
||||
// isVisible: true,
|
||||
// ),
|
||||
// dataSource: widget.chartData,
|
||||
// borderColor: seriesColor3,
|
||||
// gradient: LinearGradient(
|
||||
// colors: [
|
||||
// seriesColor3.withOpacity(0.14),
|
||||
// Colors.transparent,
|
||||
// ],
|
||||
// begin: Alignment.topCenter,
|
||||
// end: Alignment(0, 0.6),
|
||||
// ),
|
||||
// name: 'Бёдра',
|
||||
// xValueMapper: (Circumference value, int index) => value.createdAt,
|
||||
// yValueMapper: (Circumference value, int index) => value.hipCircumference,
|
||||
// ),
|
||||
// ];
|
||||
// }
|
||||
// }
|
||||
import 'package:eatvio_app/features/profile/models/circumference_model.dart';
|
||||
import 'package:eatvio_app/features/profile/presentation/bloc/profile_cubit/profile_cubit.dart';
|
||||
import 'package:eatvio_app/theme/theme_helper.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:syncfusion_flutter_charts/charts.dart';
|
||||
|
||||
class CircumferenceChartWidget extends StatefulWidget {
|
||||
final List<CircumferenceModel> circumferencePoints;
|
||||
final ProfileCubit profileCubit;
|
||||
|
||||
const CircumferenceChartWidget({
|
||||
super.key,
|
||||
required this.circumferencePoints,
|
||||
required this.profileCubit,
|
||||
});
|
||||
|
||||
@override
|
||||
State<CircumferenceChartWidget> createState() => _CircumferenceChartWidgetState();
|
||||
}
|
||||
|
||||
class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
|
||||
late FixedExtentScrollController chestController;
|
||||
late FixedExtentScrollController waistController;
|
||||
late FixedExtentScrollController hipController;
|
||||
late int chest;
|
||||
late int waist;
|
||||
late int hip;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
if (widget.circumferencePoints.isNotEmpty)
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'${widget.circumferencePoints.last.chestCircumference}',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 40,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
if (widget.circumferencePoints.length == 1)
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 12),
|
||||
width: 8,
|
||||
height: 8,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.black12,
|
||||
),
|
||||
),
|
||||
if (widget.circumferencePoints.length > 1)
|
||||
widget.circumferencePoints.last.chestCircumference > widget.circumferencePoints[widget.circumferencePoints.length - 2].chestCircumference
|
||||
? Icon(
|
||||
Icons.arrow_drop_up,
|
||||
size: 40,
|
||||
color: Colors.grey,
|
||||
)
|
||||
: Icon(
|
||||
Icons.arrow_drop_down,
|
||||
size: 40,
|
||||
color: Colors.grey,
|
||||
),
|
||||
Text(
|
||||
'${widget.circumferencePoints.last.waistCircumference}',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 40,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
if (widget.circumferencePoints.length == 1)
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 12),
|
||||
width: 8,
|
||||
height: 8,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.black12,
|
||||
),
|
||||
),
|
||||
if (widget.circumferencePoints.length > 1)
|
||||
widget.circumferencePoints.last.waistCircumference > widget.circumferencePoints[widget.circumferencePoints.length - 2].waistCircumference
|
||||
? Icon(
|
||||
Icons.arrow_drop_up,
|
||||
size: 40,
|
||||
color: Colors.grey,
|
||||
)
|
||||
: Icon(
|
||||
Icons.arrow_drop_down,
|
||||
size: 40,
|
||||
color: Colors.grey,
|
||||
),
|
||||
Text(
|
||||
'${widget.circumferencePoints.last.hipCircumference}',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 40,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
if (widget.circumferencePoints.length == 1)
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 12),
|
||||
width: 8,
|
||||
height: 8,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.black12,
|
||||
),
|
||||
),
|
||||
if (widget.circumferencePoints.length > 1)
|
||||
widget.circumferencePoints.last.hipCircumference > widget.circumferencePoints[widget.circumferencePoints.length - 2].hipCircumference
|
||||
? Icon(
|
||||
Icons.arrow_drop_up,
|
||||
size: 40,
|
||||
color: Colors.grey,
|
||||
)
|
||||
: Icon(
|
||||
Icons.arrow_drop_down,
|
||||
size: 40,
|
||||
color: Colors.grey,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Stack(
|
||||
alignment: Alignment.bottomRight,
|
||||
children: [
|
||||
SfCartesianChart(
|
||||
margin: EdgeInsets.symmetric(horizontal: 8),
|
||||
enableAxisAnimation: true,
|
||||
plotAreaBorderWidth: 0,
|
||||
trackballBehavior: TrackballBehavior(
|
||||
enable: true,
|
||||
activationMode: ActivationMode.singleTap,
|
||||
tooltipDisplayMode: TrackballDisplayMode.groupAllPoints,
|
||||
tooltipSettings: InteractiveTooltip(),
|
||||
lineType: TrackballLineType.vertical,
|
||||
),
|
||||
primaryXAxis: DateTimeCategoryAxis(
|
||||
tickPosition: TickPosition.inside,
|
||||
majorTickLines: MajorTickLines(
|
||||
size: 0,
|
||||
),
|
||||
edgeLabelPlacement: EdgeLabelPlacement.shift,
|
||||
dateFormat: DateFormat.MMMd('ru'),
|
||||
labelStyle: TextStyle(
|
||||
color: Colors.grey,
|
||||
),
|
||||
majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey.withOpacity(0.3)),
|
||||
axisLine: AxisLine(
|
||||
color: Colors.grey.withOpacity(0.3),
|
||||
width: 0.4,
|
||||
),
|
||||
),
|
||||
primaryYAxis: NumericAxis(
|
||||
isVisible: false,
|
||||
labelFormat: '{value} см',
|
||||
axisLine: AxisLine(
|
||||
width: 1,
|
||||
),
|
||||
majorTickLines: MajorTickLines(size: 0),
|
||||
),
|
||||
series: _getSplineSeries(),
|
||||
tooltipBehavior: TooltipBehavior(enable: true),
|
||||
),
|
||||
FloatingActionButton.small(
|
||||
heroTag: 'addCircumference',
|
||||
onPressed: () {
|
||||
if (widget.circumferencePoints.isNotEmpty) {
|
||||
chest = widget.circumferencePoints.last.chestCircumference;
|
||||
waist = widget.circumferencePoints.last.waistCircumference;
|
||||
hip = widget.circumferencePoints.last.hipCircumference;
|
||||
chestController = FixedExtentScrollController(initialItem: chest - 20);
|
||||
waistController = FixedExtentScrollController(initialItem: waist - 20);
|
||||
hipController = FixedExtentScrollController(initialItem: hip - 20);
|
||||
} else {
|
||||
chestController = FixedExtentScrollController();
|
||||
waistController = FixedExtentScrollController();
|
||||
hipController = FixedExtentScrollController();
|
||||
}
|
||||
showModalBottomSheet(
|
||||
useRootNavigator: true,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: CupertinoPicker(
|
||||
magnification: 1.22,
|
||||
squeeze: 1.2,
|
||||
useMagnifier: true,
|
||||
scrollController: chestController,
|
||||
itemExtent: 24,
|
||||
onSelectedItemChanged: (int value) {
|
||||
chest = value;
|
||||
},
|
||||
children: [
|
||||
for (int i = 20; i < 200; i++) Text('$i'),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: CupertinoPicker(
|
||||
magnification: 1.22,
|
||||
squeeze: 1.2,
|
||||
useMagnifier: true,
|
||||
scrollController: waistController,
|
||||
itemExtent: 24,
|
||||
onSelectedItemChanged: (int value) {
|
||||
waist = value;
|
||||
},
|
||||
children: [
|
||||
for (int i = 20; i < 200; i++) Text('$i'),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: CupertinoPicker(
|
||||
magnification: 1.22,
|
||||
squeeze: 1.2,
|
||||
useMagnifier: true,
|
||||
scrollController: hipController,
|
||||
itemExtent: 24,
|
||||
onSelectedItemChanged: (int value) {
|
||||
hip = value;
|
||||
},
|
||||
children: [
|
||||
for (int i = 20; i < 200; i++) Text('$i'),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
widget.profileCubit.addCircumference(
|
||||
chestCircumference: chest,
|
||||
waistCircumference: waist,
|
||||
hipCircumference: hip,
|
||||
);
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
child: Ink(
|
||||
width: MediaQuery.of(context).size.width - 32,
|
||||
padding: EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.blueA400,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'Сохранить',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
backgroundColor: Colors.red,
|
||||
shape: CircleBorder(),
|
||||
child: Icon(
|
||||
Icons.add,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
List<CartesianSeries<CircumferenceModel, DateTime>> _getSplineSeries() {
|
||||
final Color seriesColor1 = Colors.red;
|
||||
final Color seriesColor2 = appTheme.blueA400;
|
||||
final Color seriesColor3 = Colors.green;
|
||||
|
||||
return <CartesianSeries<CircumferenceModel, DateTime>>[
|
||||
SplineAreaSeries<CircumferenceModel, DateTime>(
|
||||
markerSettings: MarkerSettings(
|
||||
isVisible: true,
|
||||
color: seriesColor1,
|
||||
height: 8,
|
||||
width: 8,
|
||||
),
|
||||
dataLabelSettings: DataLabelSettings(
|
||||
labelAlignment: ChartDataLabelAlignment.top,
|
||||
isVisible: true,
|
||||
),
|
||||
dataSource: widget.circumferencePoints,
|
||||
borderColor: seriesColor1,
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
seriesColor1.withOpacity(0.14),
|
||||
Colors.transparent,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment(0, 0.6),
|
||||
),
|
||||
name: 'Грудь',
|
||||
xValueMapper: (CircumferenceModel value, int index) => value.createdAt,
|
||||
yValueMapper: (CircumferenceModel value, int index) => value.chestCircumference,
|
||||
),
|
||||
SplineAreaSeries<CircumferenceModel, DateTime>(
|
||||
markerSettings: MarkerSettings(
|
||||
isVisible: true,
|
||||
color: seriesColor2,
|
||||
height: 8,
|
||||
width: 8,
|
||||
),
|
||||
dataLabelSettings: DataLabelSettings(
|
||||
labelAlignment: ChartDataLabelAlignment.top,
|
||||
isVisible: true,
|
||||
),
|
||||
dataSource: widget.circumferencePoints,
|
||||
borderColor: seriesColor2,
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
seriesColor2.withOpacity(0.14),
|
||||
Colors.transparent,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment(0, 0.6),
|
||||
),
|
||||
name: 'Талия',
|
||||
xValueMapper: (CircumferenceModel value, int index) => value.createdAt,
|
||||
yValueMapper: (CircumferenceModel value, int index) => value.waistCircumference,
|
||||
),
|
||||
SplineAreaSeries<CircumferenceModel, DateTime>(
|
||||
markerSettings: MarkerSettings(
|
||||
isVisible: true,
|
||||
color: seriesColor3,
|
||||
height: 8,
|
||||
width: 8,
|
||||
),
|
||||
dataLabelSettings: DataLabelSettings(
|
||||
labelAlignment: ChartDataLabelAlignment.top,
|
||||
isVisible: true,
|
||||
),
|
||||
dataSource: widget.circumferencePoints,
|
||||
borderColor: seriesColor3,
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
seriesColor3.withOpacity(0.14),
|
||||
Colors.transparent,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment(0, 0.6),
|
||||
),
|
||||
name: 'Бёдра',
|
||||
xValueMapper: (CircumferenceModel value, int index) => value.createdAt,
|
||||
yValueMapper: (CircumferenceModel value, int index) => value.hipCircumference,
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,114 +1,114 @@
|
||||
// import 'package:eatvio_app/features/profile/models/profile_model.dart';
|
||||
// import 'package:eatvio_app/theme/theme_helper.dart';
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:syncfusion_flutter_charts/charts.dart';
|
||||
// import 'package:intl/intl.dart';
|
||||
//
|
||||
// class ImtChartWidget extends StatelessWidget {
|
||||
// final List<ChartPointModel> chartPoints;
|
||||
//
|
||||
// const ImtChartWidget({
|
||||
// super.key,
|
||||
// required this.chartPoints,
|
||||
// });
|
||||
//
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
// child: Row(
|
||||
// children: [
|
||||
// Text(
|
||||
// '${chartPoints.last.bmi.toStringAsFixed(2)}',
|
||||
// style: TextStyle(
|
||||
// color: Colors.black,
|
||||
// fontSize: 40,
|
||||
// fontWeight: FontWeight.w500,
|
||||
// ),
|
||||
// ),
|
||||
// chartPoints.last.bmi > chartPoints[chartPoints.length - 2].bmi
|
||||
// ? Icon(
|
||||
// Icons.arrow_drop_up,
|
||||
// size: 40,
|
||||
// color: Colors.grey,
|
||||
// )
|
||||
// : Icon(
|
||||
// Icons.arrow_drop_down,
|
||||
// size: 40,
|
||||
// color: Colors.grey,
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// SfCartesianChart(
|
||||
// margin: EdgeInsets.symmetric(horizontal: 8),
|
||||
// enableAxisAnimation: true,
|
||||
// plotAreaBorderWidth: 0,
|
||||
// trackballBehavior: TrackballBehavior(
|
||||
// enable: true,
|
||||
// activationMode: ActivationMode.singleTap,
|
||||
// tooltipDisplayMode: TrackballDisplayMode.groupAllPoints,
|
||||
// tooltipSettings: InteractiveTooltip(),
|
||||
// lineType: TrackballLineType.vertical,
|
||||
// ),
|
||||
// primaryXAxis: DateTimeCategoryAxis(
|
||||
// initialVisibleMinimum: chartPoints.first.createdAt,
|
||||
// initialVisibleMaximum: chartPoints.last.createdAt,
|
||||
// tickPosition: TickPosition.inside,
|
||||
// majorTickLines: MajorTickLines(
|
||||
// size: 0,
|
||||
// ),
|
||||
// edgeLabelPlacement: EdgeLabelPlacement.shift,
|
||||
// dateFormat: DateFormat.MMMd('ru'),
|
||||
// labelStyle: TextStyle(
|
||||
// color: Colors.grey,
|
||||
// ),
|
||||
// majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey.withOpacity(0.3)),
|
||||
// axisLine: AxisLine(
|
||||
// color: Colors.grey.withOpacity(0.3),
|
||||
// width: 0.4,
|
||||
// ),
|
||||
// ),
|
||||
// primaryYAxis: NumericAxis(
|
||||
// isVisible: false,
|
||||
// ),
|
||||
// series: _getSplineSeries(),
|
||||
// tooltipBehavior: TooltipBehavior(enable: true),
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// List<CartesianSeries<ChartPointModel, DateTime>> _getSplineSeries() {
|
||||
// return <CartesianSeries<ChartPointModel, DateTime>>[
|
||||
// SplineAreaSeries<ChartPointModel, DateTime>(
|
||||
// markerSettings: MarkerSettings(
|
||||
// isVisible: true,
|
||||
// color: appTheme.blueA400,
|
||||
// height: 8,
|
||||
// width: 8,
|
||||
// ),
|
||||
// dataLabelSettings: DataLabelSettings(
|
||||
// labelAlignment: ChartDataLabelAlignment.top,
|
||||
// isVisible: true,
|
||||
// ),
|
||||
// dataSource: chartPoints,
|
||||
// borderColor: appTheme.blueA400,
|
||||
// gradient: LinearGradient(
|
||||
// colors: [
|
||||
// appTheme.blueA400.withOpacity(0.14),
|
||||
// Colors.transparent,
|
||||
// ],
|
||||
// begin: Alignment.topCenter,
|
||||
// end: Alignment(0, 0.6),
|
||||
// ),
|
||||
// name: 'ИМТ',
|
||||
// xValueMapper: (ChartPointModel value, int index) => value.createdAt,
|
||||
// yValueMapper: (ChartPointModel value, int index) => double.parse(value.bmi.toStringAsFixed(2)),
|
||||
// ),
|
||||
// ];
|
||||
// }
|
||||
// }
|
||||
import 'package:eatvio_app/features/profile/models/weight_model.dart';
|
||||
import 'package:eatvio_app/theme/theme_helper.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncfusion_flutter_charts/charts.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class ImtChartWidget extends StatelessWidget {
|
||||
final List<WeightModel> weightPoints;
|
||||
|
||||
const ImtChartWidget({
|
||||
super.key,
|
||||
required this.weightPoints,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'${weightPoints.last.bmi.toStringAsFixed(2)}',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 40,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
weightPoints.last.bmi > weightPoints[weightPoints.length - 2].bmi
|
||||
? Icon(
|
||||
Icons.arrow_drop_up,
|
||||
size: 40,
|
||||
color: Colors.grey,
|
||||
)
|
||||
: Icon(
|
||||
Icons.arrow_drop_down,
|
||||
size: 40,
|
||||
color: Colors.grey,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SfCartesianChart(
|
||||
margin: EdgeInsets.symmetric(horizontal: 8),
|
||||
enableAxisAnimation: true,
|
||||
plotAreaBorderWidth: 0,
|
||||
trackballBehavior: TrackballBehavior(
|
||||
enable: true,
|
||||
activationMode: ActivationMode.singleTap,
|
||||
tooltipDisplayMode: TrackballDisplayMode.groupAllPoints,
|
||||
tooltipSettings: InteractiveTooltip(),
|
||||
lineType: TrackballLineType.vertical,
|
||||
),
|
||||
primaryXAxis: DateTimeCategoryAxis(
|
||||
initialVisibleMinimum: weightPoints.first.createdAt,
|
||||
initialVisibleMaximum: weightPoints.last.createdAt,
|
||||
tickPosition: TickPosition.inside,
|
||||
majorTickLines: MajorTickLines(
|
||||
size: 0,
|
||||
),
|
||||
edgeLabelPlacement: EdgeLabelPlacement.shift,
|
||||
dateFormat: DateFormat.MMMd('ru'),
|
||||
labelStyle: TextStyle(
|
||||
color: Colors.grey,
|
||||
),
|
||||
majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey.withOpacity(0.3)),
|
||||
axisLine: AxisLine(
|
||||
color: Colors.grey.withOpacity(0.3),
|
||||
width: 0.4,
|
||||
),
|
||||
),
|
||||
primaryYAxis: NumericAxis(
|
||||
isVisible: false,
|
||||
),
|
||||
series: _getSplineSeries(),
|
||||
tooltipBehavior: TooltipBehavior(enable: true),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
List<CartesianSeries<WeightModel, DateTime>> _getSplineSeries() {
|
||||
return <CartesianSeries<WeightModel, DateTime>>[
|
||||
SplineAreaSeries<WeightModel, DateTime>(
|
||||
markerSettings: MarkerSettings(
|
||||
isVisible: true,
|
||||
color: appTheme.blueA400,
|
||||
height: 8,
|
||||
width: 8,
|
||||
),
|
||||
dataLabelSettings: DataLabelSettings(
|
||||
labelAlignment: ChartDataLabelAlignment.top,
|
||||
isVisible: true,
|
||||
),
|
||||
dataSource: weightPoints,
|
||||
borderColor: appTheme.blueA400,
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
appTheme.blueA400.withOpacity(0.14),
|
||||
Colors.transparent,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment(0, 0.6),
|
||||
),
|
||||
name: 'ИМТ',
|
||||
xValueMapper: (WeightModel value, int index) => value.createdAt,
|
||||
yValueMapper: (WeightModel value, int index) => double.parse(value.bmi.toStringAsFixed(2)),
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,237 +1,237 @@
|
||||
//
|
||||
// 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';
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:intl/intl.dart';
|
||||
// import 'package:syncfusion_flutter_charts/charts.dart';
|
||||
//
|
||||
// class WeightChartWidget extends StatefulWidget {
|
||||
// final List<ChartPointModel> chartPoints;
|
||||
// final ProfileCubit profileCubit;
|
||||
//
|
||||
// const WeightChartWidget({
|
||||
// super.key,
|
||||
// required this.chartPoints,
|
||||
// required this.profileCubit,
|
||||
// });
|
||||
//
|
||||
// @override
|
||||
// State<WeightChartWidget> createState() => _WeightChartWidgetState();
|
||||
// }
|
||||
//
|
||||
// class _WeightChartWidgetState extends State<WeightChartWidget> {
|
||||
// late FixedExtentScrollController weightKiloController;
|
||||
// late FixedExtentScrollController weightGramsController;
|
||||
// late int weightKilo;
|
||||
// late int weightGrams;
|
||||
//
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// if (widget.chartPoints.isNotEmpty)
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
// child: Row(
|
||||
// children: [
|
||||
// Text(
|
||||
// '${widget.chartPoints.last.weight.toStringAsFixed(1)} кг',
|
||||
// style: TextStyle(
|
||||
// color: Colors.black,
|
||||
// fontSize: 40,
|
||||
// fontWeight: FontWeight.w500,
|
||||
// ),
|
||||
// ),
|
||||
// if (widget.chartPoints.length == 1)
|
||||
// Container(
|
||||
// margin: EdgeInsets.symmetric(horizontal: 12),
|
||||
// width: 8,
|
||||
// height: 8,
|
||||
// decoration: BoxDecoration(
|
||||
// shape: BoxShape.circle,
|
||||
// color: Colors.black12,
|
||||
// ),
|
||||
// ),
|
||||
// if (widget.chartPoints.length > 1) widget.chartPoints.last.weight > widget.chartPoints[widget.chartPoints.length - 2].weight
|
||||
// ? Icon(
|
||||
// Icons.arrow_drop_up,
|
||||
// size: 40,
|
||||
// color: Colors.grey.withOpacity(0.4),
|
||||
// )
|
||||
// : Icon(
|
||||
// Icons.arrow_drop_down,
|
||||
// size: 40,
|
||||
// color: Colors.grey.withOpacity(0.4),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// Stack(
|
||||
// alignment: Alignment.bottomRight,
|
||||
// children: [
|
||||
// SfCartesianChart(
|
||||
// margin: EdgeInsets.symmetric(horizontal: 8),
|
||||
// enableAxisAnimation: true,
|
||||
// plotAreaBorderWidth: 0,
|
||||
// trackballBehavior: TrackballBehavior(
|
||||
// enable: true,
|
||||
// activationMode: ActivationMode.singleTap,
|
||||
// tooltipDisplayMode: TrackballDisplayMode.groupAllPoints,
|
||||
// tooltipSettings: InteractiveTooltip(),
|
||||
// lineType: TrackballLineType.vertical,
|
||||
// ),
|
||||
// primaryXAxis: DateTimeCategoryAxis(
|
||||
// tickPosition: TickPosition.inside,
|
||||
// majorTickLines: MajorTickLines(
|
||||
// size: 0,
|
||||
// ),
|
||||
// edgeLabelPlacement: EdgeLabelPlacement.shift,
|
||||
// dateFormat: DateFormat.MMMd('ru'),
|
||||
// labelStyle: TextStyle(
|
||||
// color: Colors.grey,
|
||||
// ),
|
||||
// majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey.withOpacity(0.3)),
|
||||
// axisLine: AxisLine(
|
||||
// color: Colors.grey.withOpacity(0.3),
|
||||
// width: 0.4,
|
||||
// ),
|
||||
// ),
|
||||
// primaryYAxis: NumericAxis(
|
||||
// isVisible: false,
|
||||
// labelFormat: '{value} кг',
|
||||
// majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey),
|
||||
// axisLine: AxisLine(
|
||||
// width: 1,
|
||||
// ),
|
||||
// majorTickLines: MajorTickLines(size: 0),
|
||||
// ),
|
||||
// series: _getSplineSeries(),
|
||||
// tooltipBehavior: TooltipBehavior(enable: true),
|
||||
// ),
|
||||
// FloatingActionButton.small(
|
||||
// heroTag: 'addWeight',
|
||||
// onPressed: () {
|
||||
// if (widget.chartPoints.isNotEmpty) {
|
||||
// weightKilo = int.parse(widget.chartPoints.last.weight.toString().split('.')[0]);
|
||||
// weightGrams = int.parse(widget.chartPoints.last.weight.toString().split('.')[1][0]);
|
||||
// weightKiloController = FixedExtentScrollController(initialItem: weightKilo - 20);
|
||||
// weightGramsController = FixedExtentScrollController(initialItem: weightGrams);
|
||||
// } else {
|
||||
// weightKiloController = FixedExtentScrollController();
|
||||
// weightGramsController = FixedExtentScrollController();
|
||||
// }
|
||||
// showModalBottomSheet(
|
||||
// useRootNavigator: true,
|
||||
// context: context,
|
||||
// builder: (context) {
|
||||
// return Column(
|
||||
// children: [
|
||||
// Expanded(
|
||||
// child: Row(
|
||||
// children: [
|
||||
// Expanded(
|
||||
// child: CupertinoPicker(
|
||||
// magnification: 1.22,
|
||||
// squeeze: 1.2,
|
||||
// useMagnifier: true,
|
||||
// scrollController: weightKiloController,
|
||||
// itemExtent: 24,
|
||||
// onSelectedItemChanged: (int value) {
|
||||
// weightKilo = value + 20;
|
||||
// },
|
||||
// children: [
|
||||
// for (int i = 20; i < 300; i++) Text('$i'),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// Expanded(
|
||||
// child: CupertinoPicker(
|
||||
// magnification: 1.22,
|
||||
// squeeze: 1.2,
|
||||
// useMagnifier: true,
|
||||
// scrollController: weightGramsController,
|
||||
// itemExtent: 24,
|
||||
// onSelectedItemChanged: (int value) {
|
||||
// weightGrams = value;
|
||||
// },
|
||||
// children: [
|
||||
// for (int i = 0; i < 10; i++) Text('$i'),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// InkWell(
|
||||
// onTap: () {
|
||||
// widget.profileCubit.addWeight(weight: double.parse('$weightKilo.$weightGrams'));
|
||||
// Navigator.of(context).pop();
|
||||
// },
|
||||
// borderRadius: BorderRadius.circular(16),
|
||||
// child: Ink(
|
||||
// width: MediaQuery.of(context).size.width - 32,
|
||||
// padding: EdgeInsets.all(16),
|
||||
// decoration: BoxDecoration(
|
||||
// color: appTheme.blueA400,
|
||||
// borderRadius: BorderRadius.circular(16),
|
||||
// ),
|
||||
// child: Center(
|
||||
// child: Text(
|
||||
// 'Сохранить',
|
||||
// style: TextStyle(
|
||||
// color: Colors.white,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
// },
|
||||
// );
|
||||
// },
|
||||
// backgroundColor: Colors.red,
|
||||
// shape: CircleBorder(),
|
||||
// child: Icon(
|
||||
// Icons.add,
|
||||
// color: Colors.white,
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// List<CartesianSeries<ChartPointModel, DateTime>> _getSplineSeries() {
|
||||
// return <CartesianSeries<ChartPointModel, DateTime>>[
|
||||
// SplineAreaSeries<ChartPointModel, DateTime>(
|
||||
// markerSettings: MarkerSettings(
|
||||
// isVisible: true,
|
||||
// color: appTheme.blueA400,
|
||||
// height: 8,
|
||||
// width: 8,
|
||||
// ),
|
||||
// dataLabelSettings: DataLabelSettings(
|
||||
// labelAlignment: ChartDataLabelAlignment.top,
|
||||
// isVisible: true,
|
||||
// ),
|
||||
// dataSource: widget.chartPoints,
|
||||
// borderColor: appTheme.blueA400,
|
||||
// gradient: LinearGradient(
|
||||
// colors: [
|
||||
// appTheme.blueA400.withOpacity(0.14),
|
||||
// Colors.transparent,
|
||||
// ],
|
||||
// begin: Alignment.topCenter,
|
||||
// end: Alignment(0, 0.6),
|
||||
// ),
|
||||
// name: 'Вес',
|
||||
// xValueMapper: (ChartPointModel value, int index) => value.createdAt,
|
||||
// yValueMapper: (ChartPointModel value, int index) => value.weight,
|
||||
// ),
|
||||
// ];
|
||||
// }
|
||||
// }
|
||||
import 'package:eatvio_app/features/profile/models/weight_model.dart';
|
||||
import 'package:eatvio_app/features/profile/presentation/bloc/profile_cubit/profile_cubit.dart';
|
||||
import 'package:eatvio_app/theme/theme_helper.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:syncfusion_flutter_charts/charts.dart';
|
||||
|
||||
class WeightChartWidget extends StatefulWidget {
|
||||
final List<WeightModel> weightPoints;
|
||||
final ProfileCubit profileCubit;
|
||||
|
||||
const WeightChartWidget({
|
||||
super.key,
|
||||
required this.weightPoints,
|
||||
required this.profileCubit,
|
||||
});
|
||||
|
||||
@override
|
||||
State<WeightChartWidget> createState() => _WeightChartWidgetState();
|
||||
}
|
||||
|
||||
class _WeightChartWidgetState extends State<WeightChartWidget> {
|
||||
late FixedExtentScrollController weightKiloController;
|
||||
late FixedExtentScrollController weightGramsController;
|
||||
late int weightKilo;
|
||||
late int weightGrams;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (widget.weightPoints.isNotEmpty)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'${widget.weightPoints.last.weight.toStringAsFixed(1)} кг',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 40,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
if (widget.weightPoints.length == 1)
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 12),
|
||||
width: 8,
|
||||
height: 8,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.black12,
|
||||
),
|
||||
),
|
||||
if (widget.weightPoints.length > 1) widget.weightPoints.last.weight > widget.weightPoints[widget.weightPoints.length - 2].weight
|
||||
? Icon(
|
||||
Icons.arrow_drop_up,
|
||||
size: 40,
|
||||
color: Colors.grey.withOpacity(0.4),
|
||||
)
|
||||
: Icon(
|
||||
Icons.arrow_drop_down,
|
||||
size: 40,
|
||||
color: Colors.grey.withOpacity(0.4),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Stack(
|
||||
alignment: Alignment.bottomRight,
|
||||
children: [
|
||||
SfCartesianChart(
|
||||
margin: EdgeInsets.symmetric(horizontal: 8),
|
||||
enableAxisAnimation: true,
|
||||
plotAreaBorderWidth: 0,
|
||||
trackballBehavior: TrackballBehavior(
|
||||
enable: true,
|
||||
activationMode: ActivationMode.singleTap,
|
||||
tooltipDisplayMode: TrackballDisplayMode.groupAllPoints,
|
||||
tooltipSettings: InteractiveTooltip(),
|
||||
lineType: TrackballLineType.vertical,
|
||||
),
|
||||
primaryXAxis: DateTimeCategoryAxis(
|
||||
tickPosition: TickPosition.inside,
|
||||
majorTickLines: MajorTickLines(
|
||||
size: 0,
|
||||
),
|
||||
edgeLabelPlacement: EdgeLabelPlacement.shift,
|
||||
dateFormat: DateFormat.MMMd('ru'),
|
||||
labelStyle: TextStyle(
|
||||
color: Colors.grey,
|
||||
),
|
||||
majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey.withOpacity(0.3)),
|
||||
axisLine: AxisLine(
|
||||
color: Colors.grey.withOpacity(0.3),
|
||||
width: 0.4,
|
||||
),
|
||||
),
|
||||
primaryYAxis: NumericAxis(
|
||||
isVisible: false,
|
||||
labelFormat: '{value} кг',
|
||||
majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey),
|
||||
axisLine: AxisLine(
|
||||
width: 1,
|
||||
),
|
||||
majorTickLines: MajorTickLines(size: 0),
|
||||
),
|
||||
series: _getSplineSeries(),
|
||||
tooltipBehavior: TooltipBehavior(enable: true),
|
||||
),
|
||||
FloatingActionButton.small(
|
||||
heroTag: 'addWeight',
|
||||
onPressed: () {
|
||||
if (widget.weightPoints.isNotEmpty) {
|
||||
weightKilo = int.parse(widget.weightPoints.last.weight.toString().split('.')[0]);
|
||||
weightGrams = int.parse(widget.weightPoints.last.weight.toString().split('.')[1][0]);
|
||||
weightKiloController = FixedExtentScrollController(initialItem: weightKilo - 20);
|
||||
weightGramsController = FixedExtentScrollController(initialItem: weightGrams);
|
||||
} else {
|
||||
weightKiloController = FixedExtentScrollController();
|
||||
weightGramsController = FixedExtentScrollController();
|
||||
}
|
||||
showModalBottomSheet(
|
||||
useRootNavigator: true,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: CupertinoPicker(
|
||||
magnification: 1.22,
|
||||
squeeze: 1.2,
|
||||
useMagnifier: true,
|
||||
scrollController: weightKiloController,
|
||||
itemExtent: 24,
|
||||
onSelectedItemChanged: (int value) {
|
||||
weightKilo = value + 20;
|
||||
},
|
||||
children: [
|
||||
for (int i = 20; i < 300; i++) Text('$i'),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: CupertinoPicker(
|
||||
magnification: 1.22,
|
||||
squeeze: 1.2,
|
||||
useMagnifier: true,
|
||||
scrollController: weightGramsController,
|
||||
itemExtent: 24,
|
||||
onSelectedItemChanged: (int value) {
|
||||
weightGrams = value;
|
||||
},
|
||||
children: [
|
||||
for (int i = 0; i < 10; i++) Text('$i'),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
widget.profileCubit.addWeight(weight: double.parse('$weightKilo.$weightGrams'));
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
child: Ink(
|
||||
width: MediaQuery.of(context).size.width - 32,
|
||||
padding: EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.blueA400,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'Сохранить',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
backgroundColor: Colors.red,
|
||||
shape: CircleBorder(),
|
||||
child: Icon(
|
||||
Icons.add,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
List<CartesianSeries<WeightModel, DateTime>> _getSplineSeries() {
|
||||
return <CartesianSeries<WeightModel, DateTime>>[
|
||||
SplineAreaSeries<WeightModel, DateTime>(
|
||||
markerSettings: MarkerSettings(
|
||||
isVisible: true,
|
||||
color: appTheme.blueA400,
|
||||
height: 8,
|
||||
width: 8,
|
||||
),
|
||||
dataLabelSettings: DataLabelSettings(
|
||||
labelAlignment: ChartDataLabelAlignment.top,
|
||||
isVisible: true,
|
||||
),
|
||||
dataSource: widget.weightPoints,
|
||||
borderColor: appTheme.blueA400,
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
appTheme.blueA400.withOpacity(0.14),
|
||||
Colors.transparent,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment(0, 0.6),
|
||||
),
|
||||
name: 'Вес',
|
||||
xValueMapper: (WeightModel value, int index) => value.createdAt,
|
||||
yValueMapper: (WeightModel value, int index) => value.weight,
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import 'package:eatvio_app/features/feed/models/feed_blog_post_model.dart';
|
||||
import 'package:eatvio_app/features/profile/models/circumference_model.dart';
|
||||
import 'package:eatvio_app/features/profile/models/profile_model.dart';
|
||||
import 'package:eatvio_app/features/profile/models/weight_model.dart';
|
||||
import 'package:eatvio_app/features/profile/services/profile_service.dart';
|
||||
|
||||
class ProfileRepository {
|
||||
@@ -69,4 +71,44 @@ class ProfileRepository {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Future<List<WeightModel>> getWeight({
|
||||
required String period,
|
||||
String? slug,
|
||||
}) async {
|
||||
try {
|
||||
if (slug != null) {
|
||||
return (await profileService.getWeightBySlug(
|
||||
period: period,
|
||||
slug: slug,
|
||||
));
|
||||
} else {
|
||||
return (await profileService.getWeight(
|
||||
period: period,
|
||||
));
|
||||
}
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Future<List<CircumferenceModel>> getCircumferences({
|
||||
required String period,
|
||||
String? slug,
|
||||
}) async {
|
||||
try {
|
||||
if (slug != null) {
|
||||
return (await profileService.getCircumferencesBySlug(
|
||||
period: period,
|
||||
slug: slug,
|
||||
));
|
||||
} else {
|
||||
return (await profileService.getCircumferences(
|
||||
period: period,
|
||||
));
|
||||
}
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:eatvio_app/features/feed/models/feed_blog_post_settings_model.dart';
|
||||
import 'package:eatvio_app/features/profile/models/circumference_model.dart';
|
||||
import 'package:eatvio_app/features/profile/models/profile_model.dart';
|
||||
import 'package:eatvio_app/features/profile/models/weight_model.dart';
|
||||
import 'package:retrofit/retrofit.dart';
|
||||
|
||||
part 'profile_service.g.dart';
|
||||
@@ -36,4 +38,26 @@ abstract class ProfileService {
|
||||
Future<FeedBlogPostSettingsModel> getBlogPostByAuthorSlug({
|
||||
@Path() required String slug,
|
||||
});
|
||||
|
||||
@GET('/api/profile/measure/weight/{period}')
|
||||
Future<List<WeightModel>> getWeight({
|
||||
@Path() required String period,
|
||||
});
|
||||
|
||||
@GET('/api/profile/measure/weight/{period}/{slug}')
|
||||
Future<List<WeightModel>> getWeightBySlug({
|
||||
@Path() required String period,
|
||||
@Path() required String slug,
|
||||
});
|
||||
|
||||
@GET('/api/profile/measure/circumferences/{period}')
|
||||
Future<List<CircumferenceModel>> getCircumferences({
|
||||
@Path() required String period,
|
||||
});
|
||||
|
||||
@GET('/api/profile/measure/circumferences/{period}/{user}')
|
||||
Future<List<CircumferenceModel>> getCircumferencesBySlug({
|
||||
@Path() required String period,
|
||||
@Path() required String slug,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -191,7 +191,8 @@ class _ProfileService implements ProfileService {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<FeedBlogPostSettingsModel> getBlogPostByAuthorSlug({required String slug}) async {
|
||||
Future<FeedBlogPostSettingsModel> getBlogPostByAuthorSlug(
|
||||
{required String slug}) async {
|
||||
final _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
@@ -223,8 +224,159 @@ class _ProfileService implements ProfileService {
|
||||
return _value;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<WeightModel>> getWeight({required String period}) async {
|
||||
final _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
const Map<String, dynamic>? _data = null;
|
||||
final _options = _setStreamType<List<WeightModel>>(Options(
|
||||
method: 'GET',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/profile/measure/weight/${period}',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
)));
|
||||
final _result = await _dio.fetch<List<dynamic>>(_options);
|
||||
late List<WeightModel> _value;
|
||||
try {
|
||||
_value = _result.data!
|
||||
.map((dynamic i) => WeightModel.fromJson(i as Map<String, dynamic>))
|
||||
.toList();
|
||||
} on Object catch (e, s) {
|
||||
errorLogger?.logError(e, s, _options);
|
||||
rethrow;
|
||||
}
|
||||
return _value;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<WeightModel>> getWeightBySlug({
|
||||
required String period,
|
||||
required String slug,
|
||||
}) async {
|
||||
final _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
const Map<String, dynamic>? _data = null;
|
||||
final _options = _setStreamType<List<WeightModel>>(Options(
|
||||
method: 'GET',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/profile/measure/weight/${period}/${slug}',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
)));
|
||||
final _result = await _dio.fetch<List<dynamic>>(_options);
|
||||
late List<WeightModel> _value;
|
||||
try {
|
||||
_value = _result.data!
|
||||
.map((dynamic i) => WeightModel.fromJson(i as Map<String, dynamic>))
|
||||
.toList();
|
||||
} on Object catch (e, s) {
|
||||
errorLogger?.logError(e, s, _options);
|
||||
rethrow;
|
||||
}
|
||||
return _value;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<CircumferenceModel>> getCircumferences(
|
||||
{required String period}) async {
|
||||
final _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
const Map<String, dynamic>? _data = null;
|
||||
final _options = _setStreamType<List<CircumferenceModel>>(Options(
|
||||
method: 'GET',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/profile/measure/circumferences/${period}',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
)));
|
||||
final _result = await _dio.fetch<List<dynamic>>(_options);
|
||||
late List<CircumferenceModel> _value;
|
||||
try {
|
||||
_value = _result.data!
|
||||
.map((dynamic i) =>
|
||||
CircumferenceModel.fromJson(i as Map<String, dynamic>))
|
||||
.toList();
|
||||
} on Object catch (e, s) {
|
||||
errorLogger?.logError(e, s, _options);
|
||||
rethrow;
|
||||
}
|
||||
return _value;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<CircumferenceModel>> getCircumferencesBySlug({
|
||||
required String period,
|
||||
required String slug,
|
||||
}) async {
|
||||
final _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
const Map<String, dynamic>? _data = null;
|
||||
final _options = _setStreamType<List<CircumferenceModel>>(Options(
|
||||
method: 'GET',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/profile/measure/circumferences/${period}/{user}',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
)));
|
||||
final _result = await _dio.fetch<List<dynamic>>(_options);
|
||||
late List<CircumferenceModel> _value;
|
||||
try {
|
||||
_value = _result.data!
|
||||
.map((dynamic i) =>
|
||||
CircumferenceModel.fromJson(i as Map<String, dynamic>))
|
||||
.toList();
|
||||
} on Object catch (e, s) {
|
||||
errorLogger?.logError(e, s, _options);
|
||||
rethrow;
|
||||
}
|
||||
return _value;
|
||||
}
|
||||
|
||||
RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
|
||||
if (T != dynamic && !(requestOptions.responseType == ResponseType.bytes || requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T != dynamic &&
|
||||
!(requestOptions.responseType == ResponseType.bytes ||
|
||||
requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T == String) {
|
||||
requestOptions.responseType = ResponseType.plain;
|
||||
} else {
|
||||
|
||||
@@ -21,9 +21,7 @@ Ingredient _$IngredientFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Ingredient {
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
String get unit => throw _privateConstructorUsedError;
|
||||
|
||||
String get portion => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Ingredient to a JSON map.
|
||||
@@ -32,24 +30,26 @@ mixin _$Ingredient {
|
||||
/// Create a copy of Ingredient
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$IngredientCopyWith<Ingredient> get copyWith => throw _privateConstructorUsedError;
|
||||
$IngredientCopyWith<Ingredient> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $IngredientCopyWith<$Res> {
|
||||
factory $IngredientCopyWith(Ingredient value, $Res Function(Ingredient) then) = _$IngredientCopyWithImpl<$Res, Ingredient>;
|
||||
|
||||
factory $IngredientCopyWith(
|
||||
Ingredient value, $Res Function(Ingredient) then) =
|
||||
_$IngredientCopyWithImpl<$Res, Ingredient>;
|
||||
@useResult
|
||||
$Res call({String name, String unit, String portion});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient> implements $IngredientCopyWith<$Res> {
|
||||
class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient>
|
||||
implements $IngredientCopyWith<$Res> {
|
||||
_$IngredientCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -80,17 +80,23 @@ class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient> implements $Ingred
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$IngredientImplCopyWith<$Res> implements $IngredientCopyWith<$Res> {
|
||||
factory _$$IngredientImplCopyWith(_$IngredientImpl value, $Res Function(_$IngredientImpl) then) = __$$IngredientImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$IngredientImplCopyWith<$Res>
|
||||
implements $IngredientCopyWith<$Res> {
|
||||
factory _$$IngredientImplCopyWith(
|
||||
_$IngredientImpl value, $Res Function(_$IngredientImpl) then) =
|
||||
__$$IngredientImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String name, String unit, String portion});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$IngredientImplCopyWithImpl<$Res> extends _$IngredientCopyWithImpl<$Res, _$IngredientImpl> implements _$$IngredientImplCopyWith<$Res> {
|
||||
__$$IngredientImplCopyWithImpl(_$IngredientImpl _value, $Res Function(_$IngredientImpl) _then) : super(_value, _then);
|
||||
class __$$IngredientImplCopyWithImpl<$Res>
|
||||
extends _$IngredientCopyWithImpl<$Res, _$IngredientImpl>
|
||||
implements _$$IngredientImplCopyWith<$Res> {
|
||||
__$$IngredientImplCopyWithImpl(
|
||||
_$IngredientImpl _value, $Res Function(_$IngredientImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Ingredient
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -121,9 +127,11 @@ class __$$IngredientImplCopyWithImpl<$Res> extends _$IngredientCopyWithImpl<$Res
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$IngredientImpl implements _Ingredient {
|
||||
const _$IngredientImpl({required this.name, required this.unit, required this.portion});
|
||||
const _$IngredientImpl(
|
||||
{required this.name, required this.unit, required this.portion});
|
||||
|
||||
factory _$IngredientImpl.fromJson(Map<String, dynamic> json) => _$$IngredientImplFromJson(json);
|
||||
factory _$IngredientImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$IngredientImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String name;
|
||||
@@ -156,7 +164,8 @@ class _$IngredientImpl implements _Ingredient {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith => __$$IngredientImplCopyWithImpl<_$IngredientImpl>(this, _$identity);
|
||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
|
||||
__$$IngredientImplCopyWithImpl<_$IngredientImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -167,16 +176,18 @@ class _$IngredientImpl implements _Ingredient {
|
||||
}
|
||||
|
||||
abstract class _Ingredient implements Ingredient {
|
||||
const factory _Ingredient({required final String name, required final String unit, required final String portion}) = _$IngredientImpl;
|
||||
const factory _Ingredient(
|
||||
{required final String name,
|
||||
required final String unit,
|
||||
required final String portion}) = _$IngredientImpl;
|
||||
|
||||
factory _Ingredient.fromJson(Map<String, dynamic> json) = _$IngredientImpl.fromJson;
|
||||
factory _Ingredient.fromJson(Map<String, dynamic> json) =
|
||||
_$IngredientImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get name;
|
||||
|
||||
@override
|
||||
String get unit;
|
||||
|
||||
@override
|
||||
String get portion;
|
||||
|
||||
@@ -184,5 +195,6 @@ abstract class _Ingredient implements Ingredient {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,13 +6,15 @@ part of 'ingredient.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$IngredientImpl _$$IngredientImplFromJson(Map<String, dynamic> json) => _$IngredientImpl(
|
||||
_$IngredientImpl _$$IngredientImplFromJson(Map<String, dynamic> json) =>
|
||||
_$IngredientImpl(
|
||||
name: json['name'] as String,
|
||||
unit: json['unit'] as String,
|
||||
portion: json['portion'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$IngredientImplToJson(_$IngredientImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$IngredientImplToJson(_$IngredientImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'name': instance.name,
|
||||
'unit': instance.unit,
|
||||
'portion': instance.portion,
|
||||
|
||||
@@ -21,21 +21,13 @@ RecipeModel _$RecipeModelFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$RecipeModel {
|
||||
List<Ingredient?>? get ingredients => throw _privateConstructorUsedError;
|
||||
|
||||
List<Step?>? get steps => throw _privateConstructorUsedError;
|
||||
|
||||
String? get type => throw _privateConstructorUsedError;
|
||||
|
||||
String? get state => throw _privateConstructorUsedError;
|
||||
|
||||
String? get title => throw _privateConstructorUsedError;
|
||||
|
||||
String? get description => throw _privateConstructorUsedError;
|
||||
|
||||
String? get video_url => throw _privateConstructorUsedError;
|
||||
|
||||
String? get image => throw _privateConstructorUsedError;
|
||||
|
||||
int? get cooking_time => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this RecipeModel to a JSON map.
|
||||
@@ -44,13 +36,15 @@ mixin _$RecipeModel {
|
||||
/// Create a copy of RecipeModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$RecipeModelCopyWith<RecipeModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$RecipeModelCopyWith<RecipeModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $RecipeModelCopyWith<$Res> {
|
||||
factory $RecipeModelCopyWith(RecipeModel value, $Res Function(RecipeModel) then) = _$RecipeModelCopyWithImpl<$Res, RecipeModel>;
|
||||
|
||||
factory $RecipeModelCopyWith(
|
||||
RecipeModel value, $Res Function(RecipeModel) then) =
|
||||
_$RecipeModelCopyWithImpl<$Res, RecipeModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{List<Ingredient?>? ingredients,
|
||||
@@ -65,12 +59,12 @@ abstract class $RecipeModelCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$RecipeModelCopyWithImpl<$Res, $Val extends RecipeModel> implements $RecipeModelCopyWith<$Res> {
|
||||
class _$RecipeModelCopyWithImpl<$Res, $Val extends RecipeModel>
|
||||
implements $RecipeModelCopyWith<$Res> {
|
||||
_$RecipeModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -131,9 +125,11 @@ class _$RecipeModelCopyWithImpl<$Res, $Val extends RecipeModel> implements $Reci
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipeModelImplCopyWith<$Res> implements $RecipeModelCopyWith<$Res> {
|
||||
factory _$$RecipeModelImplCopyWith(_$RecipeModelImpl value, $Res Function(_$RecipeModelImpl) then) = __$$RecipeModelImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$RecipeModelImplCopyWith<$Res>
|
||||
implements $RecipeModelCopyWith<$Res> {
|
||||
factory _$$RecipeModelImplCopyWith(
|
||||
_$RecipeModelImpl value, $Res Function(_$RecipeModelImpl) then) =
|
||||
__$$RecipeModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -149,8 +145,12 @@ abstract class _$$RecipeModelImplCopyWith<$Res> implements $RecipeModelCopyWith<
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipeModelImplCopyWithImpl<$Res> extends _$RecipeModelCopyWithImpl<$Res, _$RecipeModelImpl> implements _$$RecipeModelImplCopyWith<$Res> {
|
||||
__$$RecipeModelImplCopyWithImpl(_$RecipeModelImpl _value, $Res Function(_$RecipeModelImpl) _then) : super(_value, _then);
|
||||
class __$$RecipeModelImplCopyWithImpl<$Res>
|
||||
extends _$RecipeModelCopyWithImpl<$Res, _$RecipeModelImpl>
|
||||
implements _$$RecipeModelImplCopyWith<$Res> {
|
||||
__$$RecipeModelImplCopyWithImpl(
|
||||
_$RecipeModelImpl _value, $Res Function(_$RecipeModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of RecipeModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -224,10 +224,10 @@ class _$RecipeModelImpl implements _RecipeModel {
|
||||
: _ingredients = ingredients,
|
||||
_steps = steps;
|
||||
|
||||
factory _$RecipeModelImpl.fromJson(Map<String, dynamic> json) => _$$RecipeModelImplFromJson(json);
|
||||
factory _$RecipeModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$RecipeModelImplFromJson(json);
|
||||
|
||||
final List<Ingredient?>? _ingredients;
|
||||
|
||||
@override
|
||||
List<Ingredient?>? get ingredients {
|
||||
final value = _ingredients;
|
||||
@@ -238,7 +238,6 @@ class _$RecipeModelImpl implements _RecipeModel {
|
||||
}
|
||||
|
||||
final List<Step?>? _steps;
|
||||
|
||||
@override
|
||||
List<Step?>? get steps {
|
||||
final value = _steps;
|
||||
@@ -273,28 +272,42 @@ class _$RecipeModelImpl implements _RecipeModel {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipeModelImpl &&
|
||||
const DeepCollectionEquality().equals(other._ingredients, _ingredients) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._ingredients, _ingredients) &&
|
||||
const DeepCollectionEquality().equals(other._steps, _steps) &&
|
||||
(identical(other.type, type) || other.type == type) &&
|
||||
(identical(other.state, state) || other.state == state) &&
|
||||
(identical(other.title, title) || other.title == title) &&
|
||||
(identical(other.description, description) || other.description == description) &&
|
||||
(identical(other.video_url, video_url) || other.video_url == video_url) &&
|
||||
(identical(other.description, description) ||
|
||||
other.description == description) &&
|
||||
(identical(other.video_url, video_url) ||
|
||||
other.video_url == video_url) &&
|
||||
(identical(other.image, image) || other.image == image) &&
|
||||
(identical(other.cooking_time, cooking_time) || other.cooking_time == cooking_time));
|
||||
(identical(other.cooking_time, cooking_time) ||
|
||||
other.cooking_time == cooking_time));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_ingredients), const DeepCollectionEquality().hash(_steps), type, state,
|
||||
title, description, video_url, image, cooking_time);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
const DeepCollectionEquality().hash(_ingredients),
|
||||
const DeepCollectionEquality().hash(_steps),
|
||||
type,
|
||||
state,
|
||||
title,
|
||||
description,
|
||||
video_url,
|
||||
image,
|
||||
cooking_time);
|
||||
|
||||
/// Create a copy of RecipeModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipeModelImplCopyWith<_$RecipeModelImpl> get copyWith => __$$RecipeModelImplCopyWithImpl<_$RecipeModelImpl>(this, _$identity);
|
||||
_$$RecipeModelImplCopyWith<_$RecipeModelImpl> get copyWith =>
|
||||
__$$RecipeModelImplCopyWithImpl<_$RecipeModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -316,32 +329,25 @@ abstract class _RecipeModel implements RecipeModel {
|
||||
final String? image,
|
||||
final int? cooking_time}) = _$RecipeModelImpl;
|
||||
|
||||
factory _RecipeModel.fromJson(Map<String, dynamic> json) = _$RecipeModelImpl.fromJson;
|
||||
factory _RecipeModel.fromJson(Map<String, dynamic> json) =
|
||||
_$RecipeModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
List<Ingredient?>? get ingredients;
|
||||
|
||||
@override
|
||||
List<Step?>? get steps;
|
||||
|
||||
@override
|
||||
String? get type;
|
||||
|
||||
@override
|
||||
String? get state;
|
||||
|
||||
@override
|
||||
String? get title;
|
||||
|
||||
@override
|
||||
String? get description;
|
||||
|
||||
@override
|
||||
String? get video_url;
|
||||
|
||||
@override
|
||||
String? get image;
|
||||
|
||||
@override
|
||||
int? get cooking_time;
|
||||
|
||||
@@ -349,5 +355,6 @@ abstract class _RecipeModel implements RecipeModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipeModelImplCopyWith<_$RecipeModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$RecipeModelImplCopyWith<_$RecipeModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,9 +6,16 @@ part of 'recipe_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$RecipeModelImpl _$$RecipeModelImplFromJson(Map<String, dynamic> json) => _$RecipeModelImpl(
|
||||
ingredients: (json['ingredients'] as List<dynamic>?)?.map((e) => e == null ? null : Ingredient.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
steps: (json['steps'] as List<dynamic>?)?.map((e) => e == null ? null : Step.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
_$RecipeModelImpl _$$RecipeModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$RecipeModelImpl(
|
||||
ingredients: (json['ingredients'] as List<dynamic>?)
|
||||
?.map((e) =>
|
||||
e == null ? null : Ingredient.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
steps: (json['steps'] as List<dynamic>?)
|
||||
?.map((e) =>
|
||||
e == null ? null : Step.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
type: json['type'] as String?,
|
||||
state: json['state'] as String?,
|
||||
title: json['title'] as String?,
|
||||
@@ -18,7 +25,8 @@ _$RecipeModelImpl _$$RecipeModelImplFromJson(Map<String, dynamic> json) => _$Rec
|
||||
cooking_time: (json['cooking_time'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$RecipeModelImplToJson(_$RecipeModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$RecipeModelImplToJson(_$RecipeModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'ingredients': instance.ingredients,
|
||||
'steps': instance.steps,
|
||||
'type': instance.type,
|
||||
|
||||
@@ -22,10 +22,8 @@ RecipeTagModel _$RecipeTagModelFromJson(Map<String, dynamic> json) {
|
||||
mixin _$RecipeTagModel {
|
||||
@JsonKey(name: "data")
|
||||
List<RecipeTag> get data => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "links")
|
||||
Links get links => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "meta")
|
||||
Meta get meta => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -35,28 +33,32 @@ mixin _$RecipeTagModel {
|
||||
/// Create a copy of RecipeTagModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$RecipeTagModelCopyWith<RecipeTagModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$RecipeTagModelCopyWith<RecipeTagModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $RecipeTagModelCopyWith<$Res> {
|
||||
factory $RecipeTagModelCopyWith(RecipeTagModel value, $Res Function(RecipeTagModel) then) = _$RecipeTagModelCopyWithImpl<$Res, RecipeTagModel>;
|
||||
|
||||
factory $RecipeTagModelCopyWith(
|
||||
RecipeTagModel value, $Res Function(RecipeTagModel) then) =
|
||||
_$RecipeTagModelCopyWithImpl<$Res, RecipeTagModel>;
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "data") List<RecipeTag> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
|
||||
$Res call(
|
||||
{@JsonKey(name: "data") List<RecipeTag> data,
|
||||
@JsonKey(name: "links") Links links,
|
||||
@JsonKey(name: "meta") Meta meta});
|
||||
|
||||
$LinksCopyWith<$Res> get links;
|
||||
|
||||
$MetaCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$RecipeTagModelCopyWithImpl<$Res, $Val extends RecipeTagModel> implements $RecipeTagModelCopyWith<$Res> {
|
||||
class _$RecipeTagModelCopyWithImpl<$Res, $Val extends RecipeTagModel>
|
||||
implements $RecipeTagModelCopyWith<$Res> {
|
||||
_$RecipeTagModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -107,23 +109,31 @@ class _$RecipeTagModelCopyWithImpl<$Res, $Val extends RecipeTagModel> implements
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipeTagModelImplCopyWith<$Res> implements $RecipeTagModelCopyWith<$Res> {
|
||||
factory _$$RecipeTagModelImplCopyWith(_$RecipeTagModelImpl value, $Res Function(_$RecipeTagModelImpl) then) = __$$RecipeTagModelImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$RecipeTagModelImplCopyWith<$Res>
|
||||
implements $RecipeTagModelCopyWith<$Res> {
|
||||
factory _$$RecipeTagModelImplCopyWith(_$RecipeTagModelImpl value,
|
||||
$Res Function(_$RecipeTagModelImpl) then) =
|
||||
__$$RecipeTagModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "data") List<RecipeTag> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
|
||||
$Res call(
|
||||
{@JsonKey(name: "data") List<RecipeTag> data,
|
||||
@JsonKey(name: "links") Links links,
|
||||
@JsonKey(name: "meta") Meta meta});
|
||||
|
||||
@override
|
||||
$LinksCopyWith<$Res> get links;
|
||||
|
||||
@override
|
||||
$MetaCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipeTagModelImplCopyWithImpl<$Res> extends _$RecipeTagModelCopyWithImpl<$Res, _$RecipeTagModelImpl> implements _$$RecipeTagModelImplCopyWith<$Res> {
|
||||
__$$RecipeTagModelImplCopyWithImpl(_$RecipeTagModelImpl _value, $Res Function(_$RecipeTagModelImpl) _then) : super(_value, _then);
|
||||
class __$$RecipeTagModelImplCopyWithImpl<$Res>
|
||||
extends _$RecipeTagModelCopyWithImpl<$Res, _$RecipeTagModelImpl>
|
||||
implements _$$RecipeTagModelImplCopyWith<$Res> {
|
||||
__$$RecipeTagModelImplCopyWithImpl(
|
||||
_$RecipeTagModelImpl _value, $Res Function(_$RecipeTagModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of RecipeTagModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -155,13 +165,15 @@ class __$$RecipeTagModelImplCopyWithImpl<$Res> extends _$RecipeTagModelCopyWithI
|
||||
@JsonSerializable()
|
||||
class _$RecipeTagModelImpl implements _RecipeTagModel {
|
||||
const _$RecipeTagModelImpl(
|
||||
{@JsonKey(name: "data") required final List<RecipeTag> data, @JsonKey(name: "links") required this.links, @JsonKey(name: "meta") required this.meta})
|
||||
{@JsonKey(name: "data") required final List<RecipeTag> data,
|
||||
@JsonKey(name: "links") required this.links,
|
||||
@JsonKey(name: "meta") required this.meta})
|
||||
: _data = data;
|
||||
|
||||
factory _$RecipeTagModelImpl.fromJson(Map<String, dynamic> json) => _$$RecipeTagModelImplFromJson(json);
|
||||
factory _$RecipeTagModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$RecipeTagModelImplFromJson(json);
|
||||
|
||||
final List<RecipeTag> _data;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "data")
|
||||
List<RecipeTag> get data {
|
||||
@@ -194,14 +206,17 @@ class _$RecipeTagModelImpl implements _RecipeTagModel {
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
||||
|
||||
/// Create a copy of RecipeTagModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith => __$$RecipeTagModelImplCopyWithImpl<_$RecipeTagModelImpl>(this, _$identity);
|
||||
_$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith =>
|
||||
__$$RecipeTagModelImplCopyWithImpl<_$RecipeTagModelImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -217,16 +232,15 @@ abstract class _RecipeTagModel implements RecipeTagModel {
|
||||
@JsonKey(name: "links") required final Links links,
|
||||
@JsonKey(name: "meta") required final Meta meta}) = _$RecipeTagModelImpl;
|
||||
|
||||
factory _RecipeTagModel.fromJson(Map<String, dynamic> json) = _$RecipeTagModelImpl.fromJson;
|
||||
factory _RecipeTagModel.fromJson(Map<String, dynamic> json) =
|
||||
_$RecipeTagModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "data")
|
||||
List<RecipeTag> get data;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "links")
|
||||
Links get links;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "meta")
|
||||
Meta get meta;
|
||||
@@ -235,7 +249,8 @@ abstract class _RecipeTagModel implements RecipeTagModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
RecipeTag _$RecipeTagFromJson(Map<String, dynamic> json) {
|
||||
@@ -246,16 +261,12 @@ RecipeTag _$RecipeTagFromJson(Map<String, dynamic> json) {
|
||||
mixin _$RecipeTag {
|
||||
@JsonKey(name: "id")
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "name")
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "recipes_count")
|
||||
int get recipesCount => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -265,13 +276,14 @@ mixin _$RecipeTag {
|
||||
/// Create a copy of RecipeTag
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$RecipeTagCopyWith<RecipeTag> get copyWith => throw _privateConstructorUsedError;
|
||||
$RecipeTagCopyWith<RecipeTag> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $RecipeTagCopyWith<$Res> {
|
||||
factory $RecipeTagCopyWith(RecipeTag value, $Res Function(RecipeTag) then) = _$RecipeTagCopyWithImpl<$Res, RecipeTag>;
|
||||
|
||||
factory $RecipeTagCopyWith(RecipeTag value, $Res Function(RecipeTag) then) =
|
||||
_$RecipeTagCopyWithImpl<$Res, RecipeTag>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "id") int id,
|
||||
@@ -282,12 +294,12 @@ abstract class $RecipeTagCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$RecipeTagCopyWithImpl<$Res, $Val extends RecipeTag> implements $RecipeTagCopyWith<$Res> {
|
||||
class _$RecipeTagCopyWithImpl<$Res, $Val extends RecipeTag>
|
||||
implements $RecipeTagCopyWith<$Res> {
|
||||
_$RecipeTagCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -328,9 +340,11 @@ class _$RecipeTagCopyWithImpl<$Res, $Val extends RecipeTag> implements $RecipeTa
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipeTagImplCopyWith<$Res> implements $RecipeTagCopyWith<$Res> {
|
||||
factory _$$RecipeTagImplCopyWith(_$RecipeTagImpl value, $Res Function(_$RecipeTagImpl) then) = __$$RecipeTagImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$RecipeTagImplCopyWith<$Res>
|
||||
implements $RecipeTagCopyWith<$Res> {
|
||||
factory _$$RecipeTagImplCopyWith(
|
||||
_$RecipeTagImpl value, $Res Function(_$RecipeTagImpl) then) =
|
||||
__$$RecipeTagImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -342,8 +356,12 @@ abstract class _$$RecipeTagImplCopyWith<$Res> implements $RecipeTagCopyWith<$Res
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipeTagImplCopyWithImpl<$Res> extends _$RecipeTagCopyWithImpl<$Res, _$RecipeTagImpl> implements _$$RecipeTagImplCopyWith<$Res> {
|
||||
__$$RecipeTagImplCopyWithImpl(_$RecipeTagImpl _value, $Res Function(_$RecipeTagImpl) _then) : super(_value, _then);
|
||||
class __$$RecipeTagImplCopyWithImpl<$Res>
|
||||
extends _$RecipeTagCopyWithImpl<$Res, _$RecipeTagImpl>
|
||||
implements _$$RecipeTagImplCopyWith<$Res> {
|
||||
__$$RecipeTagImplCopyWithImpl(
|
||||
_$RecipeTagImpl _value, $Res Function(_$RecipeTagImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of RecipeTag
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -391,7 +409,8 @@ class _$RecipeTagImpl implements _RecipeTag {
|
||||
@JsonKey(name: "created_at") required this.createdAt,
|
||||
@JsonKey(name: "updated_at") required this.updatedAt});
|
||||
|
||||
factory _$RecipeTagImpl.fromJson(Map<String, dynamic> json) => _$$RecipeTagImplFromJson(json);
|
||||
factory _$RecipeTagImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$RecipeTagImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
@@ -421,21 +440,26 @@ class _$RecipeTagImpl implements _RecipeTag {
|
||||
other is _$RecipeTagImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
(identical(other.recipesCount, recipesCount) || other.recipesCount == recipesCount) &&
|
||||
(identical(other.createdAt, createdAt) || other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
|
||||
(identical(other.recipesCount, recipesCount) ||
|
||||
other.recipesCount == recipesCount) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, name, recipesCount, createdAt, updatedAt);
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, id, name, recipesCount, createdAt, updatedAt);
|
||||
|
||||
/// Create a copy of RecipeTag
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipeTagImplCopyWith<_$RecipeTagImpl> get copyWith => __$$RecipeTagImplCopyWithImpl<_$RecipeTagImpl>(this, _$identity);
|
||||
_$$RecipeTagImplCopyWith<_$RecipeTagImpl> get copyWith =>
|
||||
__$$RecipeTagImplCopyWithImpl<_$RecipeTagImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -447,30 +471,28 @@ class _$RecipeTagImpl implements _RecipeTag {
|
||||
|
||||
abstract class _RecipeTag implements RecipeTag {
|
||||
const factory _RecipeTag(
|
||||
{@JsonKey(name: "id") required final int id,
|
||||
@JsonKey(name: "name") required final String name,
|
||||
@JsonKey(name: "recipes_count") required final int recipesCount,
|
||||
@JsonKey(name: "created_at") required final DateTime createdAt,
|
||||
@JsonKey(name: "updated_at") required final DateTime updatedAt}) = _$RecipeTagImpl;
|
||||
{@JsonKey(name: "id") required final int id,
|
||||
@JsonKey(name: "name") required final String name,
|
||||
@JsonKey(name: "recipes_count") required final int recipesCount,
|
||||
@JsonKey(name: "created_at") required final DateTime createdAt,
|
||||
@JsonKey(name: "updated_at") required final DateTime updatedAt}) =
|
||||
_$RecipeTagImpl;
|
||||
|
||||
factory _RecipeTag.fromJson(Map<String, dynamic> json) = _$RecipeTagImpl.fromJson;
|
||||
factory _RecipeTag.fromJson(Map<String, dynamic> json) =
|
||||
_$RecipeTagImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
int get id;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "name")
|
||||
String get name;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "recipes_count")
|
||||
int get recipesCount;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt;
|
||||
@@ -479,5 +501,6 @@ abstract class _RecipeTag implements RecipeTag {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipeTagImplCopyWith<_$RecipeTagImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$RecipeTagImplCopyWith<_$RecipeTagImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,19 +6,25 @@ part of 'recipe_tag_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$RecipeTagModelImpl _$$RecipeTagModelImplFromJson(Map<String, dynamic> json) => _$RecipeTagModelImpl(
|
||||
data: (json['data'] as List<dynamic>).map((e) => RecipeTag.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
_$RecipeTagModelImpl _$$RecipeTagModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$RecipeTagModelImpl(
|
||||
data: (json['data'] as List<dynamic>)
|
||||
.map((e) => RecipeTag.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
links: Links.fromJson(json['links'] as Map<String, dynamic>),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$RecipeTagModelImplToJson(_$RecipeTagModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$RecipeTagModelImplToJson(
|
||||
_$RecipeTagModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.data,
|
||||
'links': instance.links,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
_$RecipeTagImpl _$$RecipeTagImplFromJson(Map<String, dynamic> json) => _$RecipeTagImpl(
|
||||
_$RecipeTagImpl _$$RecipeTagImplFromJson(Map<String, dynamic> json) =>
|
||||
_$RecipeTagImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
name: json['name'] as String,
|
||||
recipesCount: (json['recipes_count'] as num).toInt(),
|
||||
@@ -26,7 +32,8 @@ _$RecipeTagImpl _$$RecipeTagImplFromJson(Map<String, dynamic> json) => _$RecipeT
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$RecipeTagImplToJson(_$RecipeTagImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$RecipeTagImplToJson(_$RecipeTagImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'recipes_count': instance.recipesCount,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user