forked from eatvio/eatvio_app
refactor: profile model
This commit is contained in:
@@ -84,6 +84,9 @@ class _$InitializationStateCopyWithImpl<$Res, $Val extends InitializationState>
|
|||||||
final $Val _value;
|
final $Val _value;
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of InitializationState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -100,6 +103,9 @@ class __$$InitializationStateImplCopyWithImpl<$Res>
|
|||||||
__$$InitializationStateImplCopyWithImpl(_$InitializationStateImpl _value,
|
__$$InitializationStateImplCopyWithImpl(_$InitializationStateImpl _value,
|
||||||
$Res Function(_$InitializationStateImpl) _then)
|
$Res Function(_$InitializationStateImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of InitializationState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -218,6 +224,9 @@ class __$$InitializationStateLoadingImplCopyWithImpl<$Res>
|
|||||||
_$InitializationStateLoadingImpl _value,
|
_$InitializationStateLoadingImpl _value,
|
||||||
$Res Function(_$InitializationStateLoadingImpl) _then)
|
$Res Function(_$InitializationStateLoadingImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of InitializationState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -339,6 +348,8 @@ class __$$InitializationStateSuccessImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$InitializationStateSuccessImpl) _then)
|
$Res Function(_$InitializationStateSuccessImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of InitializationState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -377,7 +388,9 @@ class _$InitializationStateSuccessImpl implements InitializationStateSuccess {
|
|||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, client);
|
int get hashCode => Object.hash(runtimeType, client);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of InitializationState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl>
|
_$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl>
|
||||||
@@ -465,7 +478,10 @@ abstract class InitializationStateSuccess implements InitializationState {
|
|||||||
_$InitializationStateSuccessImpl;
|
_$InitializationStateSuccessImpl;
|
||||||
|
|
||||||
PusherChannelsClient get client;
|
PusherChannelsClient get client;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of InitializationState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl>
|
_$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl>
|
||||||
get copyWith => throw _privateConstructorUsedError;
|
get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -490,6 +506,8 @@ class __$$InitializationStateErrorImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$InitializationStateErrorImpl) _then)
|
$Res Function(_$InitializationStateErrorImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of InitializationState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -529,7 +547,9 @@ class _$InitializationStateErrorImpl implements InitializationStateError {
|
|||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, errorMessage);
|
int get hashCode => Object.hash(runtimeType, errorMessage);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of InitializationState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl>
|
_$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl>
|
||||||
@@ -616,7 +636,10 @@ abstract class InitializationStateError implements InitializationState {
|
|||||||
_$InitializationStateErrorImpl;
|
_$InitializationStateErrorImpl;
|
||||||
|
|
||||||
String get errorMessage;
|
String get errorMessage;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of InitializationState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl>
|
_$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl>
|
||||||
get copyWith => throw _privateConstructorUsedError;
|
get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class Meta with _$Meta {
|
|||||||
@JsonKey(name: "from") required dynamic from,
|
@JsonKey(name: "from") required dynamic from,
|
||||||
@JsonKey(name: "last_page") required int lastPage,
|
@JsonKey(name: "last_page") required int lastPage,
|
||||||
@JsonKey(name: "links") required List<Link> links,
|
@JsonKey(name: "links") required List<Link> links,
|
||||||
@JsonKey(name: "path") required String path,
|
@JsonKey(name: "path") String? path,
|
||||||
@JsonKey(name: "per_page") required int perPage,
|
@JsonKey(name: "per_page") required int perPage,
|
||||||
@JsonKey(name: "to") required dynamic to,
|
@JsonKey(name: "to") required dynamic to,
|
||||||
@JsonKey(name: "total") required int total,
|
@JsonKey(name: "total") required int total,
|
||||||
@@ -34,9 +34,9 @@ class Meta with _$Meta {
|
|||||||
@freezed
|
@freezed
|
||||||
class Link with _$Link {
|
class Link with _$Link {
|
||||||
const factory Link({
|
const factory Link({
|
||||||
@JsonKey(name: "url") required String? url,
|
@JsonKey(name: "url") String? url,
|
||||||
@JsonKey(name: "label") required String label,
|
@JsonKey(name: "label") String? label,
|
||||||
@JsonKey(name: "active") required bool active,
|
@JsonKey(name: "active") bool? active,
|
||||||
}) = _Link;
|
}) = _Link;
|
||||||
|
|
||||||
factory Link.fromJson(Map<String, Object?> json) => _$LinkFromJson(json);
|
factory Link.fromJson(Map<String, Object?> json) => _$LinkFromJson(json);
|
||||||
|
|||||||
@@ -29,8 +29,12 @@ mixin _$Links {
|
|||||||
@JsonKey(name: "next")
|
@JsonKey(name: "next")
|
||||||
dynamic get next => throw _privateConstructorUsedError;
|
dynamic get next => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this Links to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of Links
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
$LinksCopyWith<Links> get copyWith => throw _privateConstructorUsedError;
|
$LinksCopyWith<Links> get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,6 +60,8 @@ class _$LinksCopyWithImpl<$Res, $Val extends Links>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of Links
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -107,6 +113,8 @@ class __$$LinksImplCopyWithImpl<$Res>
|
|||||||
_$LinksImpl _value, $Res Function(_$LinksImpl) _then)
|
_$LinksImpl _value, $Res Function(_$LinksImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of Links
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -177,7 +185,7 @@ class _$LinksImpl implements _Links {
|
|||||||
const DeepCollectionEquality().equals(other.next, next));
|
const DeepCollectionEquality().equals(other.next, next));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(
|
int get hashCode => Object.hash(
|
||||||
runtimeType,
|
runtimeType,
|
||||||
@@ -186,7 +194,9 @@ class _$LinksImpl implements _Links {
|
|||||||
const DeepCollectionEquality().hash(prev),
|
const DeepCollectionEquality().hash(prev),
|
||||||
const DeepCollectionEquality().hash(next));
|
const DeepCollectionEquality().hash(next));
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of Links
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$LinksImplCopyWith<_$LinksImpl> get copyWith =>
|
_$$LinksImplCopyWith<_$LinksImpl> get copyWith =>
|
||||||
@@ -221,8 +231,11 @@ abstract class _Links implements Links {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: "next")
|
@JsonKey(name: "next")
|
||||||
dynamic get next;
|
dynamic get next;
|
||||||
|
|
||||||
|
/// Create a copy of Links
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$LinksImplCopyWith<_$LinksImpl> get copyWith =>
|
_$$LinksImplCopyWith<_$LinksImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -242,7 +255,7 @@ mixin _$Meta {
|
|||||||
@JsonKey(name: "links")
|
@JsonKey(name: "links")
|
||||||
List<Link> get links => throw _privateConstructorUsedError;
|
List<Link> get links => throw _privateConstructorUsedError;
|
||||||
@JsonKey(name: "path")
|
@JsonKey(name: "path")
|
||||||
String get path => throw _privateConstructorUsedError;
|
String? get path => throw _privateConstructorUsedError;
|
||||||
@JsonKey(name: "per_page")
|
@JsonKey(name: "per_page")
|
||||||
int get perPage => throw _privateConstructorUsedError;
|
int get perPage => throw _privateConstructorUsedError;
|
||||||
@JsonKey(name: "to")
|
@JsonKey(name: "to")
|
||||||
@@ -250,8 +263,12 @@ mixin _$Meta {
|
|||||||
@JsonKey(name: "total")
|
@JsonKey(name: "total")
|
||||||
int get total => throw _privateConstructorUsedError;
|
int get total => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this Meta to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of Meta
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
$MetaCopyWith<Meta> get copyWith => throw _privateConstructorUsedError;
|
$MetaCopyWith<Meta> get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -265,7 +282,7 @@ abstract class $MetaCopyWith<$Res> {
|
|||||||
@JsonKey(name: "from") dynamic from,
|
@JsonKey(name: "from") dynamic from,
|
||||||
@JsonKey(name: "last_page") int lastPage,
|
@JsonKey(name: "last_page") int lastPage,
|
||||||
@JsonKey(name: "links") List<Link> links,
|
@JsonKey(name: "links") List<Link> links,
|
||||||
@JsonKey(name: "path") String path,
|
@JsonKey(name: "path") String? path,
|
||||||
@JsonKey(name: "per_page") int perPage,
|
@JsonKey(name: "per_page") int perPage,
|
||||||
@JsonKey(name: "to") dynamic to,
|
@JsonKey(name: "to") dynamic to,
|
||||||
@JsonKey(name: "total") int total});
|
@JsonKey(name: "total") int total});
|
||||||
@@ -281,6 +298,8 @@ class _$MetaCopyWithImpl<$Res, $Val extends Meta>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of Meta
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -288,7 +307,7 @@ class _$MetaCopyWithImpl<$Res, $Val extends Meta>
|
|||||||
Object? from = freezed,
|
Object? from = freezed,
|
||||||
Object? lastPage = null,
|
Object? lastPage = null,
|
||||||
Object? links = null,
|
Object? links = null,
|
||||||
Object? path = null,
|
Object? path = freezed,
|
||||||
Object? perPage = null,
|
Object? perPage = null,
|
||||||
Object? to = freezed,
|
Object? to = freezed,
|
||||||
Object? total = null,
|
Object? total = null,
|
||||||
@@ -310,10 +329,10 @@ class _$MetaCopyWithImpl<$Res, $Val extends Meta>
|
|||||||
? _value.links
|
? _value.links
|
||||||
: links // ignore: cast_nullable_to_non_nullable
|
: links // ignore: cast_nullable_to_non_nullable
|
||||||
as List<Link>,
|
as List<Link>,
|
||||||
path: null == path
|
path: freezed == path
|
||||||
? _value.path
|
? _value.path
|
||||||
: path // ignore: cast_nullable_to_non_nullable
|
: path // ignore: cast_nullable_to_non_nullable
|
||||||
as String,
|
as String?,
|
||||||
perPage: null == perPage
|
perPage: null == perPage
|
||||||
? _value.perPage
|
? _value.perPage
|
||||||
: perPage // ignore: cast_nullable_to_non_nullable
|
: perPage // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -342,7 +361,7 @@ abstract class _$$MetaImplCopyWith<$Res> implements $MetaCopyWith<$Res> {
|
|||||||
@JsonKey(name: "from") dynamic from,
|
@JsonKey(name: "from") dynamic from,
|
||||||
@JsonKey(name: "last_page") int lastPage,
|
@JsonKey(name: "last_page") int lastPage,
|
||||||
@JsonKey(name: "links") List<Link> links,
|
@JsonKey(name: "links") List<Link> links,
|
||||||
@JsonKey(name: "path") String path,
|
@JsonKey(name: "path") String? path,
|
||||||
@JsonKey(name: "per_page") int perPage,
|
@JsonKey(name: "per_page") int perPage,
|
||||||
@JsonKey(name: "to") dynamic to,
|
@JsonKey(name: "to") dynamic to,
|
||||||
@JsonKey(name: "total") int total});
|
@JsonKey(name: "total") int total});
|
||||||
@@ -355,6 +374,8 @@ class __$$MetaImplCopyWithImpl<$Res>
|
|||||||
__$$MetaImplCopyWithImpl(_$MetaImpl _value, $Res Function(_$MetaImpl) _then)
|
__$$MetaImplCopyWithImpl(_$MetaImpl _value, $Res Function(_$MetaImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of Meta
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -362,7 +383,7 @@ class __$$MetaImplCopyWithImpl<$Res>
|
|||||||
Object? from = freezed,
|
Object? from = freezed,
|
||||||
Object? lastPage = null,
|
Object? lastPage = null,
|
||||||
Object? links = null,
|
Object? links = null,
|
||||||
Object? path = null,
|
Object? path = freezed,
|
||||||
Object? perPage = null,
|
Object? perPage = null,
|
||||||
Object? to = freezed,
|
Object? to = freezed,
|
||||||
Object? total = null,
|
Object? total = null,
|
||||||
@@ -384,10 +405,10 @@ class __$$MetaImplCopyWithImpl<$Res>
|
|||||||
? _value._links
|
? _value._links
|
||||||
: links // ignore: cast_nullable_to_non_nullable
|
: links // ignore: cast_nullable_to_non_nullable
|
||||||
as List<Link>,
|
as List<Link>,
|
||||||
path: null == path
|
path: freezed == path
|
||||||
? _value.path
|
? _value.path
|
||||||
: path // ignore: cast_nullable_to_non_nullable
|
: path // ignore: cast_nullable_to_non_nullable
|
||||||
as String,
|
as String?,
|
||||||
perPage: null == perPage
|
perPage: null == perPage
|
||||||
? _value.perPage
|
? _value.perPage
|
||||||
: perPage // ignore: cast_nullable_to_non_nullable
|
: perPage // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -412,7 +433,7 @@ class _$MetaImpl implements _Meta {
|
|||||||
@JsonKey(name: "from") required this.from,
|
@JsonKey(name: "from") required this.from,
|
||||||
@JsonKey(name: "last_page") required this.lastPage,
|
@JsonKey(name: "last_page") required this.lastPage,
|
||||||
@JsonKey(name: "links") required final List<Link> links,
|
@JsonKey(name: "links") required final List<Link> links,
|
||||||
@JsonKey(name: "path") required this.path,
|
@JsonKey(name: "path") this.path,
|
||||||
@JsonKey(name: "per_page") required this.perPage,
|
@JsonKey(name: "per_page") required this.perPage,
|
||||||
@JsonKey(name: "to") required this.to,
|
@JsonKey(name: "to") required this.to,
|
||||||
@JsonKey(name: "total") required this.total})
|
@JsonKey(name: "total") required this.total})
|
||||||
@@ -441,7 +462,7 @@ class _$MetaImpl implements _Meta {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
@JsonKey(name: "path")
|
@JsonKey(name: "path")
|
||||||
final String path;
|
final String? path;
|
||||||
@override
|
@override
|
||||||
@JsonKey(name: "per_page")
|
@JsonKey(name: "per_page")
|
||||||
final int perPage;
|
final int perPage;
|
||||||
@@ -474,7 +495,7 @@ class _$MetaImpl implements _Meta {
|
|||||||
(identical(other.total, total) || other.total == total));
|
(identical(other.total, total) || other.total == total));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(
|
int get hashCode => Object.hash(
|
||||||
runtimeType,
|
runtimeType,
|
||||||
@@ -487,7 +508,9 @@ class _$MetaImpl implements _Meta {
|
|||||||
const DeepCollectionEquality().hash(to),
|
const DeepCollectionEquality().hash(to),
|
||||||
total);
|
total);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of Meta
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$MetaImplCopyWith<_$MetaImpl> get copyWith =>
|
_$$MetaImplCopyWith<_$MetaImpl> get copyWith =>
|
||||||
@@ -507,7 +530,7 @@ abstract class _Meta implements Meta {
|
|||||||
@JsonKey(name: "from") required final dynamic from,
|
@JsonKey(name: "from") required final dynamic from,
|
||||||
@JsonKey(name: "last_page") required final int lastPage,
|
@JsonKey(name: "last_page") required final int lastPage,
|
||||||
@JsonKey(name: "links") required final List<Link> links,
|
@JsonKey(name: "links") required final List<Link> links,
|
||||||
@JsonKey(name: "path") required final String path,
|
@JsonKey(name: "path") final String? path,
|
||||||
@JsonKey(name: "per_page") required final int perPage,
|
@JsonKey(name: "per_page") required final int perPage,
|
||||||
@JsonKey(name: "to") required final dynamic to,
|
@JsonKey(name: "to") required final dynamic to,
|
||||||
@JsonKey(name: "total") required final int total}) = _$MetaImpl;
|
@JsonKey(name: "total") required final int total}) = _$MetaImpl;
|
||||||
@@ -528,7 +551,7 @@ abstract class _Meta implements Meta {
|
|||||||
List<Link> get links;
|
List<Link> get links;
|
||||||
@override
|
@override
|
||||||
@JsonKey(name: "path")
|
@JsonKey(name: "path")
|
||||||
String get path;
|
String? get path;
|
||||||
@override
|
@override
|
||||||
@JsonKey(name: "per_page")
|
@JsonKey(name: "per_page")
|
||||||
int get perPage;
|
int get perPage;
|
||||||
@@ -538,8 +561,11 @@ abstract class _Meta implements Meta {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: "total")
|
@JsonKey(name: "total")
|
||||||
int get total;
|
int get total;
|
||||||
|
|
||||||
|
/// Create a copy of Meta
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$MetaImplCopyWith<_$MetaImpl> get copyWith =>
|
_$$MetaImplCopyWith<_$MetaImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -553,12 +579,16 @@ mixin _$Link {
|
|||||||
@JsonKey(name: "url")
|
@JsonKey(name: "url")
|
||||||
String? get url => throw _privateConstructorUsedError;
|
String? get url => throw _privateConstructorUsedError;
|
||||||
@JsonKey(name: "label")
|
@JsonKey(name: "label")
|
||||||
String get label => throw _privateConstructorUsedError;
|
String? get label => throw _privateConstructorUsedError;
|
||||||
@JsonKey(name: "active")
|
@JsonKey(name: "active")
|
||||||
bool get active => throw _privateConstructorUsedError;
|
bool? get active => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this Link to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of Link
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
$LinkCopyWith<Link> get copyWith => throw _privateConstructorUsedError;
|
$LinkCopyWith<Link> get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -569,8 +599,8 @@ abstract class $LinkCopyWith<$Res> {
|
|||||||
@useResult
|
@useResult
|
||||||
$Res call(
|
$Res call(
|
||||||
{@JsonKey(name: "url") String? url,
|
{@JsonKey(name: "url") String? url,
|
||||||
@JsonKey(name: "label") String label,
|
@JsonKey(name: "label") String? label,
|
||||||
@JsonKey(name: "active") bool active});
|
@JsonKey(name: "active") bool? active});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -583,26 +613,28 @@ class _$LinkCopyWithImpl<$Res, $Val extends Link>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of Link
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
Object? url = freezed,
|
Object? url = freezed,
|
||||||
Object? label = null,
|
Object? label = freezed,
|
||||||
Object? active = null,
|
Object? active = freezed,
|
||||||
}) {
|
}) {
|
||||||
return _then(_value.copyWith(
|
return _then(_value.copyWith(
|
||||||
url: freezed == url
|
url: freezed == url
|
||||||
? _value.url
|
? _value.url
|
||||||
: url // ignore: cast_nullable_to_non_nullable
|
: url // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,
|
as String?,
|
||||||
label: null == label
|
label: freezed == label
|
||||||
? _value.label
|
? _value.label
|
||||||
: label // ignore: cast_nullable_to_non_nullable
|
: label // ignore: cast_nullable_to_non_nullable
|
||||||
as String,
|
as String?,
|
||||||
active: null == active
|
active: freezed == active
|
||||||
? _value.active
|
? _value.active
|
||||||
: active // ignore: cast_nullable_to_non_nullable
|
: active // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,
|
as bool?,
|
||||||
) as $Val);
|
) as $Val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -616,8 +648,8 @@ abstract class _$$LinkImplCopyWith<$Res> implements $LinkCopyWith<$Res> {
|
|||||||
@useResult
|
@useResult
|
||||||
$Res call(
|
$Res call(
|
||||||
{@JsonKey(name: "url") String? url,
|
{@JsonKey(name: "url") String? url,
|
||||||
@JsonKey(name: "label") String label,
|
@JsonKey(name: "label") String? label,
|
||||||
@JsonKey(name: "active") bool active});
|
@JsonKey(name: "active") bool? active});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -627,26 +659,28 @@ class __$$LinkImplCopyWithImpl<$Res>
|
|||||||
__$$LinkImplCopyWithImpl(_$LinkImpl _value, $Res Function(_$LinkImpl) _then)
|
__$$LinkImplCopyWithImpl(_$LinkImpl _value, $Res Function(_$LinkImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of Link
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
Object? url = freezed,
|
Object? url = freezed,
|
||||||
Object? label = null,
|
Object? label = freezed,
|
||||||
Object? active = null,
|
Object? active = freezed,
|
||||||
}) {
|
}) {
|
||||||
return _then(_$LinkImpl(
|
return _then(_$LinkImpl(
|
||||||
url: freezed == url
|
url: freezed == url
|
||||||
? _value.url
|
? _value.url
|
||||||
: url // ignore: cast_nullable_to_non_nullable
|
: url // ignore: cast_nullable_to_non_nullable
|
||||||
as String?,
|
as String?,
|
||||||
label: null == label
|
label: freezed == label
|
||||||
? _value.label
|
? _value.label
|
||||||
: label // ignore: cast_nullable_to_non_nullable
|
: label // ignore: cast_nullable_to_non_nullable
|
||||||
as String,
|
as String?,
|
||||||
active: null == active
|
active: freezed == active
|
||||||
? _value.active
|
? _value.active
|
||||||
: active // ignore: cast_nullable_to_non_nullable
|
: active // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,
|
as bool?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -655,9 +689,9 @@ class __$$LinkImplCopyWithImpl<$Res>
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class _$LinkImpl implements _Link {
|
class _$LinkImpl implements _Link {
|
||||||
const _$LinkImpl(
|
const _$LinkImpl(
|
||||||
{@JsonKey(name: "url") required this.url,
|
{@JsonKey(name: "url") this.url,
|
||||||
@JsonKey(name: "label") required this.label,
|
@JsonKey(name: "label") this.label,
|
||||||
@JsonKey(name: "active") required this.active});
|
@JsonKey(name: "active") this.active});
|
||||||
|
|
||||||
factory _$LinkImpl.fromJson(Map<String, dynamic> json) =>
|
factory _$LinkImpl.fromJson(Map<String, dynamic> json) =>
|
||||||
_$$LinkImplFromJson(json);
|
_$$LinkImplFromJson(json);
|
||||||
@@ -667,10 +701,10 @@ class _$LinkImpl implements _Link {
|
|||||||
final String? url;
|
final String? url;
|
||||||
@override
|
@override
|
||||||
@JsonKey(name: "label")
|
@JsonKey(name: "label")
|
||||||
final String label;
|
final String? label;
|
||||||
@override
|
@override
|
||||||
@JsonKey(name: "active")
|
@JsonKey(name: "active")
|
||||||
final bool active;
|
final bool? active;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
@@ -687,11 +721,13 @@ class _$LinkImpl implements _Link {
|
|||||||
(identical(other.active, active) || other.active == active));
|
(identical(other.active, active) || other.active == active));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, url, label, active);
|
int get hashCode => Object.hash(runtimeType, url, label, active);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of Link
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$LinkImplCopyWith<_$LinkImpl> get copyWith =>
|
_$$LinkImplCopyWith<_$LinkImpl> get copyWith =>
|
||||||
@@ -707,9 +743,9 @@ class _$LinkImpl implements _Link {
|
|||||||
|
|
||||||
abstract class _Link implements Link {
|
abstract class _Link implements Link {
|
||||||
const factory _Link(
|
const factory _Link(
|
||||||
{@JsonKey(name: "url") required final String? url,
|
{@JsonKey(name: "url") final String? url,
|
||||||
@JsonKey(name: "label") required final String label,
|
@JsonKey(name: "label") final String? label,
|
||||||
@JsonKey(name: "active") required final bool active}) = _$LinkImpl;
|
@JsonKey(name: "active") final bool? active}) = _$LinkImpl;
|
||||||
|
|
||||||
factory _Link.fromJson(Map<String, dynamic> json) = _$LinkImpl.fromJson;
|
factory _Link.fromJson(Map<String, dynamic> json) = _$LinkImpl.fromJson;
|
||||||
|
|
||||||
@@ -718,12 +754,15 @@ abstract class _Link implements Link {
|
|||||||
String? get url;
|
String? get url;
|
||||||
@override
|
@override
|
||||||
@JsonKey(name: "label")
|
@JsonKey(name: "label")
|
||||||
String get label;
|
String? get label;
|
||||||
@override
|
@override
|
||||||
@JsonKey(name: "active")
|
@JsonKey(name: "active")
|
||||||
bool get active;
|
bool? get active;
|
||||||
|
|
||||||
|
/// Create a copy of Link
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$LinkImplCopyWith<_$LinkImpl> get copyWith =>
|
_$$LinkImplCopyWith<_$LinkImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ _$MetaImpl _$$MetaImplFromJson(Map<String, dynamic> json) => _$MetaImpl(
|
|||||||
links: (json['links'] as List<dynamic>)
|
links: (json['links'] as List<dynamic>)
|
||||||
.map((e) => Link.fromJson(e as Map<String, dynamic>))
|
.map((e) => Link.fromJson(e as Map<String, dynamic>))
|
||||||
.toList(),
|
.toList(),
|
||||||
path: json['path'] as String,
|
path: json['path'] as String?,
|
||||||
perPage: (json['per_page'] as num).toInt(),
|
perPage: (json['per_page'] as num).toInt(),
|
||||||
to: json['to'],
|
to: json['to'],
|
||||||
total: (json['total'] as num).toInt(),
|
total: (json['total'] as num).toInt(),
|
||||||
@@ -48,8 +48,8 @@ Map<String, dynamic> _$$MetaImplToJson(_$MetaImpl instance) =>
|
|||||||
|
|
||||||
_$LinkImpl _$$LinkImplFromJson(Map<String, dynamic> json) => _$LinkImpl(
|
_$LinkImpl _$$LinkImplFromJson(Map<String, dynamic> json) => _$LinkImpl(
|
||||||
url: json['url'] as String?,
|
url: json['url'] as String?,
|
||||||
label: json['label'] as String,
|
label: json['label'] as String?,
|
||||||
active: json['active'] as bool,
|
active: json['active'] as bool?,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$LinkImplToJson(_$LinkImpl instance) =>
|
Map<String, dynamic> _$$LinkImplToJson(_$LinkImpl instance) =>
|
||||||
|
|||||||
@@ -21,7 +21,9 @@ mixin _$SelectionPopupModel {
|
|||||||
dynamic get value => throw _privateConstructorUsedError;
|
dynamic get value => throw _privateConstructorUsedError;
|
||||||
bool get isSelected => throw _privateConstructorUsedError;
|
bool get isSelected => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// 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 =>
|
$SelectionPopupModelCopyWith<SelectionPopupModel> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -45,6 +47,8 @@ class _$SelectionPopupModelCopyWithImpl<$Res, $Val extends SelectionPopupModel>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of SelectionPopupModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -93,6 +97,8 @@ class __$$SelectionPopupModelImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$SelectionPopupModelImpl) _then)
|
$Res Function(_$SelectionPopupModelImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of SelectionPopupModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -159,7 +165,9 @@ class _$SelectionPopupModelImpl implements _SelectionPopupModel {
|
|||||||
int get hashCode => Object.hash(runtimeType, id, title,
|
int get hashCode => Object.hash(runtimeType, id, title,
|
||||||
const DeepCollectionEquality().hash(value), isSelected);
|
const DeepCollectionEquality().hash(value), isSelected);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of SelectionPopupModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith =>
|
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith =>
|
||||||
@@ -182,8 +190,11 @@ abstract class _SelectionPopupModel implements SelectionPopupModel {
|
|||||||
dynamic get value;
|
dynamic get value;
|
||||||
@override
|
@override
|
||||||
bool get isSelected;
|
bool get isSelected;
|
||||||
|
|
||||||
|
/// Create a copy of SelectionPopupModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith =>
|
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,8 +68,12 @@ mixin _$UserRegistrationSheet {
|
|||||||
@JsonKey(name: 'activity_coefficient')
|
@JsonKey(name: 'activity_coefficient')
|
||||||
double get activityCoefficient => throw _privateConstructorUsedError;
|
double get activityCoefficient => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this UserRegistrationSheet to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of UserRegistrationSheet
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
$UserRegistrationSheetCopyWith<UserRegistrationSheet> get copyWith =>
|
$UserRegistrationSheetCopyWith<UserRegistrationSheet> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -121,6 +125,8 @@ class _$UserRegistrationSheetCopyWithImpl<$Res,
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of UserRegistrationSheet
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -313,6 +319,8 @@ class __$$UserRegistrationSheetImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$UserRegistrationSheetImpl) _then)
|
$Res Function(_$UserRegistrationSheetImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of UserRegistrationSheet
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -627,7 +635,7 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
|
|||||||
other.activityCoefficient == activityCoefficient));
|
other.activityCoefficient == activityCoefficient));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hashAll([
|
int get hashCode => Object.hashAll([
|
||||||
runtimeType,
|
runtimeType,
|
||||||
@@ -660,7 +668,9 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
|
|||||||
activityCoefficient
|
activityCoefficient
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of UserRegistrationSheet
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl>
|
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl>
|
||||||
@@ -787,8 +797,11 @@ abstract class _UserRegistrationSheet implements UserRegistrationSheet {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: 'activity_coefficient')
|
@JsonKey(name: 'activity_coefficient')
|
||||||
double get activityCoefficient;
|
double get activityCoefficient;
|
||||||
|
|
||||||
|
/// Create a copy of UserRegistrationSheet
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl>
|
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl>
|
||||||
get copyWith => throw _privateConstructorUsedError;
|
get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import 'package:eatvio_app/features/feed/presentation/bloc/comments_cubit/commen
|
|||||||
import 'package:eatvio_app/features/feed/presentation/bloc/feed_cubit/feed_cubit.dart';
|
import 'package:eatvio_app/features/feed/presentation/bloc/feed_cubit/feed_cubit.dart';
|
||||||
import 'package:eatvio_app/features/feed/presentation/widgets/comments_widget.dart';
|
import 'package:eatvio_app/features/feed/presentation/widgets/comments_widget.dart';
|
||||||
import 'package:eatvio_app/locator_service.dart';
|
import 'package:eatvio_app/locator_service.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:share_plus/share_plus.dart';
|
import 'package:share_plus/share_plus.dart';
|
||||||
@@ -322,7 +321,7 @@ class _BlogPostScreenState extends State<BlogPostScreen> {
|
|||||||
if (state is CommentsStateLoading)
|
if (state is CommentsStateLoading)
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(32),
|
padding: const EdgeInsets.all(32),
|
||||||
child: CupertinoActivityIndicator(),
|
child: CircularProgressIndicator(),
|
||||||
),
|
),
|
||||||
if (state is CommentsStateLoaded)
|
if (state is CommentsStateLoaded)
|
||||||
CommentsWidget(
|
CommentsWidget(
|
||||||
|
|||||||
@@ -84,6 +84,9 @@ class _$NewMessagesStateCopyWithImpl<$Res, $Val extends NewMessagesState>
|
|||||||
final $Val _value;
|
final $Val _value;
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of NewMessagesState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -100,6 +103,9 @@ class __$$NewMessagesStateImplCopyWithImpl<$Res>
|
|||||||
__$$NewMessagesStateImplCopyWithImpl(_$NewMessagesStateImpl _value,
|
__$$NewMessagesStateImplCopyWithImpl(_$NewMessagesStateImpl _value,
|
||||||
$Res Function(_$NewMessagesStateImpl) _then)
|
$Res Function(_$NewMessagesStateImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of NewMessagesState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -215,6 +221,9 @@ class __$$NewMessagesStateEmptyImplCopyWithImpl<$Res>
|
|||||||
__$$NewMessagesStateEmptyImplCopyWithImpl(_$NewMessagesStateEmptyImpl _value,
|
__$$NewMessagesStateEmptyImplCopyWithImpl(_$NewMessagesStateEmptyImpl _value,
|
||||||
$Res Function(_$NewMessagesStateEmptyImpl) _then)
|
$Res Function(_$NewMessagesStateEmptyImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of NewMessagesState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -335,6 +344,8 @@ class __$$NewMessagesStateLoadedImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$NewMessagesStateLoadedImpl) _then)
|
$Res Function(_$NewMessagesStateLoadedImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of NewMessagesState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -374,7 +385,9 @@ class _$NewMessagesStateLoadedImpl implements NewMessagesStateLoaded {
|
|||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, messagesCount);
|
int get hashCode => Object.hash(runtimeType, messagesCount);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of NewMessagesState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl>
|
_$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl>
|
||||||
@@ -461,7 +474,10 @@ abstract class NewMessagesStateLoaded implements NewMessagesState {
|
|||||||
_$NewMessagesStateLoadedImpl;
|
_$NewMessagesStateLoadedImpl;
|
||||||
|
|
||||||
int get messagesCount;
|
int get messagesCount;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of NewMessagesState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl>
|
_$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl>
|
||||||
get copyWith => throw _privateConstructorUsedError;
|
get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -484,6 +500,8 @@ class __$$NewMessagesStateErrorImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$NewMessagesStateErrorImpl) _then)
|
$Res Function(_$NewMessagesStateErrorImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of NewMessagesState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -523,7 +541,9 @@ class _$NewMessagesStateErrorImpl implements NewMessagesStateError {
|
|||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, errorMessage);
|
int get hashCode => Object.hash(runtimeType, errorMessage);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of NewMessagesState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl>
|
_$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl>
|
||||||
@@ -610,7 +630,10 @@ abstract class NewMessagesStateError implements NewMessagesState {
|
|||||||
_$NewMessagesStateErrorImpl;
|
_$NewMessagesStateErrorImpl;
|
||||||
|
|
||||||
String get errorMessage;
|
String get errorMessage;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of NewMessagesState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl>
|
_$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl>
|
||||||
get copyWith => throw _privateConstructorUsedError;
|
get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,9 @@ class _$NotificationsStateCopyWithImpl<$Res, $Val extends NotificationsState>
|
|||||||
final $Val _value;
|
final $Val _value;
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of NotificationsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -104,6 +107,9 @@ class __$$NotificationsStateImplCopyWithImpl<$Res>
|
|||||||
__$$NotificationsStateImplCopyWithImpl(_$NotificationsStateImpl _value,
|
__$$NotificationsStateImplCopyWithImpl(_$NotificationsStateImpl _value,
|
||||||
$Res Function(_$NotificationsStateImpl) _then)
|
$Res Function(_$NotificationsStateImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of NotificationsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -225,6 +231,9 @@ class __$$NotificationsStateEmptyImplCopyWithImpl<$Res>
|
|||||||
_$NotificationsStateEmptyImpl _value,
|
_$NotificationsStateEmptyImpl _value,
|
||||||
$Res Function(_$NotificationsStateEmptyImpl) _then)
|
$Res Function(_$NotificationsStateEmptyImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of NotificationsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -350,6 +359,8 @@ class __$$NotificationsStateLoadedImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$NotificationsStateLoadedImpl) _then)
|
$Res Function(_$NotificationsStateLoadedImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of NotificationsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -408,7 +419,9 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
|
|||||||
int get hashCode => Object.hash(runtimeType,
|
int get hashCode => Object.hash(runtimeType,
|
||||||
const DeepCollectionEquality().hash(_notifications), notificationsCount);
|
const DeepCollectionEquality().hash(_notifications), notificationsCount);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of NotificationsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl>
|
_$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl>
|
||||||
@@ -501,7 +514,10 @@ abstract class NotificationsStateLoaded implements NotificationsState {
|
|||||||
|
|
||||||
List<String> get notifications;
|
List<String> get notifications;
|
||||||
int get notificationsCount;
|
int get notificationsCount;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of NotificationsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl>
|
_$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl>
|
||||||
get copyWith => throw _privateConstructorUsedError;
|
get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -526,6 +542,8 @@ class __$$NotificationsStateErrorImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$NotificationsStateErrorImpl) _then)
|
$Res Function(_$NotificationsStateErrorImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of NotificationsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -565,7 +583,9 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
|
|||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, errorMessage);
|
int get hashCode => Object.hash(runtimeType, errorMessage);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of NotificationsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl>
|
_$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl>
|
||||||
@@ -656,7 +676,10 @@ abstract class NotificationsStateError implements NotificationsState {
|
|||||||
_$NotificationsStateErrorImpl;
|
_$NotificationsStateErrorImpl;
|
||||||
|
|
||||||
String get errorMessage;
|
String get errorMessage;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of NotificationsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl>
|
_$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl>
|
||||||
get copyWith => throw _privateConstructorUsedError;
|
get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,6 +84,9 @@ class _$ProfileAvatarStateCopyWithImpl<$Res, $Val extends ProfileAvatarState>
|
|||||||
final $Val _value;
|
final $Val _value;
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ProfileAvatarState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -100,6 +103,9 @@ class __$$ProfileAvatarStateImplCopyWithImpl<$Res>
|
|||||||
__$$ProfileAvatarStateImplCopyWithImpl(_$ProfileAvatarStateImpl _value,
|
__$$ProfileAvatarStateImplCopyWithImpl(_$ProfileAvatarStateImpl _value,
|
||||||
$Res Function(_$ProfileAvatarStateImpl) _then)
|
$Res Function(_$ProfileAvatarStateImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ProfileAvatarState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -217,6 +223,9 @@ class __$$ProfileAvatarStateLoadingImplCopyWithImpl<$Res>
|
|||||||
_$ProfileAvatarStateLoadingImpl _value,
|
_$ProfileAvatarStateLoadingImpl _value,
|
||||||
$Res Function(_$ProfileAvatarStateLoadingImpl) _then)
|
$Res Function(_$ProfileAvatarStateLoadingImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ProfileAvatarState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -340,6 +349,8 @@ class __$$ProfileAvatarStateLoadedImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$ProfileAvatarStateLoadedImpl) _then)
|
$Res Function(_$ProfileAvatarStateLoadedImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ProfileAvatarState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -353,6 +364,8 @@ class __$$ProfileAvatarStateLoadedImplCopyWithImpl<$Res>
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of ProfileAvatarState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$ProfileModelCopyWith<$Res> get profile {
|
$ProfileModelCopyWith<$Res> get profile {
|
||||||
@@ -386,7 +399,9 @@ class _$ProfileAvatarStateLoadedImpl implements ProfileAvatarStateLoaded {
|
|||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, profile);
|
int get hashCode => Object.hash(runtimeType, profile);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of ProfileAvatarState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$ProfileAvatarStateLoadedImplCopyWith<_$ProfileAvatarStateLoadedImpl>
|
_$$ProfileAvatarStateLoadedImplCopyWith<_$ProfileAvatarStateLoadedImpl>
|
||||||
@@ -473,7 +488,10 @@ abstract class ProfileAvatarStateLoaded implements ProfileAvatarState {
|
|||||||
{required final ProfileModel profile}) = _$ProfileAvatarStateLoadedImpl;
|
{required final ProfileModel profile}) = _$ProfileAvatarStateLoadedImpl;
|
||||||
|
|
||||||
ProfileModel get profile;
|
ProfileModel get profile;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of ProfileAvatarState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$ProfileAvatarStateLoadedImplCopyWith<_$ProfileAvatarStateLoadedImpl>
|
_$$ProfileAvatarStateLoadedImplCopyWith<_$ProfileAvatarStateLoadedImpl>
|
||||||
get copyWith => throw _privateConstructorUsedError;
|
get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -498,6 +516,8 @@ class __$$ProfileAvatarStateErrorImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$ProfileAvatarStateErrorImpl) _then)
|
$Res Function(_$ProfileAvatarStateErrorImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ProfileAvatarState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -537,7 +557,9 @@ class _$ProfileAvatarStateErrorImpl implements ProfileAvatarStateError {
|
|||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, errorMessage);
|
int get hashCode => Object.hash(runtimeType, errorMessage);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of ProfileAvatarState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$ProfileAvatarStateErrorImplCopyWith<_$ProfileAvatarStateErrorImpl>
|
_$$ProfileAvatarStateErrorImplCopyWith<_$ProfileAvatarStateErrorImpl>
|
||||||
@@ -624,7 +646,10 @@ abstract class ProfileAvatarStateError implements ProfileAvatarState {
|
|||||||
_$ProfileAvatarStateErrorImpl;
|
_$ProfileAvatarStateErrorImpl;
|
||||||
|
|
||||||
String get errorMessage;
|
String get errorMessage;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of ProfileAvatarState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$ProfileAvatarStateErrorImplCopyWith<_$ProfileAvatarStateErrorImpl>
|
_$$ProfileAvatarStateErrorImplCopyWith<_$ProfileAvatarStateErrorImpl>
|
||||||
get copyWith => throw _privateConstructorUsedError;
|
get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,9 +190,9 @@ class _BottomNavigationBarWidgetState extends State<BottomNavigationBarWidget> {
|
|||||||
label: '',
|
label: '',
|
||||||
icon: BlocBuilder<ProfileAvatarCubit, ProfileAvatarState>(
|
icon: BlocBuilder<ProfileAvatarCubit, ProfileAvatarState>(
|
||||||
builder: (BuildContext context, ProfileAvatarState state) {
|
builder: (BuildContext context, ProfileAvatarState state) {
|
||||||
if (state is ProfileAvatarStateLoaded && state.profile.user.profilePhotoUrl != null) {
|
if (state is ProfileAvatarStateLoaded) {
|
||||||
return CircleAvatar(
|
return CircleAvatar(
|
||||||
backgroundImage: NetworkImage(state.profile.user.profilePhotoUrl!),
|
backgroundImage: NetworkImage(state.profile.profilePhotoUrl),
|
||||||
radius: 16,
|
radius: 16,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,8 +25,12 @@ mixin _$CalendarModel {
|
|||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
Object? get diary => throw _privateConstructorUsedError;
|
Object? get diary => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this CalendarModel to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$CalendarModelCopyWith<CalendarModel> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -53,6 +57,8 @@ class _$CalendarModelCopyWithImpl<$Res, $Val extends CalendarModel>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of CalendarModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -97,6 +103,8 @@ class __$$CalendarModelImplCopyWithImpl<$Res>
|
|||||||
_$CalendarModelImpl _value, $Res Function(_$CalendarModelImpl) _then)
|
_$CalendarModelImpl _value, $Res Function(_$CalendarModelImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of CalendarModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -157,7 +165,7 @@ class _$CalendarModelImpl implements _CalendarModel {
|
|||||||
const DeepCollectionEquality().equals(other.diary, diary));
|
const DeepCollectionEquality().equals(other.diary, diary));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(
|
int get hashCode => Object.hash(
|
||||||
runtimeType,
|
runtimeType,
|
||||||
@@ -165,7 +173,9 @@ class _$CalendarModelImpl implements _CalendarModel {
|
|||||||
is_current_day_included_in_the_chosen_diet_progression,
|
is_current_day_included_in_the_chosen_diet_progression,
|
||||||
const DeepCollectionEquality().hash(diary));
|
const DeepCollectionEquality().hash(diary));
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of CalendarModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$CalendarModelImplCopyWith<_$CalendarModelImpl> get copyWith =>
|
_$$CalendarModelImplCopyWith<_$CalendarModelImpl> get copyWith =>
|
||||||
@@ -195,8 +205,11 @@ abstract class _CalendarModel implements CalendarModel {
|
|||||||
bool get is_current_day_included_in_the_chosen_diet_progression;
|
bool get is_current_day_included_in_the_chosen_diet_progression;
|
||||||
@override
|
@override
|
||||||
Object? get diary;
|
Object? get diary;
|
||||||
|
|
||||||
|
/// Create a copy of CalendarModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$CalendarModelImplCopyWith<_$CalendarModelImpl> get copyWith =>
|
_$$CalendarModelImplCopyWith<_$CalendarModelImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,6 +84,9 @@ class _$CalendarStateCopyWithImpl<$Res, $Val extends CalendarState>
|
|||||||
final $Val _value;
|
final $Val _value;
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of CalendarState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -100,6 +103,9 @@ class __$$CalendarStateImplCopyWithImpl<$Res>
|
|||||||
__$$CalendarStateImplCopyWithImpl(
|
__$$CalendarStateImplCopyWithImpl(
|
||||||
_$CalendarStateImpl _value, $Res Function(_$CalendarStateImpl) _then)
|
_$CalendarStateImpl _value, $Res Function(_$CalendarStateImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of CalendarState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -214,6 +220,9 @@ class __$$CalendarStateLoadingImplCopyWithImpl<$Res>
|
|||||||
__$$CalendarStateLoadingImplCopyWithImpl(_$CalendarStateLoadingImpl _value,
|
__$$CalendarStateLoadingImplCopyWithImpl(_$CalendarStateLoadingImpl _value,
|
||||||
$Res Function(_$CalendarStateLoadingImpl) _then)
|
$Res Function(_$CalendarStateLoadingImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of CalendarState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -332,6 +341,8 @@ class __$$CalendarStateLoadedImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$CalendarStateLoadedImpl) _then)
|
$Res Function(_$CalendarStateLoadedImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of CalendarState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -379,7 +390,9 @@ class _$CalendarStateLoadedImpl implements CalendarStateLoaded {
|
|||||||
int get hashCode => Object.hash(
|
int get hashCode => Object.hash(
|
||||||
runtimeType, const DeepCollectionEquality().hash(_calendarList));
|
runtimeType, const DeepCollectionEquality().hash(_calendarList));
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of CalendarState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$CalendarStateLoadedImplCopyWith<_$CalendarStateLoadedImpl> get copyWith =>
|
_$$CalendarStateLoadedImplCopyWith<_$CalendarStateLoadedImpl> get copyWith =>
|
||||||
@@ -467,7 +480,10 @@ abstract class CalendarStateLoaded implements CalendarState {
|
|||||||
_$CalendarStateLoadedImpl;
|
_$CalendarStateLoadedImpl;
|
||||||
|
|
||||||
List<CalendarModel> get calendarList;
|
List<CalendarModel> get calendarList;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
_$$CalendarStateLoadedImplCopyWith<_$CalendarStateLoadedImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -489,6 +505,8 @@ class __$$CalendarStateErrorImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$CalendarStateErrorImpl) _then)
|
$Res Function(_$CalendarStateErrorImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of CalendarState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -528,7 +546,9 @@ class _$CalendarStateErrorImpl implements CalendarStateError {
|
|||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, errorMessage);
|
int get hashCode => Object.hash(runtimeType, errorMessage);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of CalendarState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$CalendarStateErrorImplCopyWith<_$CalendarStateErrorImpl> get copyWith =>
|
_$$CalendarStateErrorImplCopyWith<_$CalendarStateErrorImpl> get copyWith =>
|
||||||
@@ -615,7 +635,10 @@ abstract class CalendarStateError implements CalendarState {
|
|||||||
_$CalendarStateErrorImpl;
|
_$CalendarStateErrorImpl;
|
||||||
|
|
||||||
String get errorMessage;
|
String get errorMessage;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
_$$CalendarStateErrorImplCopyWith<_$CalendarStateErrorImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import 'package:eatvio_app/core/app_export.dart';
|
|||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
||||||
|
|
||||||
// ignore: must_be_immutable
|
// ignore: must_be_immutable
|
||||||
@@ -20,7 +19,7 @@ class CalendarScreen extends StatelessWidget {
|
|||||||
} else if (state is CalendarStateLoading) {
|
} else if (state is CalendarStateLoading) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Center(
|
body: Center(
|
||||||
child: CupertinoActivityIndicator(),
|
child: CircularProgressIndicator(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else if (state is CalendarStateError) {
|
} else if (state is CalendarStateError) {
|
||||||
|
|||||||
@@ -29,8 +29,12 @@ mixin _$ChatMessageModel {
|
|||||||
@JsonKey(name: 'updated_at')
|
@JsonKey(name: 'updated_at')
|
||||||
String get updatedAt => throw _privateConstructorUsedError;
|
String get updatedAt => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this ChatMessageModel to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$ChatMessageModelCopyWith<ChatMessageModel> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -59,6 +63,8 @@ class _$ChatMessageModelCopyWithImpl<$Res, $Val extends ChatMessageModel>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ChatMessageModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -117,6 +123,8 @@ class __$$ChatMessageModelImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$ChatMessageModelImpl) _then)
|
$Res Function(_$ChatMessageModelImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ChatMessageModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -207,12 +215,14 @@ class _$ChatMessageModelImpl implements _ChatMessageModel {
|
|||||||
other.updatedAt == updatedAt));
|
other.updatedAt == updatedAt));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, id, data,
|
int get hashCode => Object.hash(runtimeType, id, data,
|
||||||
const DeepCollectionEquality().hash(_mediaData), authorId, updatedAt);
|
const DeepCollectionEquality().hash(_mediaData), authorId, updatedAt);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of ChatMessageModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith =>
|
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith =>
|
||||||
@@ -252,8 +262,11 @@ abstract class _ChatMessageModel implements ChatMessageModel {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: 'updated_at')
|
@JsonKey(name: 'updated_at')
|
||||||
String get updatedAt;
|
String get updatedAt;
|
||||||
|
|
||||||
|
/// Create a copy of ChatMessageModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith =>
|
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,8 +24,12 @@ mixin _$ChatMessagesModel {
|
|||||||
List<ChatMessageModel> get messagesList => throw _privateConstructorUsedError;
|
List<ChatMessageModel> get messagesList => throw _privateConstructorUsedError;
|
||||||
ChatMetaModel get meta => throw _privateConstructorUsedError;
|
ChatMetaModel get meta => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this ChatMessagesModel to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$ChatMessagesModelCopyWith<ChatMessagesModel> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -53,6 +57,8 @@ class _$ChatMessagesModelCopyWithImpl<$Res, $Val extends ChatMessagesModel>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ChatMessagesModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -71,6 +77,8 @@ class _$ChatMessagesModelCopyWithImpl<$Res, $Val extends ChatMessagesModel>
|
|||||||
) as $Val);
|
) as $Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of ChatMessagesModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$ChatMetaModelCopyWith<$Res> get meta {
|
$ChatMetaModelCopyWith<$Res> get meta {
|
||||||
@@ -104,6 +112,8 @@ class __$$ChatMessagesModelImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$ChatMessagesModelImpl) _then)
|
$Res Function(_$ChatMessagesModelImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ChatMessagesModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -162,12 +172,14 @@ class _$ChatMessagesModelImpl implements _ChatMessagesModel {
|
|||||||
(identical(other.meta, meta) || other.meta == meta));
|
(identical(other.meta, meta) || other.meta == meta));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(
|
int get hashCode => Object.hash(
|
||||||
runtimeType, const DeepCollectionEquality().hash(_messagesList), meta);
|
runtimeType, const DeepCollectionEquality().hash(_messagesList), meta);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of ChatMessagesModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith =>
|
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith =>
|
||||||
@@ -196,8 +208,11 @@ abstract class _ChatMessagesModel implements ChatMessagesModel {
|
|||||||
List<ChatMessageModel> get messagesList;
|
List<ChatMessageModel> get messagesList;
|
||||||
@override
|
@override
|
||||||
ChatMetaModel get meta;
|
ChatMetaModel get meta;
|
||||||
|
|
||||||
|
/// Create a copy of ChatMessagesModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith =>
|
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,8 +23,12 @@ mixin _$ChatMetaModel {
|
|||||||
@JsonKey(name: "last_page")
|
@JsonKey(name: "last_page")
|
||||||
int get lastPage => throw _privateConstructorUsedError;
|
int get lastPage => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this ChatMetaModel to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$ChatMetaModelCopyWith<ChatMetaModel> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -48,6 +52,8 @@ class _$ChatMetaModelCopyWithImpl<$Res, $Val extends ChatMetaModel>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ChatMetaModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -81,6 +87,8 @@ class __$$ChatMetaModelImplCopyWithImpl<$Res>
|
|||||||
_$ChatMetaModelImpl _value, $Res Function(_$ChatMetaModelImpl) _then)
|
_$ChatMetaModelImpl _value, $Res Function(_$ChatMetaModelImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ChatMetaModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -122,11 +130,13 @@ class _$ChatMetaModelImpl implements _ChatMetaModel {
|
|||||||
other.lastPage == lastPage));
|
other.lastPage == lastPage));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, lastPage);
|
int get hashCode => Object.hash(runtimeType, lastPage);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of ChatMetaModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith =>
|
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith =>
|
||||||
@@ -151,8 +161,11 @@ abstract class _ChatMetaModel implements ChatMetaModel {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: "last_page")
|
@JsonKey(name: "last_page")
|
||||||
int get lastPage;
|
int get lastPage;
|
||||||
|
|
||||||
|
/// Create a copy of ChatMetaModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith =>
|
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,8 +26,12 @@ mixin _$ChatRoomModel {
|
|||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
Map<String, ChatUserModel> get users => throw _privateConstructorUsedError;
|
Map<String, ChatUserModel> get users => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this ChatRoomModel to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$ChatRoomModelCopyWith<ChatRoomModel> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -57,6 +61,8 @@ class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ChatRoomModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -80,6 +86,8 @@ class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel>
|
|||||||
) as $Val);
|
) as $Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of ChatRoomModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings {
|
$ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings {
|
||||||
@@ -116,6 +124,8 @@ class __$$ChatRoomModelImplCopyWithImpl<$Res>
|
|||||||
_$ChatRoomModelImpl _value, $Res Function(_$ChatRoomModelImpl) _then)
|
_$ChatRoomModelImpl _value, $Res Function(_$ChatRoomModelImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ChatRoomModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -181,12 +191,14 @@ class _$ChatRoomModelImpl implements _ChatRoomModel {
|
|||||||
const DeepCollectionEquality().equals(other._users, _users));
|
const DeepCollectionEquality().equals(other._users, _users));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, id, chatRoomSettings,
|
int get hashCode => Object.hash(runtimeType, id, chatRoomSettings,
|
||||||
const DeepCollectionEquality().hash(_users));
|
const DeepCollectionEquality().hash(_users));
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of ChatRoomModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith =>
|
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith =>
|
||||||
@@ -217,8 +229,11 @@ abstract class _ChatRoomModel implements ChatRoomModel {
|
|||||||
ChatRoomSettingsModel get chatRoomSettings;
|
ChatRoomSettingsModel get chatRoomSettings;
|
||||||
@override
|
@override
|
||||||
Map<String, ChatUserModel> get users;
|
Map<String, ChatUserModel> get users;
|
||||||
|
|
||||||
|
/// Create a copy of ChatRoomModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith =>
|
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,8 +23,12 @@ mixin _$ChatRoomPreviewModel {
|
|||||||
@JsonKey(name: "chatRooms")
|
@JsonKey(name: "chatRooms")
|
||||||
List<ChatRoom> get chatRooms => throw _privateConstructorUsedError;
|
List<ChatRoom> get chatRooms => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this ChatRoomPreviewModel to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$ChatRoomPreviewModelCopyWith<ChatRoomPreviewModel> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -49,6 +53,8 @@ class _$ChatRoomPreviewModelCopyWithImpl<$Res,
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ChatRoomPreviewModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -82,6 +88,8 @@ class __$$ChatRoomPreviewModelImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$ChatRoomPreviewModelImpl) _then)
|
$Res Function(_$ChatRoomPreviewModelImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ChatRoomPreviewModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -129,12 +137,14 @@ class _$ChatRoomPreviewModelImpl implements _ChatRoomPreviewModel {
|
|||||||
.equals(other._chatRooms, _chatRooms));
|
.equals(other._chatRooms, _chatRooms));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
Object.hash(runtimeType, const DeepCollectionEquality().hash(_chatRooms));
|
Object.hash(runtimeType, const DeepCollectionEquality().hash(_chatRooms));
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of ChatRoomPreviewModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$ChatRoomPreviewModelImplCopyWith<_$ChatRoomPreviewModelImpl>
|
_$$ChatRoomPreviewModelImplCopyWith<_$ChatRoomPreviewModelImpl>
|
||||||
@@ -161,8 +171,11 @@ abstract class _ChatRoomPreviewModel implements ChatRoomPreviewModel {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: "chatRooms")
|
@JsonKey(name: "chatRooms")
|
||||||
List<ChatRoom> get chatRooms;
|
List<ChatRoom> get chatRooms;
|
||||||
|
|
||||||
|
/// Create a copy of ChatRoomPreviewModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$ChatRoomPreviewModelImplCopyWith<_$ChatRoomPreviewModelImpl>
|
_$$ChatRoomPreviewModelImplCopyWith<_$ChatRoomPreviewModelImpl>
|
||||||
get copyWith => throw _privateConstructorUsedError;
|
get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -182,8 +195,12 @@ mixin _$ChatRoom {
|
|||||||
@JsonKey(name: "users")
|
@JsonKey(name: "users")
|
||||||
Users get users => throw _privateConstructorUsedError;
|
Users get users => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this ChatRoom to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$ChatRoomCopyWith<ChatRoom> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -212,6 +229,8 @@ class _$ChatRoomCopyWithImpl<$Res, $Val extends ChatRoom>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ChatRoom
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -240,6 +259,8 @@ class _$ChatRoomCopyWithImpl<$Res, $Val extends ChatRoom>
|
|||||||
) as $Val);
|
) as $Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of ChatRoom
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$UsersCopyWith<$Res> get users {
|
$UsersCopyWith<$Res> get users {
|
||||||
@@ -275,6 +296,8 @@ class __$$ChatRoomImplCopyWithImpl<$Res>
|
|||||||
_$ChatRoomImpl _value, $Res Function(_$ChatRoomImpl) _then)
|
_$ChatRoomImpl _value, $Res Function(_$ChatRoomImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ChatRoom
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -347,12 +370,14 @@ class _$ChatRoomImpl implements _ChatRoom {
|
|||||||
(identical(other.users, users) || other.users == users));
|
(identical(other.users, users) || other.users == users));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, id, roomName,
|
int get hashCode => Object.hash(runtimeType, id, roomName,
|
||||||
const DeepCollectionEquality().hash(lastMessage), users);
|
const DeepCollectionEquality().hash(lastMessage), users);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of ChatRoom
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$ChatRoomImplCopyWith<_$ChatRoomImpl> get copyWith =>
|
_$$ChatRoomImplCopyWith<_$ChatRoomImpl> get copyWith =>
|
||||||
@@ -388,8 +413,11 @@ abstract class _ChatRoom implements ChatRoom {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: "users")
|
@JsonKey(name: "users")
|
||||||
Users get users;
|
Users get users;
|
||||||
|
|
||||||
|
/// Create a copy of ChatRoom
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$ChatRoomImplCopyWith<_$ChatRoomImpl> get copyWith =>
|
_$$ChatRoomImplCopyWith<_$ChatRoomImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -415,8 +443,12 @@ mixin _$LastMessageClass {
|
|||||||
@JsonKey(name: "updated_at")
|
@JsonKey(name: "updated_at")
|
||||||
DateTime get updatedAt => throw _privateConstructorUsedError;
|
DateTime get updatedAt => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this LastMessageClass to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$LastMessageClassCopyWith<LastMessageClass> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -448,6 +480,8 @@ class _$LastMessageClassCopyWithImpl<$Res, $Val extends LastMessageClass>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of LastMessageClass
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -519,6 +553,8 @@ class __$$LastMessageClassImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$LastMessageClassImpl) _then)
|
$Res Function(_$LastMessageClassImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of LastMessageClass
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -633,7 +669,7 @@ class _$LastMessageClassImpl implements _LastMessageClass {
|
|||||||
other.updatedAt == updatedAt));
|
other.updatedAt == updatedAt));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(
|
int get hashCode => Object.hash(
|
||||||
runtimeType,
|
runtimeType,
|
||||||
@@ -645,7 +681,9 @@ class _$LastMessageClassImpl implements _LastMessageClass {
|
|||||||
readByToUser,
|
readByToUser,
|
||||||
updatedAt);
|
updatedAt);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of LastMessageClass
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$LastMessageClassImplCopyWith<_$LastMessageClassImpl> get copyWith =>
|
_$$LastMessageClassImplCopyWith<_$LastMessageClassImpl> get copyWith =>
|
||||||
@@ -696,8 +734,11 @@ abstract class _LastMessageClass implements LastMessageClass {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: "updated_at")
|
@JsonKey(name: "updated_at")
|
||||||
DateTime get updatedAt;
|
DateTime get updatedAt;
|
||||||
|
|
||||||
|
/// Create a copy of LastMessageClass
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$LastMessageClassImplCopyWith<_$LastMessageClassImpl> get copyWith =>
|
_$$LastMessageClassImplCopyWith<_$LastMessageClassImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -713,8 +754,12 @@ mixin _$Users {
|
|||||||
@JsonKey(name: "to_chat_user")
|
@JsonKey(name: "to_chat_user")
|
||||||
ChatUser get toChatUser => throw _privateConstructorUsedError;
|
ChatUser get toChatUser => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this Users to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of Users
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
$UsersCopyWith<Users> get copyWith => throw _privateConstructorUsedError;
|
$UsersCopyWith<Users> get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -741,6 +786,8 @@ class _$UsersCopyWithImpl<$Res, $Val extends Users>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of Users
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -759,6 +806,8 @@ class _$UsersCopyWithImpl<$Res, $Val extends Users>
|
|||||||
) as $Val);
|
) as $Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of Users
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$ChatUserCopyWith<$Res> get fromChatUser {
|
$ChatUserCopyWith<$Res> get fromChatUser {
|
||||||
@@ -767,6 +816,8 @@ class _$UsersCopyWithImpl<$Res, $Val extends Users>
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of Users
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$ChatUserCopyWith<$Res> get toChatUser {
|
$ChatUserCopyWith<$Res> get toChatUser {
|
||||||
@@ -801,6 +852,8 @@ class __$$UsersImplCopyWithImpl<$Res>
|
|||||||
_$UsersImpl _value, $Res Function(_$UsersImpl) _then)
|
_$UsersImpl _value, $Res Function(_$UsersImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of Users
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -853,11 +906,13 @@ class _$UsersImpl implements _Users {
|
|||||||
other.toChatUser == toChatUser));
|
other.toChatUser == toChatUser));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, fromChatUser, toChatUser);
|
int get hashCode => Object.hash(runtimeType, fromChatUser, toChatUser);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of Users
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$UsersImplCopyWith<_$UsersImpl> get copyWith =>
|
_$$UsersImplCopyWith<_$UsersImpl> get copyWith =>
|
||||||
@@ -885,8 +940,11 @@ abstract class _Users implements Users {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: "to_chat_user")
|
@JsonKey(name: "to_chat_user")
|
||||||
ChatUser get toChatUser;
|
ChatUser get toChatUser;
|
||||||
|
|
||||||
|
/// Create a copy of Users
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$UsersImplCopyWith<_$UsersImpl> get copyWith =>
|
_$$UsersImplCopyWith<_$UsersImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -906,8 +964,12 @@ mixin _$ChatUser {
|
|||||||
@JsonKey(name: "profile_photo_url")
|
@JsonKey(name: "profile_photo_url")
|
||||||
String get profilePhotoUrl => throw _privateConstructorUsedError;
|
String get profilePhotoUrl => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this ChatUser to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$ChatUserCopyWith<ChatUser> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -934,6 +996,8 @@ class _$ChatUserCopyWithImpl<$Res, $Val extends ChatUser>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ChatUser
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -986,6 +1050,8 @@ class __$$ChatUserImplCopyWithImpl<$Res>
|
|||||||
_$ChatUserImpl _value, $Res Function(_$ChatUserImpl) _then)
|
_$ChatUserImpl _value, $Res Function(_$ChatUserImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ChatUser
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -1058,12 +1124,14 @@ class _$ChatUserImpl implements _ChatUser {
|
|||||||
other.profilePhotoUrl == profilePhotoUrl));
|
other.profilePhotoUrl == profilePhotoUrl));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl);
|
Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of ChatUser
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$ChatUserImplCopyWith<_$ChatUserImpl> get copyWith =>
|
_$$ChatUserImplCopyWith<_$ChatUserImpl> get copyWith =>
|
||||||
@@ -1101,8 +1169,11 @@ abstract class _ChatUser implements ChatUser {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: "profile_photo_url")
|
@JsonKey(name: "profile_photo_url")
|
||||||
String get profilePhotoUrl;
|
String get profilePhotoUrl;
|
||||||
|
|
||||||
|
/// Create a copy of ChatUser
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$ChatUserImplCopyWith<_$ChatUserImpl> get copyWith =>
|
_$$ChatUserImplCopyWith<_$ChatUserImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,8 +30,12 @@ mixin _$ChatRoomSettingsModel {
|
|||||||
@JsonKey(name: 'updated_at')
|
@JsonKey(name: 'updated_at')
|
||||||
String get updatedAt => throw _privateConstructorUsedError;
|
String get updatedAt => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this ChatRoomSettingsModel to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$ChatRoomSettingsModelCopyWith<ChatRoomSettingsModel> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -61,6 +65,8 @@ class _$ChatRoomSettingsModelCopyWithImpl<$Res,
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ChatRoomSettingsModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -121,6 +127,8 @@ class __$$ChatRoomSettingsModelImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$ChatRoomSettingsModelImpl) _then)
|
$Res Function(_$ChatRoomSettingsModelImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ChatRoomSettingsModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -202,12 +210,14 @@ class _$ChatRoomSettingsModelImpl implements _ChatRoomSettingsModel {
|
|||||||
other.updatedAt == updatedAt));
|
other.updatedAt == updatedAt));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
Object.hash(runtimeType, id, roomName, state, accessLevel, updatedAt);
|
Object.hash(runtimeType, id, roomName, state, accessLevel, updatedAt);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of ChatRoomSettingsModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl>
|
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl>
|
||||||
@@ -247,8 +257,11 @@ abstract class _ChatRoomSettingsModel implements ChatRoomSettingsModel {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: 'updated_at')
|
@JsonKey(name: 'updated_at')
|
||||||
String get updatedAt;
|
String get updatedAt;
|
||||||
|
|
||||||
|
/// Create a copy of ChatRoomSettingsModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl>
|
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl>
|
||||||
get copyWith => throw _privateConstructorUsedError;
|
get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,8 +27,12 @@ mixin _$ChatUserModel {
|
|||||||
@JsonKey(name: 'profile_photo_url')
|
@JsonKey(name: 'profile_photo_url')
|
||||||
String? get profilePhotoUrl => throw _privateConstructorUsedError;
|
String? get profilePhotoUrl => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this ChatUserModel to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$ChatUserModelCopyWith<ChatUserModel> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -56,6 +60,8 @@ class _$ChatUserModelCopyWithImpl<$Res, $Val extends ChatUserModel>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ChatUserModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -108,6 +114,8 @@ class __$$ChatUserModelImplCopyWithImpl<$Res>
|
|||||||
_$ChatUserModelImpl _value, $Res Function(_$ChatUserModelImpl) _then)
|
_$ChatUserModelImpl _value, $Res Function(_$ChatUserModelImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ChatUserModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -178,12 +186,14 @@ class _$ChatUserModelImpl implements _ChatUserModel {
|
|||||||
other.profilePhotoUrl == profilePhotoUrl));
|
other.profilePhotoUrl == profilePhotoUrl));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl);
|
Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of ChatUserModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith =>
|
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith =>
|
||||||
@@ -218,8 +228,11 @@ abstract class _ChatUserModel implements ChatUserModel {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: 'profile_photo_url')
|
@JsonKey(name: 'profile_photo_url')
|
||||||
String? get profilePhotoUrl;
|
String? get profilePhotoUrl;
|
||||||
|
|
||||||
|
/// Create a copy of ChatUserModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith =>
|
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,8 +27,12 @@ mixin _$WebsocketInfoModel {
|
|||||||
@JsonKey(name: 'user_id')
|
@JsonKey(name: 'user_id')
|
||||||
int get userId => throw _privateConstructorUsedError;
|
int get userId => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this WebsocketInfoModel to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$WebsocketInfoModelCopyWith<WebsocketInfoModel> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -57,6 +61,8 @@ class _$WebsocketInfoModelCopyWithImpl<$Res, $Val extends WebsocketInfoModel>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of WebsocketInfoModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -115,6 +121,8 @@ class __$$WebsocketInfoModelImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$WebsocketInfoModelImpl) _then)
|
$Res Function(_$WebsocketInfoModelImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of WebsocketInfoModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -191,12 +199,14 @@ class _$WebsocketInfoModelImpl implements _WebsocketInfoModel {
|
|||||||
(identical(other.userId, userId) || other.userId == userId));
|
(identical(other.userId, userId) || other.userId == userId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
Object.hash(runtimeType, key, host, port, cluster, userId);
|
Object.hash(runtimeType, key, host, port, cluster, userId);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of WebsocketInfoModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith =>
|
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith =>
|
||||||
@@ -234,8 +244,11 @@ abstract class _WebsocketInfoModel implements WebsocketInfoModel {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: 'user_id')
|
@JsonKey(name: 'user_id')
|
||||||
int get userId;
|
int get userId;
|
||||||
|
|
||||||
|
/// Create a copy of WebsocketInfoModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith =>
|
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,6 +90,9 @@ class _$ChatRoomStateCopyWithImpl<$Res, $Val extends ChatRoomState>
|
|||||||
final $Val _value;
|
final $Val _value;
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ChatRoomState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -106,6 +109,9 @@ class __$$ChatRoomStateImplCopyWithImpl<$Res>
|
|||||||
__$$ChatRoomStateImplCopyWithImpl(
|
__$$ChatRoomStateImplCopyWithImpl(
|
||||||
_$ChatRoomStateImpl _value, $Res Function(_$ChatRoomStateImpl) _then)
|
_$ChatRoomStateImpl _value, $Res Function(_$ChatRoomStateImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ChatRoomState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -226,6 +232,9 @@ class __$$ChatRoomStateLoadingImplCopyWithImpl<$Res>
|
|||||||
__$$ChatRoomStateLoadingImplCopyWithImpl(_$ChatRoomStateLoadingImpl _value,
|
__$$ChatRoomStateLoadingImplCopyWithImpl(_$ChatRoomStateLoadingImpl _value,
|
||||||
$Res Function(_$ChatRoomStateLoadingImpl) _then)
|
$Res Function(_$ChatRoomStateLoadingImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ChatRoomState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -356,6 +365,8 @@ class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$ChatRoomStateLoadedImpl) _then)
|
$Res Function(_$ChatRoomStateLoadedImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ChatRoomState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -384,6 +395,8 @@ class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res>
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of ChatRoomState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$ChatRoomModelCopyWith<$Res> get chatRoom {
|
$ChatRoomModelCopyWith<$Res> get chatRoom {
|
||||||
@@ -442,7 +455,9 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
|
|||||||
int get hashCode => Object.hash(runtimeType, chatRoom,
|
int get hashCode => Object.hash(runtimeType, chatRoom,
|
||||||
const DeepCollectionEquality().hash(_chatMessages), isTyping, isLoading);
|
const DeepCollectionEquality().hash(_chatMessages), isTyping, isLoading);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of ChatRoomState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith =>
|
_$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith =>
|
||||||
@@ -541,7 +556,10 @@ abstract class ChatRoomStateLoaded implements ChatRoomState {
|
|||||||
List<ChatMessageModel> get chatMessages;
|
List<ChatMessageModel> get chatMessages;
|
||||||
bool get isTyping;
|
bool get isTyping;
|
||||||
bool get isLoading;
|
bool get isLoading;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
_$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -563,6 +581,8 @@ class __$$ChatRoomStateErrorImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$ChatRoomStateErrorImpl) _then)
|
$Res Function(_$ChatRoomStateErrorImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ChatRoomState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -602,7 +622,9 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
|
|||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, errorMessage);
|
int get hashCode => Object.hash(runtimeType, errorMessage);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of ChatRoomState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith =>
|
_$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith =>
|
||||||
@@ -695,7 +717,10 @@ abstract class ChatRoomStateError implements ChatRoomState {
|
|||||||
_$ChatRoomStateErrorImpl;
|
_$ChatRoomStateErrorImpl;
|
||||||
|
|
||||||
String get errorMessage;
|
String get errorMessage;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
_$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,6 +84,9 @@ class _$ChatSelectStateCopyWithImpl<$Res, $Val extends ChatSelectState>
|
|||||||
final $Val _value;
|
final $Val _value;
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ChatSelectState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -100,6 +103,9 @@ class __$$ChatSelectStateImplCopyWithImpl<$Res>
|
|||||||
__$$ChatSelectStateImplCopyWithImpl(
|
__$$ChatSelectStateImplCopyWithImpl(
|
||||||
_$ChatSelectStateImpl _value, $Res Function(_$ChatSelectStateImpl) _then)
|
_$ChatSelectStateImpl _value, $Res Function(_$ChatSelectStateImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ChatSelectState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -216,6 +222,9 @@ class __$$ChatSelectStateLoadingImplCopyWithImpl<$Res>
|
|||||||
_$ChatSelectStateLoadingImpl _value,
|
_$ChatSelectStateLoadingImpl _value,
|
||||||
$Res Function(_$ChatSelectStateLoadingImpl) _then)
|
$Res Function(_$ChatSelectStateLoadingImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ChatSelectState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -334,6 +343,8 @@ class __$$ChatSelectStateErrorImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$ChatSelectStateErrorImpl) _then)
|
$Res Function(_$ChatSelectStateErrorImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ChatSelectState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -373,7 +384,9 @@ class _$ChatSelectStateErrorImpl implements ChatSelectStateError {
|
|||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, errorMessage);
|
int get hashCode => Object.hash(runtimeType, errorMessage);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of ChatSelectState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$ChatSelectStateErrorImplCopyWith<_$ChatSelectStateErrorImpl>
|
_$$ChatSelectStateErrorImplCopyWith<_$ChatSelectStateErrorImpl>
|
||||||
@@ -461,7 +474,10 @@ abstract class ChatSelectStateError implements ChatSelectState {
|
|||||||
_$ChatSelectStateErrorImpl;
|
_$ChatSelectStateErrorImpl;
|
||||||
|
|
||||||
String get errorMessage;
|
String get errorMessage;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of ChatSelectState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$ChatSelectStateErrorImplCopyWith<_$ChatSelectStateErrorImpl>
|
_$$ChatSelectStateErrorImplCopyWith<_$ChatSelectStateErrorImpl>
|
||||||
get copyWith => throw _privateConstructorUsedError;
|
get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -484,6 +500,8 @@ class __$$ChatSelectStateLoadedImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$ChatSelectStateLoadedImpl) _then)
|
$Res Function(_$ChatSelectStateLoadedImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ChatSelectState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -530,7 +548,9 @@ class _$ChatSelectStateLoadedImpl implements ChatSelectStateLoaded {
|
|||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
Object.hash(runtimeType, const DeepCollectionEquality().hash(_chatRooms));
|
Object.hash(runtimeType, const DeepCollectionEquality().hash(_chatRooms));
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of ChatSelectState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$ChatSelectStateLoadedImplCopyWith<_$ChatSelectStateLoadedImpl>
|
_$$ChatSelectStateLoadedImplCopyWith<_$ChatSelectStateLoadedImpl>
|
||||||
@@ -617,7 +637,10 @@ abstract class ChatSelectStateLoaded implements ChatSelectState {
|
|||||||
{required final List<ChatRoom> chatRooms}) = _$ChatSelectStateLoadedImpl;
|
{required final List<ChatRoom> chatRooms}) = _$ChatSelectStateLoadedImpl;
|
||||||
|
|
||||||
List<ChatRoom> get chatRooms;
|
List<ChatRoom> get chatRooms;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of ChatSelectState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$ChatSelectStateLoadedImplCopyWith<_$ChatSelectStateLoadedImpl>
|
_$$ChatSelectStateLoadedImplCopyWith<_$ChatSelectStateLoadedImpl>
|
||||||
get copyWith => throw _privateConstructorUsedError;
|
get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
import 'package:eatvio_app/core/app_export.dart';
|
import 'package:eatvio_app/core/app_export.dart';
|
||||||
import 'package:eatvio_app/features/chat/presentation/bloc/chat_room_cubit/chat_room_cubit.dart';
|
import 'package:eatvio_app/features/chat/presentation/bloc/chat_room_cubit/chat_room_cubit.dart';
|
||||||
import 'package:eatvio_app/features/chat/presentation/bloc/chat_room_cubit/chat_room_state.dart';
|
import 'package:eatvio_app/features/chat/presentation/bloc/chat_room_cubit/chat_room_state.dart';
|
||||||
import 'package:eatvio_app/features/chat/presentation/widgets/chat_bubble_widget.dart';
|
import 'package:eatvio_app/features/chat/presentation/widgets/chat_bubble_widget.dart';
|
||||||
import 'package:eatvio_app/locator_service.dart';
|
import 'package:eatvio_app/locator_service.dart';
|
||||||
import 'package:file_picker/file_picker.dart';
|
import 'package:file_picker/file_picker.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class ChatScreen extends StatefulWidget {
|
class ChatScreen extends StatefulWidget {
|
||||||
@@ -60,7 +59,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
|||||||
} else {
|
} else {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Center(
|
body: Center(
|
||||||
child: CupertinoActivityIndicator(),
|
child: CircularProgressIndicator(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -145,16 +144,25 @@ class _ChatScreenState extends State<ChatScreen> {
|
|||||||
delegate: SliverChildBuilderDelegate(
|
delegate: SliverChildBuilderDelegate(
|
||||||
(context, index) {
|
(context, index) {
|
||||||
if (index < state.chatMessages.length) {
|
if (index < state.chatMessages.length) {
|
||||||
return ChatBubbleWidget(
|
return Column(
|
||||||
sendTime: state.chatMessages[index].updatedAt,
|
children: [
|
||||||
text: state.chatMessages[index].data.trim(),
|
if ((index + 1 != state.chatMessages.length &&
|
||||||
isCurrentUser: state.chatRoom.users['to_chat_user']!.id != state.chatMessages[index].authorId,
|
DateTime.parse(state.chatMessages[index].updatedAt).day !=
|
||||||
mediaData: state.chatMessages[index].mediaData ?? [],
|
DateTime.parse(state.chatMessages[index + 1].updatedAt).day) ||
|
||||||
|
index + 1 == state.chatMessages.length)
|
||||||
|
_messageDate(state.chatMessages[index].updatedAt),
|
||||||
|
ChatBubbleWidget(
|
||||||
|
sendTime: state.chatMessages[index].updatedAt,
|
||||||
|
text: state.chatMessages[index].data.trim(),
|
||||||
|
isCurrentUser: state.chatRoom.users['to_chat_user']!.id != state.chatMessages[index].authorId,
|
||||||
|
mediaData: state.chatMessages[index].mediaData ?? [],
|
||||||
|
),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.all(8),
|
padding: const EdgeInsets.all(8),
|
||||||
child: Center(child: CupertinoActivityIndicator()),
|
child: Center(child: CircularProgressIndicator()),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -311,4 +319,20 @@ class _ChatScreenState extends State<ChatScreen> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_messageDate(String date) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||||
|
child: Text(
|
||||||
|
DateFormat.MMMMd('RU').format(
|
||||||
|
DateTime.parse(date),
|
||||||
|
),
|
||||||
|
style: const TextStyle(
|
||||||
|
height: 1,
|
||||||
|
color: Color(0xFF8393A1),
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import 'package:eatvio_app/features/chat/presentation/bloc/chat_select_cubit/cha
|
|||||||
import 'package:eatvio_app/features/chat/presentation/bloc/chat_select_cubit/chat_select_state.dart';
|
import 'package:eatvio_app/features/chat/presentation/bloc/chat_select_cubit/chat_select_state.dart';
|
||||||
import 'package:eatvio_app/features/chat/presentation/widgets/chat_entry_widget.dart';
|
import 'package:eatvio_app/features/chat/presentation/widgets/chat_entry_widget.dart';
|
||||||
import 'package:eatvio_app/features/chat/presentation/widgets/chat_search_bar_widget.dart';
|
import 'package:eatvio_app/features/chat/presentation/widgets/chat_search_bar_widget.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:eatvio_app/locator_service.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class ChatSelectScreen extends StatefulWidget {
|
class ChatSelectScreen extends StatefulWidget {
|
||||||
@@ -15,58 +15,62 @@ class ChatSelectScreen extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _ChatSelectScreenState extends State<ChatSelectScreen> {
|
class _ChatSelectScreenState extends State<ChatSelectScreen> {
|
||||||
|
final ChatSelectCubit chatSelectCubit = sl<ChatSelectCubit>();
|
||||||
final searchController = TextEditingController();
|
final searchController = TextEditingController();
|
||||||
|
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return BlocBuilder<ChatSelectCubit, ChatSelectState>(
|
return BlocProvider<ChatSelectCubit>(
|
||||||
builder: (context, state) {
|
create: (context) => chatSelectCubit..getChatRooms(),
|
||||||
return Scaffold(
|
child: BlocBuilder<ChatSelectCubit, ChatSelectState>(
|
||||||
appBar: AppBar(
|
builder: (context, state) {
|
||||||
backgroundColor: Colors.white,
|
return Scaffold(
|
||||||
toolbarHeight: 0,
|
appBar: AppBar(
|
||||||
),
|
backgroundColor: Colors.white,
|
||||||
body: NestedScrollView(
|
toolbarHeight: 0,
|
||||||
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
|
),
|
||||||
return [
|
body: NestedScrollView(
|
||||||
SliverPadding(
|
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
|
||||||
padding: const EdgeInsets.only(top: 8),
|
return [
|
||||||
sliver: SliverAppBar(
|
SliverPadding(
|
||||||
automaticallyImplyLeading: false,
|
padding: const EdgeInsets.only(top: 8),
|
||||||
stretchTriggerOffset: 1,
|
sliver: SliverAppBar(
|
||||||
scrolledUnderElevation: 0,
|
automaticallyImplyLeading: false,
|
||||||
floating: true,
|
stretchTriggerOffset: 1,
|
||||||
snap: true,
|
scrolledUnderElevation: 0,
|
||||||
title: Padding(
|
floating: true,
|
||||||
padding: const EdgeInsets.only(top: 8),
|
snap: true,
|
||||||
child: ChatSearchBarWidget(
|
title: Padding(
|
||||||
onSuffixIconTap: () => context.read<ChatSelectCubit>().getChatRooms(),
|
padding: const EdgeInsets.only(top: 8),
|
||||||
onChanged: (query) {
|
child: ChatSearchBarWidget(
|
||||||
if (query.length > 2) {
|
onSuffixIconTap: () => context.read<ChatSelectCubit>().getChatRooms(),
|
||||||
EasyDebounce.debounce(
|
onChanged: (query) {
|
||||||
'searchChatRoom',
|
if (query.length > 2) {
|
||||||
Duration(milliseconds: 300),
|
EasyDebounce.debounce(
|
||||||
() => context.read<ChatSelectCubit>().getChatRooms(query: query),
|
'searchChatRoom',
|
||||||
);
|
Duration(milliseconds: 300),
|
||||||
} else {
|
() => context.read<ChatSelectCubit>().getChatRooms(query: query),
|
||||||
context.read<ChatSelectCubit>().getChatRooms();
|
);
|
||||||
}
|
} else {
|
||||||
},
|
context.read<ChatSelectCubit>().getChatRooms();
|
||||||
controller: searchController,
|
}
|
||||||
fillColor: Color(0xFFF0F2F5),
|
},
|
||||||
hintText: "Поиск",
|
controller: searchController,
|
||||||
hintStyle: TextStyle(
|
fillColor: Color(0xFFF0F2F5),
|
||||||
color: Color(0xFF7B8794),
|
hintText: "Поиск",
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
color: Color(0xFF7B8794),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
];
|
||||||
];
|
},
|
||||||
},
|
body: stateBuilder(state),
|
||||||
body: stateBuilder(state),
|
),
|
||||||
),
|
);
|
||||||
);
|
},
|
||||||
},
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,7 +78,7 @@ class _ChatSelectScreenState extends State<ChatSelectScreen> {
|
|||||||
if (state is ChatSelectStateLoading) {
|
if (state is ChatSelectStateLoading) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Center(
|
body: Center(
|
||||||
child: CupertinoActivityIndicator(),
|
child: CircularProgressIndicator(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else if (state is ChatSelectStateLoaded) {
|
} else if (state is ChatSelectStateLoaded) {
|
||||||
@@ -87,7 +91,7 @@ class _ChatSelectScreenState extends State<ChatSelectScreen> {
|
|||||||
} else {
|
} else {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Center(
|
body: Center(
|
||||||
child: CupertinoActivityIndicator(),
|
child: CircularProgressIndicator(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,8 +29,12 @@ mixin _$DiaryModel {
|
|||||||
DateTime? get wakeup => throw _privateConstructorUsedError;
|
DateTime? get wakeup => throw _privateConstructorUsedError;
|
||||||
DateTime? get retire => throw _privateConstructorUsedError;
|
DateTime? get retire => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this DiaryModel to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$DiaryModelCopyWith<DiaryModel> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -64,6 +68,8 @@ class _$DiaryModelCopyWithImpl<$Res, $Val extends DiaryModel>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of DiaryModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -112,6 +118,8 @@ class _$DiaryModelCopyWithImpl<$Res, $Val extends DiaryModel>
|
|||||||
) as $Val);
|
) as $Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of DiaryModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$StateCopyWith<$Res> get state {
|
$StateCopyWith<$Res> get state {
|
||||||
@@ -151,6 +159,8 @@ class __$$DiaryModelImplCopyWithImpl<$Res>
|
|||||||
_$DiaryModelImpl _value, $Res Function(_$DiaryModelImpl) _then)
|
_$DiaryModelImpl _value, $Res Function(_$DiaryModelImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of DiaryModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -260,7 +270,7 @@ class _$DiaryModelImpl implements _DiaryModel {
|
|||||||
(identical(other.retire, retire) || other.retire == retire));
|
(identical(other.retire, retire) || other.retire == retire));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(
|
int get hashCode => Object.hash(
|
||||||
runtimeType,
|
runtimeType,
|
||||||
@@ -273,7 +283,9 @@ class _$DiaryModelImpl implements _DiaryModel {
|
|||||||
wakeup,
|
wakeup,
|
||||||
retire);
|
retire);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of DiaryModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith =>
|
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith =>
|
||||||
@@ -317,8 +329,11 @@ abstract class _DiaryModel implements DiaryModel {
|
|||||||
DateTime? get wakeup;
|
DateTime? get wakeup;
|
||||||
@override
|
@override
|
||||||
DateTime? get retire;
|
DateTime? get retire;
|
||||||
|
|
||||||
|
/// Create a copy of DiaryModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith =>
|
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,8 +28,12 @@ mixin _$Meal {
|
|||||||
List<Portion> get portions => throw _privateConstructorUsedError;
|
List<Portion> get portions => throw _privateConstructorUsedError;
|
||||||
List<Photo> get photos => throw _privateConstructorUsedError;
|
List<Photo> get photos => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this Meal to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of Meal
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
$MealCopyWith<Meal> get copyWith => throw _privateConstructorUsedError;
|
$MealCopyWith<Meal> get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,6 +62,8 @@ class _$MealCopyWithImpl<$Res, $Val extends Meal>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of Meal
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -126,6 +132,8 @@ class __$$MealImplCopyWithImpl<$Res>
|
|||||||
__$$MealImplCopyWithImpl(_$MealImpl _value, $Res Function(_$MealImpl) _then)
|
__$$MealImplCopyWithImpl(_$MealImpl _value, $Res Function(_$MealImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of Meal
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -232,7 +240,7 @@ class _$MealImpl implements _Meal {
|
|||||||
const DeepCollectionEquality().equals(other._photos, _photos));
|
const DeepCollectionEquality().equals(other._photos, _photos));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(
|
int get hashCode => Object.hash(
|
||||||
runtimeType,
|
runtimeType,
|
||||||
@@ -244,7 +252,9 @@ class _$MealImpl implements _Meal {
|
|||||||
const DeepCollectionEquality().hash(_portions),
|
const DeepCollectionEquality().hash(_portions),
|
||||||
const DeepCollectionEquality().hash(_photos));
|
const DeepCollectionEquality().hash(_photos));
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of Meal
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$MealImplCopyWith<_$MealImpl> get copyWith =>
|
_$$MealImplCopyWith<_$MealImpl> get copyWith =>
|
||||||
@@ -284,8 +294,11 @@ abstract class _Meal implements Meal {
|
|||||||
List<Portion> get portions;
|
List<Portion> get portions;
|
||||||
@override
|
@override
|
||||||
List<Photo> get photos;
|
List<Photo> get photos;
|
||||||
|
|
||||||
|
/// Create a copy of Meal
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$MealImplCopyWith<_$MealImpl> get copyWith =>
|
_$$MealImplCopyWith<_$MealImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,8 +25,12 @@ mixin _$Photo {
|
|||||||
String get originalName => throw _privateConstructorUsedError;
|
String get originalName => throw _privateConstructorUsedError;
|
||||||
String get path => throw _privateConstructorUsedError;
|
String get path => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this Photo to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of Photo
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
$PhotoCopyWith<Photo> get copyWith => throw _privateConstructorUsedError;
|
$PhotoCopyWith<Photo> get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,6 +55,8 @@ class _$PhotoCopyWithImpl<$Res, $Val extends Photo>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of Photo
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -96,6 +102,8 @@ class __$$PhotoImplCopyWithImpl<$Res>
|
|||||||
_$PhotoImpl _value, $Res Function(_$PhotoImpl) _then)
|
_$PhotoImpl _value, $Res Function(_$PhotoImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of Photo
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -155,11 +163,13 @@ class _$PhotoImpl implements _Photo {
|
|||||||
(identical(other.path, path) || other.path == path));
|
(identical(other.path, path) || other.path == path));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, id, originalName, path);
|
int get hashCode => Object.hash(runtimeType, id, originalName, path);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of Photo
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith =>
|
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith =>
|
||||||
@@ -188,8 +198,11 @@ abstract class _Photo implements Photo {
|
|||||||
String get originalName;
|
String get originalName;
|
||||||
@override
|
@override
|
||||||
String get path;
|
String get path;
|
||||||
|
|
||||||
|
/// Create a copy of Photo
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith =>
|
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,8 +26,12 @@ mixin _$Portion {
|
|||||||
String get portion => throw _privateConstructorUsedError;
|
String get portion => throw _privateConstructorUsedError;
|
||||||
bool get from_diet => throw _privateConstructorUsedError;
|
bool get from_diet => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this Portion to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of Portion
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
$PortionCopyWith<Portion> get copyWith => throw _privateConstructorUsedError;
|
$PortionCopyWith<Portion> get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,6 +58,8 @@ class _$PortionCopyWithImpl<$Res, $Val extends Portion>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of Portion
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -111,6 +117,8 @@ class __$$PortionImplCopyWithImpl<$Res>
|
|||||||
_$PortionImpl _value, $Res Function(_$PortionImpl) _then)
|
_$PortionImpl _value, $Res Function(_$PortionImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of Portion
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -189,12 +197,14 @@ class _$PortionImpl implements _Portion {
|
|||||||
other.from_diet == from_diet));
|
other.from_diet == from_diet));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
Object.hash(runtimeType, id, product_name, quantity, portion, from_diet);
|
Object.hash(runtimeType, id, product_name, quantity, portion, from_diet);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of Portion
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$PortionImplCopyWith<_$PortionImpl> get copyWith =>
|
_$$PortionImplCopyWith<_$PortionImpl> get copyWith =>
|
||||||
@@ -228,8 +238,11 @@ abstract class _Portion implements Portion {
|
|||||||
String get portion;
|
String get portion;
|
||||||
@override
|
@override
|
||||||
bool get from_diet;
|
bool get from_diet;
|
||||||
|
|
||||||
|
/// Create a copy of Portion
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$PortionImplCopyWith<_$PortionImpl> get copyWith =>
|
_$$PortionImplCopyWith<_$PortionImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,8 +23,12 @@ mixin _$Product {
|
|||||||
int get id => throw _privateConstructorUsedError;
|
int get id => throw _privateConstructorUsedError;
|
||||||
String get name => throw _privateConstructorUsedError;
|
String get name => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this Product to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of Product
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
$ProductCopyWith<Product> get copyWith => throw _privateConstructorUsedError;
|
$ProductCopyWith<Product> get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,6 +50,8 @@ class _$ProductCopyWithImpl<$Res, $Val extends Product>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of Product
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -83,6 +89,8 @@ class __$$ProductImplCopyWithImpl<$Res>
|
|||||||
_$ProductImpl _value, $Res Function(_$ProductImpl) _then)
|
_$ProductImpl _value, $Res Function(_$ProductImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of Product
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -129,11 +137,13 @@ class _$ProductImpl implements _Product {
|
|||||||
(identical(other.name, name) || other.name == name));
|
(identical(other.name, name) || other.name == name));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, id, name);
|
int get hashCode => Object.hash(runtimeType, id, name);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of Product
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$ProductImplCopyWith<_$ProductImpl> get copyWith =>
|
_$$ProductImplCopyWith<_$ProductImpl> get copyWith =>
|
||||||
@@ -157,8 +167,11 @@ abstract class _Product implements Product {
|
|||||||
int get id;
|
int get id;
|
||||||
@override
|
@override
|
||||||
String get name;
|
String get name;
|
||||||
|
|
||||||
|
/// Create a copy of Product
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$ProductImplCopyWith<_$ProductImpl> get copyWith =>
|
_$$ProductImplCopyWith<_$ProductImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,8 +23,12 @@ mixin _$State {
|
|||||||
bool get has_chosen_diet => throw _privateConstructorUsedError;
|
bool get has_chosen_diet => throw _privateConstructorUsedError;
|
||||||
bool get has_chosen_plan => throw _privateConstructorUsedError;
|
bool get has_chosen_plan => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this State to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of State
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
$StateCopyWith<State> get copyWith => throw _privateConstructorUsedError;
|
$StateCopyWith<State> get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,6 +50,8 @@ class _$StateCopyWithImpl<$Res, $Val extends State>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of State
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -83,6 +89,8 @@ class __$$StateImplCopyWithImpl<$Res>
|
|||||||
_$StateImpl _value, $Res Function(_$StateImpl) _then)
|
_$StateImpl _value, $Res Function(_$StateImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of State
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -132,12 +140,14 @@ class _$StateImpl implements _State {
|
|||||||
other.has_chosen_plan == has_chosen_plan));
|
other.has_chosen_plan == has_chosen_plan));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
Object.hash(runtimeType, has_chosen_diet, has_chosen_plan);
|
Object.hash(runtimeType, has_chosen_diet, has_chosen_plan);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of State
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$StateImplCopyWith<_$StateImpl> get copyWith =>
|
_$$StateImplCopyWith<_$StateImpl> get copyWith =>
|
||||||
@@ -162,8 +172,11 @@ abstract class _State implements State {
|
|||||||
bool get has_chosen_diet;
|
bool get has_chosen_diet;
|
||||||
@override
|
@override
|
||||||
bool get has_chosen_plan;
|
bool get has_chosen_plan;
|
||||||
|
|
||||||
|
/// Create a copy of State
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$StateImplCopyWith<_$StateImpl> get copyWith =>
|
_$$StateImplCopyWith<_$StateImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,6 +174,9 @@ class _$DiaryStateCopyWithImpl<$Res, $Val extends DiaryState>
|
|||||||
final $Val _value;
|
final $Val _value;
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of DiaryState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -190,6 +193,9 @@ class __$$DiaryStateImplCopyWithImpl<$Res>
|
|||||||
__$$DiaryStateImplCopyWithImpl(
|
__$$DiaryStateImplCopyWithImpl(
|
||||||
_$DiaryStateImpl _value, $Res Function(_$DiaryStateImpl) _then)
|
_$DiaryStateImpl _value, $Res Function(_$DiaryStateImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of DiaryState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -397,6 +403,8 @@ class __$$DiaryStateLoadingImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$DiaryStateLoadingImpl) _then)
|
$Res Function(_$DiaryStateLoadingImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of DiaryState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -435,7 +443,9 @@ class _$DiaryStateLoadingImpl implements DiaryStateLoading {
|
|||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, id);
|
int get hashCode => Object.hash(runtimeType, id);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of DiaryState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith =>
|
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith =>
|
||||||
@@ -611,7 +621,10 @@ abstract class DiaryStateLoading implements DiaryState {
|
|||||||
const factory DiaryStateLoading({final int? id}) = _$DiaryStateLoadingImpl;
|
const factory DiaryStateLoading({final int? id}) = _$DiaryStateLoadingImpl;
|
||||||
|
|
||||||
int? get id;
|
int? get id;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -666,6 +679,8 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$DiaryStateLoadedImpl) _then)
|
$Res Function(_$DiaryStateLoadedImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of DiaryState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -819,6 +834,8 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of DiaryState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$DiaryModelCopyWith<$Res> get diary {
|
$DiaryModelCopyWith<$Res> get diary {
|
||||||
@@ -827,6 +844,8 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of DiaryState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$MealCopyWith<$Res> get currentMeal {
|
$MealCopyWith<$Res> get currentMeal {
|
||||||
@@ -835,6 +854,8 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of DiaryState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$SelectionPopupModelCopyWith<$Res> get portionController {
|
$SelectionPopupModelCopyWith<$Res> get portionController {
|
||||||
@@ -1100,7 +1121,9 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
|||||||
const DeepCollectionEquality().hash(_chartDataCounted)
|
const DeepCollectionEquality().hash(_chartDataCounted)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of DiaryState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith =>
|
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith =>
|
||||||
@@ -1420,7 +1443,10 @@ abstract class DiaryStateLoaded implements DiaryState {
|
|||||||
bool get isLoading;
|
bool get isLoading;
|
||||||
bool get isAdded;
|
bool get isAdded;
|
||||||
List<NutritionData>? get chartDataCounted;
|
List<NutritionData>? get chartDataCounted;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -1442,6 +1468,8 @@ class __$$DiaryStateErrorImplCopyWithImpl<$Res>
|
|||||||
_$DiaryStateErrorImpl _value, $Res Function(_$DiaryStateErrorImpl) _then)
|
_$DiaryStateErrorImpl _value, $Res Function(_$DiaryStateErrorImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of DiaryState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -1481,7 +1509,9 @@ class _$DiaryStateErrorImpl implements DiaryStateError {
|
|||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, errorMessage);
|
int get hashCode => Object.hash(runtimeType, errorMessage);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of DiaryState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith =>
|
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith =>
|
||||||
@@ -1658,7 +1688,10 @@ abstract class DiaryStateError implements DiaryState {
|
|||||||
_$DiaryStateErrorImpl;
|
_$DiaryStateErrorImpl;
|
||||||
|
|
||||||
String get errorMessage;
|
String get errorMessage;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import 'package:eatvio_app/features/diary/presentation/bloc/diary_state.dart';
|
|||||||
import 'package:eatvio_app/core/app_export.dart';
|
import 'package:eatvio_app/core/app_export.dart';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
||||||
|
|
||||||
// ignore: must_be_immutable
|
// ignore: must_be_immutable
|
||||||
@@ -29,7 +28,7 @@ class DiaryRecommendationsScreen extends StatelessWidget {
|
|||||||
} else if (state is DiaryStateLoading) {
|
} else if (state is DiaryStateLoading) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Center(
|
body: Center(
|
||||||
child: CupertinoActivityIndicator(),
|
child: CircularProgressIndicator(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else if (state is DiaryStateError) {
|
} else if (state is DiaryStateError) {
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import 'package:eatvio_app/widgets/custom_scale_element.dart';
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
||||||
import 'package:image_picker/image_picker.dart';
|
import 'package:image_picker/image_picker.dart';
|
||||||
import 'package:syncfusion_flutter_charts/charts.dart';
|
import 'package:syncfusion_flutter_charts/charts.dart';
|
||||||
@@ -39,7 +38,7 @@ class DiaryScreen extends StatelessWidget {
|
|||||||
} else if (state is DiaryStateLoading) {
|
} else if (state is DiaryStateLoading) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Center(
|
body: Center(
|
||||||
child: CupertinoActivityIndicator(),
|
child: CircularProgressIndicator(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else if (state is DiaryStateError) {
|
} else if (state is DiaryStateError) {
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import 'package:eatvio_app/features/feed/presentation/bloc/comments_cubit/commen
|
|||||||
import 'package:eatvio_app/features/feed/presentation/bloc/comments_cubit/comments_state.dart';
|
import 'package:eatvio_app/features/feed/presentation/bloc/comments_cubit/comments_state.dart';
|
||||||
import 'package:eatvio_app/features/feed/presentation/widgets/comments_widget.dart';
|
import 'package:eatvio_app/features/feed/presentation/widgets/comments_widget.dart';
|
||||||
import 'package:eatvio_app/locator_service.dart';
|
import 'package:eatvio_app/locator_service.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
|
|
||||||
@@ -327,7 +326,7 @@ class _AboutDietScreenState extends State<AboutDietScreen> {
|
|||||||
if (state is CommentsStateLoading)
|
if (state is CommentsStateLoading)
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(32),
|
padding: const EdgeInsets.all(32),
|
||||||
child: CupertinoActivityIndicator(),
|
child: CircularProgressIndicator(),
|
||||||
),
|
),
|
||||||
if (state is CommentsStateLoaded)
|
if (state is CommentsStateLoaded)
|
||||||
CommentsWidget(
|
CommentsWidget(
|
||||||
|
|||||||
@@ -27,8 +27,12 @@ mixin _$CommentModel {
|
|||||||
@JsonKey(name: "meta")
|
@JsonKey(name: "meta")
|
||||||
Meta get meta => throw _privateConstructorUsedError;
|
Meta get meta => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this CommentModel to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$CommentModelCopyWith<CommentModel> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -58,6 +62,8 @@ class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of CommentModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -81,6 +87,8 @@ class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel>
|
|||||||
) as $Val);
|
) as $Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of CommentModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$LinksCopyWith<$Res> get links {
|
$LinksCopyWith<$Res> get links {
|
||||||
@@ -89,6 +97,8 @@ class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel>
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of CommentModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$MetaCopyWith<$Res> get meta {
|
$MetaCopyWith<$Res> get meta {
|
||||||
@@ -125,6 +135,8 @@ class __$$CommentModelImplCopyWithImpl<$Res>
|
|||||||
_$CommentModelImpl _value, $Res Function(_$CommentModelImpl) _then)
|
_$CommentModelImpl _value, $Res Function(_$CommentModelImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of CommentModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -192,12 +204,14 @@ class _$CommentModelImpl implements _CommentModel {
|
|||||||
(identical(other.meta, meta) || other.meta == meta));
|
(identical(other.meta, meta) || other.meta == meta));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(
|
int get hashCode => Object.hash(
|
||||||
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of CommentModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith =>
|
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith =>
|
||||||
@@ -229,8 +243,11 @@ abstract class _CommentModel implements CommentModel {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: "meta")
|
@JsonKey(name: "meta")
|
||||||
Meta get meta;
|
Meta get meta;
|
||||||
|
|
||||||
|
/// Create a copy of CommentModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith =>
|
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -254,8 +271,12 @@ mixin _$Comment {
|
|||||||
@JsonKey(name: "created_at")
|
@JsonKey(name: "created_at")
|
||||||
DateTime get createdAt => throw _privateConstructorUsedError;
|
DateTime get createdAt => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this Comment to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of Comment
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
$CommentCopyWith<Comment> get copyWith => throw _privateConstructorUsedError;
|
$CommentCopyWith<Comment> get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -283,6 +304,8 @@ class _$CommentCopyWithImpl<$Res, $Val extends Comment>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of Comment
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -346,6 +369,8 @@ class __$$CommentImplCopyWithImpl<$Res>
|
|||||||
_$CommentImpl _value, $Res Function(_$CommentImpl) _then)
|
_$CommentImpl _value, $Res Function(_$CommentImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of Comment
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -449,7 +474,7 @@ class _$CommentImpl implements _Comment {
|
|||||||
other.createdAt == createdAt));
|
other.createdAt == createdAt));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(
|
int get hashCode => Object.hash(
|
||||||
runtimeType,
|
runtimeType,
|
||||||
@@ -460,7 +485,9 @@ class _$CommentImpl implements _Comment {
|
|||||||
const DeepCollectionEquality().hash(_childrenComments),
|
const DeepCollectionEquality().hash(_childrenComments),
|
||||||
createdAt);
|
createdAt);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of Comment
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$CommentImplCopyWith<_$CommentImpl> get copyWith =>
|
_$$CommentImplCopyWith<_$CommentImpl> get copyWith =>
|
||||||
@@ -506,8 +533,11 @@ abstract class _Comment implements Comment {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: "created_at")
|
@JsonKey(name: "created_at")
|
||||||
DateTime get createdAt;
|
DateTime get createdAt;
|
||||||
|
|
||||||
|
/// Create a copy of Comment
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$CommentImplCopyWith<_$CommentImpl> get copyWith =>
|
_$$CommentImplCopyWith<_$CommentImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,8 +27,12 @@ mixin _$DietsPagination {
|
|||||||
@JsonKey(name: "meta")
|
@JsonKey(name: "meta")
|
||||||
Meta get meta => throw _privateConstructorUsedError;
|
Meta get meta => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this DietsPagination to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$DietsPaginationCopyWith<DietsPagination> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -58,6 +62,8 @@ class _$DietsPaginationCopyWithImpl<$Res, $Val extends DietsPagination>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of DietsPagination
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -81,6 +87,8 @@ class _$DietsPaginationCopyWithImpl<$Res, $Val extends DietsPagination>
|
|||||||
) as $Val);
|
) as $Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of DietsPagination
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$LinksCopyWith<$Res> get links {
|
$LinksCopyWith<$Res> get links {
|
||||||
@@ -89,6 +97,8 @@ class _$DietsPaginationCopyWithImpl<$Res, $Val extends DietsPagination>
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of DietsPagination
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$MetaCopyWith<$Res> get meta {
|
$MetaCopyWith<$Res> get meta {
|
||||||
@@ -125,6 +135,8 @@ class __$$DietsPaginationImplCopyWithImpl<$Res>
|
|||||||
_$DietsPaginationImpl _value, $Res Function(_$DietsPaginationImpl) _then)
|
_$DietsPaginationImpl _value, $Res Function(_$DietsPaginationImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of DietsPagination
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -192,12 +204,14 @@ class _$DietsPaginationImpl implements _DietsPagination {
|
|||||||
(identical(other.meta, meta) || other.meta == meta));
|
(identical(other.meta, meta) || other.meta == meta));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(
|
int get hashCode => Object.hash(
|
||||||
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of DietsPagination
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$DietsPaginationImplCopyWith<_$DietsPaginationImpl> get copyWith =>
|
_$$DietsPaginationImplCopyWith<_$DietsPaginationImpl> get copyWith =>
|
||||||
@@ -230,8 +244,11 @@ abstract class _DietsPagination implements DietsPagination {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: "meta")
|
@JsonKey(name: "meta")
|
||||||
Meta get meta;
|
Meta get meta;
|
||||||
|
|
||||||
|
/// Create a copy of DietsPagination
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$DietsPaginationImplCopyWith<_$DietsPaginationImpl> get copyWith =>
|
_$$DietsPaginationImplCopyWith<_$DietsPaginationImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -268,8 +285,12 @@ mixin _$Diet {
|
|||||||
@JsonKey(name: "total_comments")
|
@JsonKey(name: "total_comments")
|
||||||
int get totalComments => throw _privateConstructorUsedError;
|
int get totalComments => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this Diet to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of Diet
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
$DietCopyWith<Diet> get copyWith => throw _privateConstructorUsedError;
|
$DietCopyWith<Diet> get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -307,6 +328,8 @@ class _$DietCopyWithImpl<$Res, $Val extends Diet>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of Diet
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -375,6 +398,8 @@ class _$DietCopyWithImpl<$Res, $Val extends Diet>
|
|||||||
) as $Val);
|
) as $Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of Diet
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$DietTypeCopyWith<$Res> get type {
|
$DietTypeCopyWith<$Res> get type {
|
||||||
@@ -383,6 +408,8 @@ class _$DietCopyWithImpl<$Res, $Val extends Diet>
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of Diet
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$AuthorCopyWith<$Res> get author {
|
$AuthorCopyWith<$Res> get author {
|
||||||
@@ -427,6 +454,8 @@ class __$$DietImplCopyWithImpl<$Res>
|
|||||||
__$$DietImplCopyWithImpl(_$DietImpl _value, $Res Function(_$DietImpl) _then)
|
__$$DietImplCopyWithImpl(_$DietImpl _value, $Res Function(_$DietImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of Diet
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -590,7 +619,7 @@ class _$DietImpl implements _Diet {
|
|||||||
other.totalComments == totalComments));
|
other.totalComments == totalComments));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(
|
int get hashCode => Object.hash(
|
||||||
runtimeType,
|
runtimeType,
|
||||||
@@ -607,7 +636,9 @@ class _$DietImpl implements _Diet {
|
|||||||
totalViews,
|
totalViews,
|
||||||
totalComments);
|
totalComments);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of Diet
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$DietImplCopyWith<_$DietImpl> get copyWith =>
|
_$$DietImplCopyWith<_$DietImpl> get copyWith =>
|
||||||
@@ -676,8 +707,11 @@ abstract class _Diet implements Diet {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: "total_comments")
|
@JsonKey(name: "total_comments")
|
||||||
int get totalComments;
|
int get totalComments;
|
||||||
|
|
||||||
|
/// Create a copy of Diet
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$DietImplCopyWith<_$DietImpl> get copyWith =>
|
_$$DietImplCopyWith<_$DietImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -697,8 +731,12 @@ mixin _$Author {
|
|||||||
@JsonKey(name: "author_is_me")
|
@JsonKey(name: "author_is_me")
|
||||||
bool get authorIsMe => throw _privateConstructorUsedError;
|
bool get authorIsMe => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this Author to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of Author
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
$AuthorCopyWith<Author> get copyWith => throw _privateConstructorUsedError;
|
$AuthorCopyWith<Author> get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -724,6 +762,8 @@ class _$AuthorCopyWithImpl<$Res, $Val extends Author>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of Author
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -775,6 +815,8 @@ class __$$AuthorImplCopyWithImpl<$Res>
|
|||||||
_$AuthorImpl _value, $Res Function(_$AuthorImpl) _then)
|
_$AuthorImpl _value, $Res Function(_$AuthorImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of Author
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -849,12 +891,14 @@ class _$AuthorImpl implements _Author {
|
|||||||
other.authorIsMe == authorIsMe));
|
other.authorIsMe == authorIsMe));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(
|
int get hashCode => Object.hash(
|
||||||
runtimeType, authorSlug, authorName, authorProfileIcon, authorIsMe);
|
runtimeType, authorSlug, authorName, authorProfileIcon, authorIsMe);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of Author
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$AuthorImplCopyWith<_$AuthorImpl> get copyWith =>
|
_$$AuthorImplCopyWith<_$AuthorImpl> get copyWith =>
|
||||||
@@ -891,8 +935,11 @@ abstract class _Author implements Author {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: "author_is_me")
|
@JsonKey(name: "author_is_me")
|
||||||
bool get authorIsMe;
|
bool get authorIsMe;
|
||||||
|
|
||||||
|
/// Create a copy of Author
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$AuthorImplCopyWith<_$AuthorImpl> get copyWith =>
|
_$$AuthorImplCopyWith<_$AuthorImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -912,8 +959,12 @@ mixin _$DailySchedule {
|
|||||||
@JsonKey(name: "quantity")
|
@JsonKey(name: "quantity")
|
||||||
int get quantity => throw _privateConstructorUsedError;
|
int get quantity => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this DailySchedule to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$DailyScheduleCopyWith<DailySchedule> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -941,6 +992,8 @@ class _$DailyScheduleCopyWithImpl<$Res, $Val extends DailySchedule>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of DailySchedule
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -993,6 +1046,8 @@ class __$$DailyScheduleImplCopyWithImpl<$Res>
|
|||||||
_$DailyScheduleImpl _value, $Res Function(_$DailyScheduleImpl) _then)
|
_$DailyScheduleImpl _value, $Res Function(_$DailyScheduleImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of DailySchedule
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -1064,11 +1119,13 @@ class _$DailyScheduleImpl implements _DailySchedule {
|
|||||||
other.quantity == quantity));
|
other.quantity == quantity));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, name, uniq, portion, quantity);
|
int get hashCode => Object.hash(runtimeType, name, uniq, portion, quantity);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of DailySchedule
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$DailyScheduleImplCopyWith<_$DailyScheduleImpl> get copyWith =>
|
_$$DailyScheduleImplCopyWith<_$DailyScheduleImpl> get copyWith =>
|
||||||
@@ -1105,8 +1162,11 @@ abstract class _DailySchedule implements DailySchedule {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: "quantity")
|
@JsonKey(name: "quantity")
|
||||||
int get quantity;
|
int get quantity;
|
||||||
|
|
||||||
|
/// Create a copy of DailySchedule
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$DailyScheduleImplCopyWith<_$DailyScheduleImpl> get copyWith =>
|
_$$DailyScheduleImplCopyWith<_$DailyScheduleImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -1126,8 +1186,12 @@ mixin _$DietType {
|
|||||||
@JsonKey(name: "meat")
|
@JsonKey(name: "meat")
|
||||||
bool? get meat => throw _privateConstructorUsedError;
|
bool? get meat => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this DietType to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$DietTypeCopyWith<DietType> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -1154,6 +1218,8 @@ class _$DietTypeCopyWithImpl<$Res, $Val extends DietType>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of DietType
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -1206,6 +1272,8 @@ class __$$DietTypeImplCopyWithImpl<$Res>
|
|||||||
_$DietTypeImpl _value, $Res Function(_$DietTypeImpl) _then)
|
_$DietTypeImpl _value, $Res Function(_$DietTypeImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of DietType
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -1276,11 +1344,13 @@ class _$DietTypeImpl implements _DietType {
|
|||||||
(identical(other.meat, meat) || other.meat == meat));
|
(identical(other.meat, meat) || other.meat == meat));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, alko, veg, corb, meat);
|
int get hashCode => Object.hash(runtimeType, alko, veg, corb, meat);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of DietType
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$DietTypeImplCopyWith<_$DietTypeImpl> get copyWith =>
|
_$$DietTypeImplCopyWith<_$DietTypeImpl> get copyWith =>
|
||||||
@@ -1316,8 +1386,11 @@ abstract class _DietType implements DietType {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: "meat")
|
@JsonKey(name: "meat")
|
||||||
bool? get meat;
|
bool? get meat;
|
||||||
|
|
||||||
|
/// Create a copy of DietType
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$DietTypeImplCopyWith<_$DietTypeImpl> get copyWith =>
|
_$$DietTypeImplCopyWith<_$DietTypeImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,8 +41,12 @@ mixin _$FeedBlogPostModel {
|
|||||||
@JsonKey(name: "was_liked_by_me")
|
@JsonKey(name: "was_liked_by_me")
|
||||||
bool get wasLikedByMe => throw _privateConstructorUsedError;
|
bool get wasLikedByMe => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this FeedBlogPostModel to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$FeedBlogPostModelCopyWith<FeedBlogPostModel> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -81,6 +85,8 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of FeedBlogPostModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -154,6 +160,8 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
|
|||||||
) as $Val);
|
) as $Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of FeedBlogPostModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$AuthorCopyWith<$Res> get author {
|
$AuthorCopyWith<$Res> get author {
|
||||||
@@ -198,6 +206,8 @@ class __$$FeedBlogPostModelImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$FeedBlogPostModelImpl) _then)
|
$Res Function(_$FeedBlogPostModelImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of FeedBlogPostModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -360,7 +370,7 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
|
|||||||
other.wasLikedByMe == wasLikedByMe));
|
other.wasLikedByMe == wasLikedByMe));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(
|
int get hashCode => Object.hash(
|
||||||
runtimeType,
|
runtimeType,
|
||||||
@@ -378,7 +388,9 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
|
|||||||
totalComments,
|
totalComments,
|
||||||
wasLikedByMe);
|
wasLikedByMe);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of FeedBlogPostModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
|
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
|
||||||
@@ -446,8 +458,11 @@ abstract class _FeedBlogPostModel implements FeedBlogPostModel {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: "was_liked_by_me")
|
@JsonKey(name: "was_liked_by_me")
|
||||||
bool get wasLikedByMe;
|
bool get wasLikedByMe;
|
||||||
|
|
||||||
|
/// Create a copy of FeedBlogPostModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
|
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,8 +26,12 @@ mixin _$FeedBlogPostSettingsModel {
|
|||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
Meta get meta => throw _privateConstructorUsedError;
|
Meta get meta => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this FeedBlogPostSettingsModel to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$FeedBlogPostSettingsModelCopyWith<FeedBlogPostSettingsModel> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -56,6 +60,8 @@ class _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of FeedBlogPostSettingsModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -74,6 +80,8 @@ class _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
|
|||||||
) as $Val);
|
) as $Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of FeedBlogPostSettingsModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$MetaCopyWith<$Res> get meta {
|
$MetaCopyWith<$Res> get meta {
|
||||||
@@ -110,6 +118,8 @@ class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$FeedBlogPostSettingsModelImpl) _then)
|
$Res Function(_$FeedBlogPostSettingsModelImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of FeedBlogPostSettingsModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -169,12 +179,14 @@ class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
|
|||||||
(identical(other.meta, meta) || other.meta == meta));
|
(identical(other.meta, meta) || other.meta == meta));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,
|
int get hashCode => Object.hash(runtimeType,
|
||||||
const DeepCollectionEquality().hash(_feedBlogPostList), meta);
|
const DeepCollectionEquality().hash(_feedBlogPostList), meta);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of FeedBlogPostSettingsModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
|
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
|
||||||
@@ -203,8 +215,11 @@ abstract class _FeedBlogPostSettingsModel implements FeedBlogPostSettingsModel {
|
|||||||
List<FeedBlogPostModel> get feedBlogPostList;
|
List<FeedBlogPostModel> get feedBlogPostList;
|
||||||
@override
|
@override
|
||||||
Meta get meta;
|
Meta get meta;
|
||||||
|
|
||||||
|
/// Create a copy of FeedBlogPostSettingsModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
|
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
|
||||||
get copyWith => throw _privateConstructorUsedError;
|
get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,8 +45,12 @@ mixin _$Recipes {
|
|||||||
int get viewsCount => throw _privateConstructorUsedError;
|
int get viewsCount => throw _privateConstructorUsedError;
|
||||||
Author get author => throw _privateConstructorUsedError;
|
Author get author => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this Recipes to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of Recipes
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
$RecipesCopyWith<Recipes> get copyWith => throw _privateConstructorUsedError;
|
$RecipesCopyWith<Recipes> get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,6 +91,8 @@ class _$RecipesCopyWithImpl<$Res, $Val extends Recipes>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of Recipes
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -180,6 +186,8 @@ class _$RecipesCopyWithImpl<$Res, $Val extends Recipes>
|
|||||||
) as $Val);
|
) as $Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of Recipes
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$AuthorCopyWith<$Res> get author {
|
$AuthorCopyWith<$Res> get author {
|
||||||
@@ -227,6 +235,8 @@ class __$$RecipesImplCopyWithImpl<$Res>
|
|||||||
_$RecipesImpl _value, $Res Function(_$RecipesImpl) _then)
|
_$RecipesImpl _value, $Res Function(_$RecipesImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of Recipes
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -440,7 +450,7 @@ class _$RecipesImpl implements _Recipes {
|
|||||||
(identical(other.author, author) || other.author == author));
|
(identical(other.author, author) || other.author == author));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(
|
int get hashCode => Object.hash(
|
||||||
runtimeType,
|
runtimeType,
|
||||||
@@ -462,7 +472,9 @@ class _$RecipesImpl implements _Recipes {
|
|||||||
viewsCount,
|
viewsCount,
|
||||||
author);
|
author);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of Recipes
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith =>
|
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith =>
|
||||||
@@ -539,8 +551,11 @@ abstract class _Recipes implements Recipes {
|
|||||||
int get viewsCount;
|
int get viewsCount;
|
||||||
@override
|
@override
|
||||||
Author get author;
|
Author get author;
|
||||||
|
|
||||||
|
/// Create a copy of Recipes
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith =>
|
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -555,8 +570,12 @@ mixin _$Ingredient {
|
|||||||
String? get unit => throw _privateConstructorUsedError;
|
String? get unit => throw _privateConstructorUsedError;
|
||||||
String get portion => throw _privateConstructorUsedError;
|
String get portion => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this Ingredient to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$IngredientCopyWith<Ingredient> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -580,6 +599,8 @@ class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of Ingredient
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -623,6 +644,8 @@ class __$$IngredientImplCopyWithImpl<$Res>
|
|||||||
_$IngredientImpl _value, $Res Function(_$IngredientImpl) _then)
|
_$IngredientImpl _value, $Res Function(_$IngredientImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of Ingredient
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -678,11 +701,13 @@ class _$IngredientImpl implements _Ingredient {
|
|||||||
(identical(other.portion, portion) || other.portion == portion));
|
(identical(other.portion, portion) || other.portion == portion));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, name, unit, portion);
|
int get hashCode => Object.hash(runtimeType, name, unit, portion);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of Ingredient
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
|
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
|
||||||
@@ -711,8 +736,11 @@ abstract class _Ingredient implements Ingredient {
|
|||||||
String? get unit;
|
String? get unit;
|
||||||
@override
|
@override
|
||||||
String get portion;
|
String get portion;
|
||||||
|
|
||||||
|
/// Create a copy of Ingredient
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
|
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -726,8 +754,12 @@ mixin _$Step {
|
|||||||
String get image => throw _privateConstructorUsedError;
|
String get image => throw _privateConstructorUsedError;
|
||||||
String get description => throw _privateConstructorUsedError;
|
String get description => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this Step to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of Step
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
$StepCopyWith<Step> get copyWith => throw _privateConstructorUsedError;
|
$StepCopyWith<Step> get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -749,6 +781,8 @@ class _$StepCopyWithImpl<$Res, $Val extends Step>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of Step
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -785,6 +819,8 @@ class __$$StepImplCopyWithImpl<$Res>
|
|||||||
__$$StepImplCopyWithImpl(_$StepImpl _value, $Res Function(_$StepImpl) _then)
|
__$$StepImplCopyWithImpl(_$StepImpl _value, $Res Function(_$StepImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of Step
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -832,11 +868,13 @@ class _$StepImpl implements _Step {
|
|||||||
other.description == description));
|
other.description == description));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, image, description);
|
int get hashCode => Object.hash(runtimeType, image, description);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of Step
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
|
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
|
||||||
@@ -861,8 +899,11 @@ abstract class _Step implements Step {
|
|||||||
String get image;
|
String get image;
|
||||||
@override
|
@override
|
||||||
String get description;
|
String get description;
|
||||||
|
|
||||||
|
/// Create a copy of Step
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
|
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,8 +23,12 @@ mixin _$RecipesPagination {
|
|||||||
@JsonKey(name: 'data')
|
@JsonKey(name: 'data')
|
||||||
List<Recipes> get recipesList => throw _privateConstructorUsedError;
|
List<Recipes> get recipesList => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this RecipesPagination to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$RecipesPaginationCopyWith<RecipesPagination> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -48,6 +52,8 @@ class _$RecipesPaginationCopyWithImpl<$Res, $Val extends RecipesPagination>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of RecipesPagination
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -81,6 +87,8 @@ class __$$RecipesPaginationImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$RecipesPaginationImpl) _then)
|
$Res Function(_$RecipesPaginationImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of RecipesPagination
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -128,12 +136,14 @@ class _$RecipesPaginationImpl implements _RecipesPagination {
|
|||||||
.equals(other._recipesList, _recipesList));
|
.equals(other._recipesList, _recipesList));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(
|
int get hashCode => Object.hash(
|
||||||
runtimeType, const DeepCollectionEquality().hash(_recipesList));
|
runtimeType, const DeepCollectionEquality().hash(_recipesList));
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of RecipesPagination
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith =>
|
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith =>
|
||||||
@@ -159,8 +169,11 @@ abstract class _RecipesPagination implements RecipesPagination {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: 'data')
|
@JsonKey(name: 'data')
|
||||||
List<Recipes> get recipesList;
|
List<Recipes> get recipesList;
|
||||||
|
|
||||||
|
/// Create a copy of RecipesPagination
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith =>
|
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,6 +84,9 @@ class _$CommentsStateCopyWithImpl<$Res, $Val extends CommentsState>
|
|||||||
final $Val _value;
|
final $Val _value;
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of CommentsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -100,6 +103,9 @@ class __$$CommentsStateImplCopyWithImpl<$Res>
|
|||||||
__$$CommentsStateImplCopyWithImpl(
|
__$$CommentsStateImplCopyWithImpl(
|
||||||
_$CommentsStateImpl _value, $Res Function(_$CommentsStateImpl) _then)
|
_$CommentsStateImpl _value, $Res Function(_$CommentsStateImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of CommentsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -214,6 +220,9 @@ class __$$CommentsStateLoadingImplCopyWithImpl<$Res>
|
|||||||
__$$CommentsStateLoadingImplCopyWithImpl(_$CommentsStateLoadingImpl _value,
|
__$$CommentsStateLoadingImplCopyWithImpl(_$CommentsStateLoadingImpl _value,
|
||||||
$Res Function(_$CommentsStateLoadingImpl) _then)
|
$Res Function(_$CommentsStateLoadingImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of CommentsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -334,6 +343,8 @@ class __$$CommentsStateLoadedImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$CommentsStateLoadedImpl) _then)
|
$Res Function(_$CommentsStateLoadedImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of CommentsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -352,6 +363,8 @@ class __$$CommentsStateLoadedImplCopyWithImpl<$Res>
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of CommentsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$CommentModelCopyWith<$Res> get comment {
|
$CommentModelCopyWith<$Res> get comment {
|
||||||
@@ -388,7 +401,9 @@ class _$CommentsStateLoadedImpl implements CommentsStateLoaded {
|
|||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, comment, replyId);
|
int get hashCode => Object.hash(runtimeType, comment, replyId);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of CommentsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$CommentsStateLoadedImplCopyWith<_$CommentsStateLoadedImpl> get copyWith =>
|
_$$CommentsStateLoadedImplCopyWith<_$CommentsStateLoadedImpl> get copyWith =>
|
||||||
@@ -477,7 +492,10 @@ abstract class CommentsStateLoaded implements CommentsState {
|
|||||||
|
|
||||||
CommentModel get comment;
|
CommentModel get comment;
|
||||||
int? get replyId;
|
int? get replyId;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
_$$CommentsStateLoadedImplCopyWith<_$CommentsStateLoadedImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -499,6 +517,8 @@ class __$$CommentsStateErrorImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$CommentsStateErrorImpl) _then)
|
$Res Function(_$CommentsStateErrorImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of CommentsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -538,7 +558,9 @@ class _$CommentsStateErrorImpl implements CommentsStateError {
|
|||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, errorMessage);
|
int get hashCode => Object.hash(runtimeType, errorMessage);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of CommentsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$CommentsStateErrorImplCopyWith<_$CommentsStateErrorImpl> get copyWith =>
|
_$$CommentsStateErrorImplCopyWith<_$CommentsStateErrorImpl> get copyWith =>
|
||||||
@@ -625,7 +647,10 @@ abstract class CommentsStateError implements CommentsState {
|
|||||||
_$CommentsStateErrorImpl;
|
_$CommentsStateErrorImpl;
|
||||||
|
|
||||||
String get errorMessage;
|
String get errorMessage;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
_$$CommentsStateErrorImplCopyWith<_$CommentsStateErrorImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,6 +84,9 @@ class _$DietsStateCopyWithImpl<$Res, $Val extends DietsState>
|
|||||||
final $Val _value;
|
final $Val _value;
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of DietsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -100,6 +103,9 @@ class __$$DietsStateImplCopyWithImpl<$Res>
|
|||||||
__$$DietsStateImplCopyWithImpl(
|
__$$DietsStateImplCopyWithImpl(
|
||||||
_$DietsStateImpl _value, $Res Function(_$DietsStateImpl) _then)
|
_$DietsStateImpl _value, $Res Function(_$DietsStateImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of DietsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -214,6 +220,9 @@ class __$$DietsStateLoadingImplCopyWithImpl<$Res>
|
|||||||
__$$DietsStateLoadingImplCopyWithImpl(_$DietsStateLoadingImpl _value,
|
__$$DietsStateLoadingImplCopyWithImpl(_$DietsStateLoadingImpl _value,
|
||||||
$Res Function(_$DietsStateLoadingImpl) _then)
|
$Res Function(_$DietsStateLoadingImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of DietsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -333,6 +342,8 @@ class __$$DietsStateLoadedImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$DietsStateLoadedImpl) _then)
|
$Res Function(_$DietsStateLoadedImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of DietsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -346,6 +357,8 @@ class __$$DietsStateLoadedImplCopyWithImpl<$Res>
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of DietsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$DietsPaginationCopyWith<$Res> get diets {
|
$DietsPaginationCopyWith<$Res> get diets {
|
||||||
@@ -379,7 +392,9 @@ class _$DietsStateLoadedImpl implements DietsStateLoaded {
|
|||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, diets);
|
int get hashCode => Object.hash(runtimeType, diets);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of DietsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$DietsStateLoadedImplCopyWith<_$DietsStateLoadedImpl> get copyWith =>
|
_$$DietsStateLoadedImplCopyWith<_$DietsStateLoadedImpl> get copyWith =>
|
||||||
@@ -466,7 +481,10 @@ abstract class DietsStateLoaded implements DietsState {
|
|||||||
_$DietsStateLoadedImpl;
|
_$DietsStateLoadedImpl;
|
||||||
|
|
||||||
DietsPagination get diets;
|
DietsPagination get diets;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
_$$DietsStateLoadedImplCopyWith<_$DietsStateLoadedImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -488,6 +506,8 @@ class __$$DietsStateErrorImplCopyWithImpl<$Res>
|
|||||||
_$DietsStateErrorImpl _value, $Res Function(_$DietsStateErrorImpl) _then)
|
_$DietsStateErrorImpl _value, $Res Function(_$DietsStateErrorImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of DietsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -527,7 +547,9 @@ class _$DietsStateErrorImpl implements DietsStateError {
|
|||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, errorMessage);
|
int get hashCode => Object.hash(runtimeType, errorMessage);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of DietsState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$DietsStateErrorImplCopyWith<_$DietsStateErrorImpl> get copyWith =>
|
_$$DietsStateErrorImplCopyWith<_$DietsStateErrorImpl> get copyWith =>
|
||||||
@@ -614,7 +636,10 @@ abstract class DietsStateError implements DietsState {
|
|||||||
_$DietsStateErrorImpl;
|
_$DietsStateErrorImpl;
|
||||||
|
|
||||||
String get errorMessage;
|
String get errorMessage;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
_$$DietsStateErrorImplCopyWith<_$DietsStateErrorImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,6 +87,9 @@ class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState>
|
|||||||
final $Val _value;
|
final $Val _value;
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of FeedState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -103,6 +106,9 @@ class __$$FeedStateImplCopyWithImpl<$Res>
|
|||||||
__$$FeedStateImplCopyWithImpl(
|
__$$FeedStateImplCopyWithImpl(
|
||||||
_$FeedStateImpl _value, $Res Function(_$FeedStateImpl) _then)
|
_$FeedStateImpl _value, $Res Function(_$FeedStateImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of FeedState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -221,6 +227,9 @@ class __$$FeedStateLoadingImplCopyWithImpl<$Res>
|
|||||||
__$$FeedStateLoadingImplCopyWithImpl(_$FeedStateLoadingImpl _value,
|
__$$FeedStateLoadingImplCopyWithImpl(_$FeedStateLoadingImpl _value,
|
||||||
$Res Function(_$FeedStateLoadingImpl) _then)
|
$Res Function(_$FeedStateLoadingImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of FeedState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -342,6 +351,8 @@ class __$$FeedStateLoadedImplCopyWithImpl<$Res>
|
|||||||
_$FeedStateLoadedImpl _value, $Res Function(_$FeedStateLoadedImpl) _then)
|
_$FeedStateLoadedImpl _value, $Res Function(_$FeedStateLoadedImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of FeedState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -401,7 +412,9 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
|
|||||||
int get hashCode => Object.hash(runtimeType,
|
int get hashCode => Object.hash(runtimeType,
|
||||||
const DeepCollectionEquality().hash(_feedBlogPostList), isLoading);
|
const DeepCollectionEquality().hash(_feedBlogPostList), isLoading);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of FeedState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith =>
|
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith =>
|
||||||
@@ -494,7 +507,10 @@ abstract class FeedStateLoaded implements FeedState {
|
|||||||
|
|
||||||
List<FeedBlogPostModel> get feedBlogPostList;
|
List<FeedBlogPostModel> get feedBlogPostList;
|
||||||
bool get isLoading;
|
bool get isLoading;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -516,6 +532,8 @@ class __$$FeedStateErrorImplCopyWithImpl<$Res>
|
|||||||
_$FeedStateErrorImpl _value, $Res Function(_$FeedStateErrorImpl) _then)
|
_$FeedStateErrorImpl _value, $Res Function(_$FeedStateErrorImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of FeedState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -555,7 +573,9 @@ class _$FeedStateErrorImpl implements FeedStateError {
|
|||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, errorMessage);
|
int get hashCode => Object.hash(runtimeType, errorMessage);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of FeedState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith =>
|
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith =>
|
||||||
@@ -646,7 +666,10 @@ abstract class FeedStateError implements FeedState {
|
|||||||
_$FeedStateErrorImpl;
|
_$FeedStateErrorImpl;
|
||||||
|
|
||||||
String get errorMessage;
|
String get errorMessage;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ class RecipesCubit extends Cubit<RecipesState> {
|
|||||||
final FeedRepository feedRepository;
|
final FeedRepository feedRepository;
|
||||||
final RecipeRepository recipeRepository;
|
final RecipeRepository recipeRepository;
|
||||||
Set<int> _selectedTags = {};
|
Set<int> _selectedTags = {};
|
||||||
|
int currentPage = 1;
|
||||||
|
late int lastPage;
|
||||||
|
bool isLoading = false;
|
||||||
|
String? _query;
|
||||||
|
|
||||||
RecipesCubit({
|
RecipesCubit({
|
||||||
required this.feedRepository,
|
required this.feedRepository,
|
||||||
@@ -18,6 +22,7 @@ class RecipesCubit extends Cubit<RecipesState> {
|
|||||||
String? query,
|
String? query,
|
||||||
}) async {
|
}) async {
|
||||||
try {
|
try {
|
||||||
|
_query = query;
|
||||||
final recipesList = await feedRepository.getRecipes(
|
final recipesList = await feedRepository.getRecipes(
|
||||||
tags: _selectedTags.toList(),
|
tags: _selectedTags.toList(),
|
||||||
query: query,
|
query: query,
|
||||||
@@ -28,12 +33,42 @@ class RecipesCubit extends Cubit<RecipesState> {
|
|||||||
recipesTags: recipesTags,
|
recipesTags: recipesTags,
|
||||||
selectedTags: _selectedTags,
|
selectedTags: _selectedTags,
|
||||||
selectedTagsCounter: _selectedTags.length,
|
selectedTagsCounter: _selectedTags.length,
|
||||||
|
isLoading: isLoading,
|
||||||
));
|
));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
emit(RecipesState.error(errorMessage: e.toString()));
|
emit(RecipesState.error(errorMessage: e.toString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loadNextPage() async {
|
||||||
|
if (currentPage < lastPage && !isLoading) {
|
||||||
|
isLoading = true;
|
||||||
|
|
||||||
|
emit((state as RecipesStateLoaded).copyWith(isLoading: isLoading));
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (currentPage < lastPage) {
|
||||||
|
currentPage++;
|
||||||
|
final recipesList = await feedRepository.getRecipes(
|
||||||
|
page: currentPage,
|
||||||
|
tags: _selectedTags.toList(),
|
||||||
|
query: _query,
|
||||||
|
);
|
||||||
|
isLoading = false;
|
||||||
|
emit((state as RecipesStateLoaded).copyWith(
|
||||||
|
recipesList: [
|
||||||
|
...(state as RecipesStateLoaded).recipesList,
|
||||||
|
...recipesList,
|
||||||
|
],
|
||||||
|
isLoading: isLoading,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
emit(RecipesState.error(errorMessage: e.toString()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
updateTags(RecipeTag tag) {
|
updateTags(RecipeTag tag) {
|
||||||
_selectedTags.contains(tag.id) ? _selectedTags.remove(tag.id) : _selectedTags.add(tag.id);
|
_selectedTags.contains(tag.id) ? _selectedTags.remove(tag.id) : _selectedTags.add(tag.id);
|
||||||
emit((state as RecipesStateLoaded).copyWith(
|
emit((state as RecipesStateLoaded).copyWith(
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ abstract class RecipesState with _$RecipesState {
|
|||||||
required List<RecipeTag> recipesTags,
|
required List<RecipeTag> recipesTags,
|
||||||
required Set<int> selectedTags,
|
required Set<int> selectedTags,
|
||||||
required int selectedTagsCounter,
|
required int selectedTagsCounter,
|
||||||
|
required bool isLoading,
|
||||||
}) = RecipesStateLoaded;
|
}) = RecipesStateLoaded;
|
||||||
|
|
||||||
const factory RecipesState.error({
|
const factory RecipesState.error({
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ mixin _$RecipesState {
|
|||||||
List<Recipes> recipesList,
|
List<Recipes> recipesList,
|
||||||
List<RecipeTag> recipesTags,
|
List<RecipeTag> recipesTags,
|
||||||
Set<int> selectedTags,
|
Set<int> selectedTags,
|
||||||
int selectedTagsCounter)
|
int selectedTagsCounter,
|
||||||
|
bool isLoading)
|
||||||
loaded,
|
loaded,
|
||||||
required TResult Function(String errorMessage) error,
|
required TResult Function(String errorMessage) error,
|
||||||
}) =>
|
}) =>
|
||||||
@@ -34,7 +35,7 @@ mixin _$RecipesState {
|
|||||||
TResult? Function()? $default, {
|
TResult? Function()? $default, {
|
||||||
TResult? Function()? loading,
|
TResult? Function()? loading,
|
||||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||||
Set<int> selectedTags, int selectedTagsCounter)?
|
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||||
loaded,
|
loaded,
|
||||||
TResult? Function(String errorMessage)? error,
|
TResult? Function(String errorMessage)? error,
|
||||||
}) =>
|
}) =>
|
||||||
@@ -44,7 +45,7 @@ mixin _$RecipesState {
|
|||||||
TResult Function()? $default, {
|
TResult Function()? $default, {
|
||||||
TResult Function()? loading,
|
TResult Function()? loading,
|
||||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||||
Set<int> selectedTags, int selectedTagsCounter)?
|
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||||
loaded,
|
loaded,
|
||||||
TResult Function(String errorMessage)? error,
|
TResult Function(String errorMessage)? error,
|
||||||
required TResult orElse(),
|
required TResult orElse(),
|
||||||
@@ -93,6 +94,9 @@ class _$RecipesStateCopyWithImpl<$Res, $Val extends RecipesState>
|
|||||||
final $Val _value;
|
final $Val _value;
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of RecipesState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -109,6 +113,9 @@ class __$$RecipesStateImplCopyWithImpl<$Res>
|
|||||||
__$$RecipesStateImplCopyWithImpl(
|
__$$RecipesStateImplCopyWithImpl(
|
||||||
_$RecipesStateImpl _value, $Res Function(_$RecipesStateImpl) _then)
|
_$RecipesStateImpl _value, $Res Function(_$RecipesStateImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of RecipesState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -139,7 +146,8 @@ class _$RecipesStateImpl implements _RecipesState {
|
|||||||
List<Recipes> recipesList,
|
List<Recipes> recipesList,
|
||||||
List<RecipeTag> recipesTags,
|
List<RecipeTag> recipesTags,
|
||||||
Set<int> selectedTags,
|
Set<int> selectedTags,
|
||||||
int selectedTagsCounter)
|
int selectedTagsCounter,
|
||||||
|
bool isLoading)
|
||||||
loaded,
|
loaded,
|
||||||
required TResult Function(String errorMessage) error,
|
required TResult Function(String errorMessage) error,
|
||||||
}) {
|
}) {
|
||||||
@@ -152,7 +160,7 @@ class _$RecipesStateImpl implements _RecipesState {
|
|||||||
TResult? Function()? $default, {
|
TResult? Function()? $default, {
|
||||||
TResult? Function()? loading,
|
TResult? Function()? loading,
|
||||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||||
Set<int> selectedTags, int selectedTagsCounter)?
|
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||||
loaded,
|
loaded,
|
||||||
TResult? Function(String errorMessage)? error,
|
TResult? Function(String errorMessage)? error,
|
||||||
}) {
|
}) {
|
||||||
@@ -165,7 +173,7 @@ class _$RecipesStateImpl implements _RecipesState {
|
|||||||
TResult Function()? $default, {
|
TResult Function()? $default, {
|
||||||
TResult Function()? loading,
|
TResult Function()? loading,
|
||||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||||
Set<int> selectedTags, int selectedTagsCounter)?
|
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||||
loaded,
|
loaded,
|
||||||
TResult Function(String errorMessage)? error,
|
TResult Function(String errorMessage)? error,
|
||||||
required TResult orElse(),
|
required TResult orElse(),
|
||||||
@@ -232,6 +240,9 @@ class __$$RecipesStateLoadingImplCopyWithImpl<$Res>
|
|||||||
__$$RecipesStateLoadingImplCopyWithImpl(_$RecipesStateLoadingImpl _value,
|
__$$RecipesStateLoadingImplCopyWithImpl(_$RecipesStateLoadingImpl _value,
|
||||||
$Res Function(_$RecipesStateLoadingImpl) _then)
|
$Res Function(_$RecipesStateLoadingImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of RecipesState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -263,7 +274,8 @@ class _$RecipesStateLoadingImpl implements RecipesStateLoading {
|
|||||||
List<Recipes> recipesList,
|
List<Recipes> recipesList,
|
||||||
List<RecipeTag> recipesTags,
|
List<RecipeTag> recipesTags,
|
||||||
Set<int> selectedTags,
|
Set<int> selectedTags,
|
||||||
int selectedTagsCounter)
|
int selectedTagsCounter,
|
||||||
|
bool isLoading)
|
||||||
loaded,
|
loaded,
|
||||||
required TResult Function(String errorMessage) error,
|
required TResult Function(String errorMessage) error,
|
||||||
}) {
|
}) {
|
||||||
@@ -276,7 +288,7 @@ class _$RecipesStateLoadingImpl implements RecipesStateLoading {
|
|||||||
TResult? Function()? $default, {
|
TResult? Function()? $default, {
|
||||||
TResult? Function()? loading,
|
TResult? Function()? loading,
|
||||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||||
Set<int> selectedTags, int selectedTagsCounter)?
|
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||||
loaded,
|
loaded,
|
||||||
TResult? Function(String errorMessage)? error,
|
TResult? Function(String errorMessage)? error,
|
||||||
}) {
|
}) {
|
||||||
@@ -289,7 +301,7 @@ class _$RecipesStateLoadingImpl implements RecipesStateLoading {
|
|||||||
TResult Function()? $default, {
|
TResult Function()? $default, {
|
||||||
TResult Function()? loading,
|
TResult Function()? loading,
|
||||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||||
Set<int> selectedTags, int selectedTagsCounter)?
|
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||||
loaded,
|
loaded,
|
||||||
TResult Function(String errorMessage)? error,
|
TResult Function(String errorMessage)? error,
|
||||||
required TResult orElse(),
|
required TResult orElse(),
|
||||||
@@ -352,7 +364,8 @@ abstract class _$$RecipesStateLoadedImplCopyWith<$Res> {
|
|||||||
{List<Recipes> recipesList,
|
{List<Recipes> recipesList,
|
||||||
List<RecipeTag> recipesTags,
|
List<RecipeTag> recipesTags,
|
||||||
Set<int> selectedTags,
|
Set<int> selectedTags,
|
||||||
int selectedTagsCounter});
|
int selectedTagsCounter,
|
||||||
|
bool isLoading});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -363,6 +376,8 @@ class __$$RecipesStateLoadedImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$RecipesStateLoadedImpl) _then)
|
$Res Function(_$RecipesStateLoadedImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of RecipesState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -370,6 +385,7 @@ class __$$RecipesStateLoadedImplCopyWithImpl<$Res>
|
|||||||
Object? recipesTags = null,
|
Object? recipesTags = null,
|
||||||
Object? selectedTags = null,
|
Object? selectedTags = null,
|
||||||
Object? selectedTagsCounter = null,
|
Object? selectedTagsCounter = null,
|
||||||
|
Object? isLoading = null,
|
||||||
}) {
|
}) {
|
||||||
return _then(_$RecipesStateLoadedImpl(
|
return _then(_$RecipesStateLoadedImpl(
|
||||||
recipesList: null == recipesList
|
recipesList: null == recipesList
|
||||||
@@ -388,6 +404,10 @@ class __$$RecipesStateLoadedImplCopyWithImpl<$Res>
|
|||||||
? _value.selectedTagsCounter
|
? _value.selectedTagsCounter
|
||||||
: selectedTagsCounter // ignore: cast_nullable_to_non_nullable
|
: selectedTagsCounter // ignore: cast_nullable_to_non_nullable
|
||||||
as int,
|
as int,
|
||||||
|
isLoading: null == isLoading
|
||||||
|
? _value.isLoading
|
||||||
|
: isLoading // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -399,7 +419,8 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
|||||||
{required final List<Recipes> recipesList,
|
{required final List<Recipes> recipesList,
|
||||||
required final List<RecipeTag> recipesTags,
|
required final List<RecipeTag> recipesTags,
|
||||||
required final Set<int> selectedTags,
|
required final Set<int> selectedTags,
|
||||||
required this.selectedTagsCounter})
|
required this.selectedTagsCounter,
|
||||||
|
required this.isLoading})
|
||||||
: _recipesList = recipesList,
|
: _recipesList = recipesList,
|
||||||
_recipesTags = recipesTags,
|
_recipesTags = recipesTags,
|
||||||
_selectedTags = selectedTags;
|
_selectedTags = selectedTags;
|
||||||
@@ -430,10 +451,12 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
final int selectedTagsCounter;
|
final int selectedTagsCounter;
|
||||||
|
@override
|
||||||
|
final bool isLoading;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'RecipesState.loaded(recipesList: $recipesList, recipesTags: $recipesTags, selectedTags: $selectedTags, selectedTagsCounter: $selectedTagsCounter)';
|
return 'RecipesState.loaded(recipesList: $recipesList, recipesTags: $recipesTags, selectedTags: $selectedTags, selectedTagsCounter: $selectedTagsCounter, isLoading: $isLoading)';
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -448,7 +471,9 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
|||||||
const DeepCollectionEquality()
|
const DeepCollectionEquality()
|
||||||
.equals(other._selectedTags, _selectedTags) &&
|
.equals(other._selectedTags, _selectedTags) &&
|
||||||
(identical(other.selectedTagsCounter, selectedTagsCounter) ||
|
(identical(other.selectedTagsCounter, selectedTagsCounter) ||
|
||||||
other.selectedTagsCounter == selectedTagsCounter));
|
other.selectedTagsCounter == selectedTagsCounter) &&
|
||||||
|
(identical(other.isLoading, isLoading) ||
|
||||||
|
other.isLoading == isLoading));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -457,9 +482,12 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
|||||||
const DeepCollectionEquality().hash(_recipesList),
|
const DeepCollectionEquality().hash(_recipesList),
|
||||||
const DeepCollectionEquality().hash(_recipesTags),
|
const DeepCollectionEquality().hash(_recipesTags),
|
||||||
const DeepCollectionEquality().hash(_selectedTags),
|
const DeepCollectionEquality().hash(_selectedTags),
|
||||||
selectedTagsCounter);
|
selectedTagsCounter,
|
||||||
|
isLoading);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of RecipesState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith =>
|
_$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith =>
|
||||||
@@ -475,11 +503,13 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
|||||||
List<Recipes> recipesList,
|
List<Recipes> recipesList,
|
||||||
List<RecipeTag> recipesTags,
|
List<RecipeTag> recipesTags,
|
||||||
Set<int> selectedTags,
|
Set<int> selectedTags,
|
||||||
int selectedTagsCounter)
|
int selectedTagsCounter,
|
||||||
|
bool isLoading)
|
||||||
loaded,
|
loaded,
|
||||||
required TResult Function(String errorMessage) error,
|
required TResult Function(String errorMessage) error,
|
||||||
}) {
|
}) {
|
||||||
return loaded(recipesList, recipesTags, selectedTags, selectedTagsCounter);
|
return loaded(
|
||||||
|
recipesList, recipesTags, selectedTags, selectedTagsCounter, isLoading);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -488,12 +518,12 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
|||||||
TResult? Function()? $default, {
|
TResult? Function()? $default, {
|
||||||
TResult? Function()? loading,
|
TResult? Function()? loading,
|
||||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||||
Set<int> selectedTags, int selectedTagsCounter)?
|
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||||
loaded,
|
loaded,
|
||||||
TResult? Function(String errorMessage)? error,
|
TResult? Function(String errorMessage)? error,
|
||||||
}) {
|
}) {
|
||||||
return loaded?.call(
|
return loaded?.call(
|
||||||
recipesList, recipesTags, selectedTags, selectedTagsCounter);
|
recipesList, recipesTags, selectedTags, selectedTagsCounter, isLoading);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -502,14 +532,14 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
|||||||
TResult Function()? $default, {
|
TResult Function()? $default, {
|
||||||
TResult Function()? loading,
|
TResult Function()? loading,
|
||||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||||
Set<int> selectedTags, int selectedTagsCounter)?
|
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||||
loaded,
|
loaded,
|
||||||
TResult Function(String errorMessage)? error,
|
TResult Function(String errorMessage)? error,
|
||||||
required TResult orElse(),
|
required TResult orElse(),
|
||||||
}) {
|
}) {
|
||||||
if (loaded != null) {
|
if (loaded != null) {
|
||||||
return loaded(
|
return loaded(recipesList, recipesTags, selectedTags, selectedTagsCounter,
|
||||||
recipesList, recipesTags, selectedTags, selectedTagsCounter);
|
isLoading);
|
||||||
}
|
}
|
||||||
return orElse();
|
return orElse();
|
||||||
}
|
}
|
||||||
@@ -557,13 +587,18 @@ abstract class RecipesStateLoaded implements RecipesState {
|
|||||||
{required final List<Recipes> recipesList,
|
{required final List<Recipes> recipesList,
|
||||||
required final List<RecipeTag> recipesTags,
|
required final List<RecipeTag> recipesTags,
|
||||||
required final Set<int> selectedTags,
|
required final Set<int> selectedTags,
|
||||||
required final int selectedTagsCounter}) = _$RecipesStateLoadedImpl;
|
required final int selectedTagsCounter,
|
||||||
|
required final bool isLoading}) = _$RecipesStateLoadedImpl;
|
||||||
|
|
||||||
List<Recipes> get recipesList;
|
List<Recipes> get recipesList;
|
||||||
List<RecipeTag> get recipesTags;
|
List<RecipeTag> get recipesTags;
|
||||||
Set<int> get selectedTags;
|
Set<int> get selectedTags;
|
||||||
int get selectedTagsCounter;
|
int get selectedTagsCounter;
|
||||||
@JsonKey(ignore: true)
|
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 =>
|
_$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -585,6 +620,8 @@ class __$$RecipesStateErrorImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$RecipesStateErrorImpl) _then)
|
$Res Function(_$RecipesStateErrorImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of RecipesState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -624,7 +661,9 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
|
|||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, errorMessage);
|
int get hashCode => Object.hash(runtimeType, errorMessage);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of RecipesState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith =>
|
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith =>
|
||||||
@@ -640,7 +679,8 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
|
|||||||
List<Recipes> recipesList,
|
List<Recipes> recipesList,
|
||||||
List<RecipeTag> recipesTags,
|
List<RecipeTag> recipesTags,
|
||||||
Set<int> selectedTags,
|
Set<int> selectedTags,
|
||||||
int selectedTagsCounter)
|
int selectedTagsCounter,
|
||||||
|
bool isLoading)
|
||||||
loaded,
|
loaded,
|
||||||
required TResult Function(String errorMessage) error,
|
required TResult Function(String errorMessage) error,
|
||||||
}) {
|
}) {
|
||||||
@@ -653,7 +693,7 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
|
|||||||
TResult? Function()? $default, {
|
TResult? Function()? $default, {
|
||||||
TResult? Function()? loading,
|
TResult? Function()? loading,
|
||||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||||
Set<int> selectedTags, int selectedTagsCounter)?
|
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||||
loaded,
|
loaded,
|
||||||
TResult? Function(String errorMessage)? error,
|
TResult? Function(String errorMessage)? error,
|
||||||
}) {
|
}) {
|
||||||
@@ -666,7 +706,7 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
|
|||||||
TResult Function()? $default, {
|
TResult Function()? $default, {
|
||||||
TResult Function()? loading,
|
TResult Function()? loading,
|
||||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||||
Set<int> selectedTags, int selectedTagsCounter)?
|
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||||
loaded,
|
loaded,
|
||||||
TResult Function(String errorMessage)? error,
|
TResult Function(String errorMessage)? error,
|
||||||
required TResult orElse(),
|
required TResult orElse(),
|
||||||
@@ -720,7 +760,10 @@ abstract class RecipesStateError implements RecipesState {
|
|||||||
_$RecipesStateErrorImpl;
|
_$RecipesStateErrorImpl;
|
||||||
|
|
||||||
String get errorMessage;
|
String get errorMessage;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,11 +10,12 @@ import 'package:eatvio_app/features/feed/presentation/widgets/diets_widget.dart'
|
|||||||
import 'package:eatvio_app/features/feed/presentation/widgets/recipes_widget.dart';
|
import 'package:eatvio_app/features/feed/presentation/widgets/recipes_widget.dart';
|
||||||
import 'package:eatvio_app/features/feed/presentation/widgets/tags_modal_widget.dart';
|
import 'package:eatvio_app/features/feed/presentation/widgets/tags_modal_widget.dart';
|
||||||
import 'package:eatvio_app/theme/theme_helper.dart';
|
import 'package:eatvio_app/theme/theme_helper.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
|
|
||||||
|
final bucket = PageStorageBucket();
|
||||||
|
|
||||||
class FeedScreen extends StatefulWidget {
|
class FeedScreen extends StatefulWidget {
|
||||||
const FeedScreen({super.key});
|
const FeedScreen({super.key});
|
||||||
|
|
||||||
@@ -32,11 +33,25 @@ class _FeedScreenState extends State<FeedScreen> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
blogPostsScrollController.addListener(_onScroll);
|
blogPostsScrollController.addListener(_onScrollBlogPosts);
|
||||||
|
recipesScrollController.addListener(_onScrollBlogRecipes);
|
||||||
|
dietsScrollController.addListener(_onScrollBlogDiets);
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
_onScroll() {
|
_onScrollBlogPosts() {
|
||||||
|
if (blogPostsScrollController.offset >= blogPostsScrollController.position.maxScrollExtent && !blogPostsScrollController.position.outOfRange) {
|
||||||
|
context.read<FeedCubit>().loadNextPage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_onScrollBlogRecipes() {
|
||||||
|
if (blogPostsScrollController.offset >= blogPostsScrollController.position.maxScrollExtent && !blogPostsScrollController.position.outOfRange) {
|
||||||
|
context.read<FeedCubit>().loadNextPage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_onScrollBlogDiets() {
|
||||||
if (blogPostsScrollController.offset >= blogPostsScrollController.position.maxScrollExtent && !blogPostsScrollController.position.outOfRange) {
|
if (blogPostsScrollController.offset >= blogPostsScrollController.position.maxScrollExtent && !blogPostsScrollController.position.outOfRange) {
|
||||||
context.read<FeedCubit>().loadNextPage();
|
context.read<FeedCubit>().loadNextPage();
|
||||||
}
|
}
|
||||||
@@ -45,6 +60,8 @@ class _FeedScreenState extends State<FeedScreen> {
|
|||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
blogPostsScrollController.dispose();
|
blogPostsScrollController.dispose();
|
||||||
|
recipesScrollController.dispose();
|
||||||
|
dietsScrollController.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,7 +106,11 @@ class _FeedScreenState extends State<FeedScreen> {
|
|||||||
),
|
),
|
||||||
backgroundColor: Colors.grey.shade200,
|
backgroundColor: Colors.grey.shade200,
|
||||||
body: NestedScrollView(
|
body: NestedScrollView(
|
||||||
controller: blogPostsScrollController,
|
controller: _selectedChipIndex == 0
|
||||||
|
? blogPostsScrollController
|
||||||
|
: _selectedChipIndex == 1
|
||||||
|
? recipesScrollController
|
||||||
|
: dietsScrollController,
|
||||||
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
|
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
|
||||||
return [
|
return [
|
||||||
SliverAppBar(
|
SliverAppBar(
|
||||||
@@ -139,10 +160,10 @@ class _FeedScreenState extends State<FeedScreen> {
|
|||||||
return ListView.separated(
|
return ListView.separated(
|
||||||
padding: EdgeInsets.symmetric(vertical: 8),
|
padding: EdgeInsets.symmetric(vertical: 8),
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
physics: NeverScrollableScrollPhysics(),
|
physics: BouncingScrollPhysics(),
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
if (index == state.feedBlogPostList.length) {
|
if (index == state.feedBlogPostList.length) {
|
||||||
return CupertinoActivityIndicator();
|
return CircularProgressIndicator();
|
||||||
}
|
}
|
||||||
return BlogPostWidget(feedBlogPostModel: state.feedBlogPostList[index]);
|
return BlogPostWidget(feedBlogPostModel: state.feedBlogPostList[index]);
|
||||||
},
|
},
|
||||||
@@ -165,7 +186,7 @@ class _FeedScreenState extends State<FeedScreen> {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.grey.shade200,
|
backgroundColor: Colors.grey.shade200,
|
||||||
body: Center(
|
body: Center(
|
||||||
child: CupertinoActivityIndicator(),
|
child: CircularProgressIndicator(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -206,7 +227,7 @@ class _FeedScreenState extends State<FeedScreen> {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.grey.shade200,
|
backgroundColor: Colors.grey.shade200,
|
||||||
body: Center(
|
body: Center(
|
||||||
child: CupertinoActivityIndicator(),
|
child: CircularProgressIndicator(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -247,7 +268,7 @@ class _FeedScreenState extends State<FeedScreen> {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.grey.shade200,
|
backgroundColor: Colors.grey.shade200,
|
||||||
body: Center(
|
body: Center(
|
||||||
child: CupertinoActivityIndicator(),
|
child: CircularProgressIndicator(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -319,6 +340,7 @@ class _FeedScreenState extends State<FeedScreen> {
|
|||||||
switch (_selectedChipIndex) {
|
switch (_selectedChipIndex) {
|
||||||
case 1:
|
case 1:
|
||||||
context.read<RecipesCubit>().loadRecipesList(query: query);
|
context.read<RecipesCubit>().loadRecipesList(query: query);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class FeedRepository {
|
|||||||
|
|
||||||
Future<FeedBlogPostSettingsModel> getFeedBlogPosts({int page = 1}) async {
|
Future<FeedBlogPostSettingsModel> getFeedBlogPosts({int page = 1}) async {
|
||||||
try {
|
try {
|
||||||
return (await feedService.getBlocPostList(page: page));
|
return (await feedService.getBlogPostList(page: page));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
rethrow;
|
rethrow;
|
||||||
}
|
}
|
||||||
@@ -20,11 +20,13 @@ class FeedRepository {
|
|||||||
Future<List<Recipes>> getRecipes({
|
Future<List<Recipes>> getRecipes({
|
||||||
String? query,
|
String? query,
|
||||||
List<int>? tags,
|
List<int>? tags,
|
||||||
|
int page = 1
|
||||||
}) async {
|
}) async {
|
||||||
try {
|
try {
|
||||||
return (await feedService.getRecipes(
|
return (await feedService.getRecipes(
|
||||||
query: query,
|
query: query,
|
||||||
tags: tags,
|
tags: tags,
|
||||||
|
page: page,
|
||||||
))
|
))
|
||||||
.recipesList;
|
.recipesList;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -32,9 +34,9 @@ class FeedRepository {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<DietsPagination> getDiets() async {
|
Future<DietsPagination> getDiets({int page = 1}) async {
|
||||||
try {
|
try {
|
||||||
return (await feedService.getDiets());
|
return (await feedService.getDiets(page: page));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
rethrow;
|
rethrow;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,18 +12,21 @@ abstract class FeedService {
|
|||||||
factory FeedService(Dio dio, {String baseUrl}) = _FeedService;
|
factory FeedService(Dio dio, {String baseUrl}) = _FeedService;
|
||||||
|
|
||||||
@GET('/api/blogPosts/index?page={page}')
|
@GET('/api/blogPosts/index?page={page}')
|
||||||
Future<FeedBlogPostSettingsModel> getBlocPostList({
|
Future<FeedBlogPostSettingsModel> getBlogPostList({
|
||||||
@Path() required int page,
|
@Path() required int page,
|
||||||
});
|
});
|
||||||
|
|
||||||
@GET('/api/recipes/index')
|
@GET('/api/recipes/index')
|
||||||
Future<RecipesPagination> getRecipes({
|
Future<RecipesPagination> getRecipes({
|
||||||
|
@Path() required int page,
|
||||||
@Query('filters[tags][tags.id][\$in][]') required List<int>? tags,
|
@Query('filters[tags][tags.id][\$in][]') required List<int>? tags,
|
||||||
@Query('filters[title][\$contains]') required String? query,
|
@Query('filters[title][\$contains]') required String? query,
|
||||||
});
|
});
|
||||||
|
|
||||||
@GET('/api/diets/index')
|
@GET('/api/diets/index')
|
||||||
Future<DietsPagination> getDiets();
|
Future<DietsPagination> getDiets({
|
||||||
|
@Path() required int page,
|
||||||
|
});
|
||||||
|
|
||||||
@GET('/api/blogPosts/{id}/comments/show')
|
@GET('/api/blogPosts/{id}/comments/show')
|
||||||
Future<CommentModel> getBlogPostComments({
|
Future<CommentModel> getBlogPostComments({
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class _FeedService implements FeedService {
|
|||||||
final ParseErrorLogger? errorLogger;
|
final ParseErrorLogger? errorLogger;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<FeedBlogPostSettingsModel> getBlocPostList({required int page}) async {
|
Future<FeedBlogPostSettingsModel> getBlogPostList({required int page}) async {
|
||||||
final _extra = <String, dynamic>{};
|
final _extra = <String, dynamic>{};
|
||||||
final queryParameters = <String, dynamic>{};
|
final queryParameters = <String, dynamic>{};
|
||||||
final _headers = <String, dynamic>{};
|
final _headers = <String, dynamic>{};
|
||||||
@@ -56,6 +56,7 @@ class _FeedService implements FeedService {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Future<RecipesPagination> getRecipes({
|
Future<RecipesPagination> getRecipes({
|
||||||
|
required int page,
|
||||||
List<int>? tags,
|
List<int>? tags,
|
||||||
String? query,
|
String? query,
|
||||||
}) async {
|
}) async {
|
||||||
@@ -95,7 +96,7 @@ class _FeedService implements FeedService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<DietsPagination> getDiets() async {
|
Future<DietsPagination> getDiets({required int page}) async {
|
||||||
final _extra = <String, dynamic>{};
|
final _extra = <String, dynamic>{};
|
||||||
final queryParameters = <String, dynamic>{};
|
final queryParameters = <String, dynamic>{};
|
||||||
final _headers = <String, dynamic>{};
|
final _headers = <String, dynamic>{};
|
||||||
|
|||||||
@@ -1,110 +1,57 @@
|
|||||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
|
|
||||||
part 'profile_model.freezed.dart';
|
part 'profile_model.freezed.dart';
|
||||||
|
|
||||||
part 'profile_model.g.dart';
|
part 'profile_model.g.dart';
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
class ProfileModel with _$ProfileModel {
|
class ProfileModel with _$ProfileModel {
|
||||||
const factory ProfileModel({
|
const factory ProfileModel({
|
||||||
@JsonKey(name: "user") required User user,
|
@JsonKey(name: "id") required int id,
|
||||||
@JsonKey(name: "chartPoints") required List<ChartPointModel> chartPoints,
|
@JsonKey(name: "name") required String name,
|
||||||
@JsonKey(name: "userDetails") required UserDetails userDetails,
|
@JsonKey(name: "email") required String email,
|
||||||
@JsonKey(name: "circumferences") required List<Circumference> circumferences,
|
@JsonKey(name: "email_verified_at") DateTime? emailVerifiedAt,
|
||||||
@JsonKey(name: "finishedPlans") required List<dynamic> finishedPlans,
|
@JsonKey(name: "created_at") DateTime? createdAt,
|
||||||
@JsonKey(name: "rejectedPlans") required List<dynamic> rejectedPlans,
|
@JsonKey(name: "updated_at") DateTime? updatedAt,
|
||||||
@JsonKey(name: "startedPlan") required List<dynamic> startedPlan,
|
@JsonKey(name: "is_public_profile") required bool isPublicProfile,
|
||||||
@JsonKey(name: "paidPlan") required List<dynamic> paidPlan,
|
@JsonKey(name: "slug") required String slug,
|
||||||
@JsonKey(name: "requestedPlan") required List<dynamic> requestedPlan,
|
@JsonKey(name: "profile_photo_url") required String profilePhotoUrl,
|
||||||
@JsonKey(name: "initedPlan") required List<dynamic> initedPlan,
|
|
||||||
}) = _ProfileModel;
|
}) = _ProfileModel;
|
||||||
|
|
||||||
factory ProfileModel.fromJson(Map<String, dynamic> json) => _$ProfileModelFromJson(json);
|
factory ProfileModel.fromJson(Map<String, dynamic> json) => _$ProfileModelFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
class Circumference with _$Circumference {
|
class ProfileDetailsModel with _$ProfileDetailsModel {
|
||||||
const factory Circumference({
|
const factory ProfileDetailsModel({
|
||||||
@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,
|
|
||||||
}) = _Circumference;
|
|
||||||
|
|
||||||
factory Circumference.fromJson(Map<String, dynamic> json) => _$CircumferenceFromJson(json);
|
|
||||||
}
|
|
||||||
|
|
||||||
@freezed
|
|
||||||
class User with _$User {
|
|
||||||
const factory User({
|
|
||||||
@JsonKey(name: "id") required int id,
|
|
||||||
@JsonKey(name: "name") required String name,
|
|
||||||
@JsonKey(name: "email") required String email,
|
|
||||||
@JsonKey(name: "email_verified_at") required dynamic emailVerifiedAt,
|
|
||||||
@JsonKey(name: "two_factor_confirmed_at") required dynamic twoFactorConfirmedAt,
|
|
||||||
@JsonKey(name: "current_team_id") required dynamic currentTeamId,
|
|
||||||
@JsonKey(name: "profile_photo_path") String? profilePhotoPath,
|
|
||||||
@JsonKey(name: "created_at") required DateTime createdAt,
|
|
||||||
@JsonKey(name: "updated_at") required DateTime updatedAt,
|
|
||||||
@JsonKey(name: "is_consultant") required int isConsultant,
|
|
||||||
@JsonKey(name: "is_public_profile") required int isPublicProfile,
|
|
||||||
@JsonKey(name: "slug") required String slug,
|
|
||||||
@JsonKey(name: "user_settings_id") required dynamic userSettingsId,
|
|
||||||
@JsonKey(name: "profile_photo_url") String? profilePhotoUrl,
|
|
||||||
@JsonKey(name: "detailz") required UserDetails detailz,
|
|
||||||
}) = _User;
|
|
||||||
|
|
||||||
factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
|
|
||||||
}
|
|
||||||
|
|
||||||
@freezed
|
|
||||||
class UserDetails with _$UserDetails {
|
|
||||||
const factory UserDetails({
|
|
||||||
@JsonKey(name: "id") required int id,
|
|
||||||
@JsonKey(name: "user_id") required int userId,
|
|
||||||
@JsonKey(name: "first_name") required String firstName,
|
@JsonKey(name: "first_name") required String firstName,
|
||||||
@JsonKey(name: "last_name") required String lastName,
|
@JsonKey(name: "last_name") required String lastName,
|
||||||
@JsonKey(name: "birthdate") required DateTime birthdate,
|
@JsonKey(name: "birthdate") required String birthdate,
|
||||||
@JsonKey(name: "gender") required String gender,
|
@JsonKey(name: "gender") required String gender,
|
||||||
@JsonKey(name: "country") required String country,
|
@JsonKey(name: "country") required String country,
|
||||||
@JsonKey(name: "city") required String city,
|
@JsonKey(name: "city") required String city,
|
||||||
@JsonKey(name: "lang") required String lang,
|
@JsonKey(name: "lang") required String lang,
|
||||||
@JsonKey(name: "weight") required int weight,
|
@JsonKey(name: "weight") required double weight,
|
||||||
@JsonKey(name: "height") required int height,
|
@JsonKey(name: "height") required int height,
|
||||||
@JsonKey(name: "chest_circumference") required int chestCircumference,
|
@JsonKey(name: "chest_circumference") required int chestCircumference,
|
||||||
@JsonKey(name: "waist_circumference") required int waistCircumference,
|
@JsonKey(name: "waist_circumference") required int waistCircumference,
|
||||||
@JsonKey(name: "hip_circumference") required int hipCircumference,
|
@JsonKey(name: "hip_circumference") required int hipCircumference,
|
||||||
@JsonKey(name: "blood_pressure_up") required int bloodPressureUp,
|
@JsonKey(name: "blood_pressure_up") required int bloodPressureUp,
|
||||||
@JsonKey(name: "blood_pressure_down") required int bloodPressureDown,
|
@JsonKey(name: "blood_pressure_down") required int bloodPressureDown,
|
||||||
@JsonKey(name: "has_hypo") required int hasHypo,
|
@JsonKey(name: "has_hypo") required bool hasHypo,
|
||||||
@JsonKey(name: "has_hyper") required int hasHyper,
|
@JsonKey(name: "has_hyper") required bool hasHyper,
|
||||||
@JsonKey(name: "about_alergy") required String aboutAlergy,
|
@JsonKey(name: "about_alergy") required String aboutAlergy,
|
||||||
@JsonKey(name: "about_taking_pils") required String aboutTakingPils,
|
@JsonKey(name: "about_taking_pils") required String aboutTakingPils,
|
||||||
@JsonKey(name: "about_sport_hobbies") required String aboutSportHobbies,
|
@JsonKey(name: "about_sport_hobbies") required String aboutSportHobbies,
|
||||||
@JsonKey(name: "favorite_foods") required String favoriteFoods,
|
@JsonKey(name: "favorite_foods") required String favoriteFoods,
|
||||||
@JsonKey(name: "unfavorite_foods") required String unfavoriteFoods,
|
@JsonKey(name: "unfavorite_foods") required String unfavoriteFoods,
|
||||||
@JsonKey(name: "additional_info") required String additionalInfo,
|
@JsonKey(name: "additional_info") required String additionalInfo,
|
||||||
@JsonKey(name: "created_at") required DateTime createdAt,
|
@JsonKey(name: "created_at") DateTime? createdAt,
|
||||||
@JsonKey(name: "updated_at") required DateTime updatedAt,
|
@JsonKey(name: "updated_at") DateTime? updatedAt,
|
||||||
@JsonKey(name: "is_mood_fillable") required int isMoodFillable,
|
@JsonKey(name: "is_mood_fillable") required bool isMoodFillable,
|
||||||
@JsonKey(name: "is_bedtime_fillable") required int isBedtimeFillable,
|
@JsonKey(name: "is_bedtime_fillable") required bool isBedtimeFillable,
|
||||||
@JsonKey(name: "activity_coefficient") required double activityCoefficient,
|
@JsonKey(name: "activity_coefficient") required double activityCoefficient,
|
||||||
}) = _UserDetails;
|
}) = _ProfileDetailsModel;
|
||||||
|
|
||||||
factory UserDetails.fromJson(Map<String, dynamic> json) => _$UserDetailsFromJson(json);
|
factory ProfileDetailsModel.fromJson(Map<String, dynamic> json) => _$ProfileDetailsModelFromJson(json);
|
||||||
}
|
|
||||||
|
|
||||||
@freezed
|
|
||||||
class ChartPointModel with _$ChartPointModel {
|
|
||||||
const factory ChartPointModel({
|
|
||||||
@JsonKey(name: "id") required int id,
|
|
||||||
@JsonKey(name: "user_id") required int userId,
|
|
||||||
@JsonKey(name: "weight") required double weight,
|
|
||||||
@JsonKey(name: "bmi") required double bmi,
|
|
||||||
@JsonKey(name: "created_at") required DateTime createdAt,
|
|
||||||
@JsonKey(name: "updated_at") required DateTime updatedAt,
|
|
||||||
}) = _ChartPointModel;
|
|
||||||
|
|
||||||
factory ChartPointModel.fromJson(Map<String, dynamic> json) => _$ChartPointModelFromJson(json);
|
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -8,136 +8,78 @@ part of 'profile_model.dart';
|
|||||||
|
|
||||||
_$ProfileModelImpl _$$ProfileModelImplFromJson(Map<String, dynamic> json) =>
|
_$ProfileModelImpl _$$ProfileModelImplFromJson(Map<String, dynamic> json) =>
|
||||||
_$ProfileModelImpl(
|
_$ProfileModelImpl(
|
||||||
user: User.fromJson(json['user'] as Map<String, dynamic>),
|
id: (json['id'] as num).toInt(),
|
||||||
chartPoints: (json['chartPoints'] as List<dynamic>)
|
name: json['name'] as String,
|
||||||
.map((e) => ChartPointModel.fromJson(e as Map<String, dynamic>))
|
email: json['email'] as String,
|
||||||
.toList(),
|
emailVerifiedAt: json['email_verified_at'] == null
|
||||||
userDetails:
|
? null
|
||||||
UserDetails.fromJson(json['userDetails'] as Map<String, dynamic>),
|
: DateTime.parse(json['email_verified_at'] as String),
|
||||||
circumferences: (json['circumferences'] as List<dynamic>)
|
createdAt: json['created_at'] == null
|
||||||
.map((e) => Circumference.fromJson(e as Map<String, dynamic>))
|
? null
|
||||||
.toList(),
|
: DateTime.parse(json['created_at'] as String),
|
||||||
finishedPlans: json['finishedPlans'] as List<dynamic>,
|
updatedAt: json['updated_at'] == null
|
||||||
rejectedPlans: json['rejectedPlans'] as List<dynamic>,
|
? null
|
||||||
startedPlan: json['startedPlan'] as List<dynamic>,
|
: DateTime.parse(json['updated_at'] as String),
|
||||||
paidPlan: json['paidPlan'] as List<dynamic>,
|
isPublicProfile: json['is_public_profile'] as bool,
|
||||||
requestedPlan: json['requestedPlan'] as List<dynamic>,
|
slug: json['slug'] as String,
|
||||||
initedPlan: json['initedPlan'] as List<dynamic>,
|
profilePhotoUrl: json['profile_photo_url'] as String,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$ProfileModelImplToJson(_$ProfileModelImpl instance) =>
|
Map<String, dynamic> _$$ProfileModelImplToJson(_$ProfileModelImpl instance) =>
|
||||||
<String, dynamic>{
|
|
||||||
'user': instance.user,
|
|
||||||
'chartPoints': instance.chartPoints,
|
|
||||||
'userDetails': instance.userDetails,
|
|
||||||
'circumferences': instance.circumferences,
|
|
||||||
'finishedPlans': instance.finishedPlans,
|
|
||||||
'rejectedPlans': instance.rejectedPlans,
|
|
||||||
'startedPlan': instance.startedPlan,
|
|
||||||
'paidPlan': instance.paidPlan,
|
|
||||||
'requestedPlan': instance.requestedPlan,
|
|
||||||
'initedPlan': instance.initedPlan,
|
|
||||||
};
|
|
||||||
|
|
||||||
_$CircumferenceImpl _$$CircumferenceImplFromJson(Map<String, dynamic> json) =>
|
|
||||||
_$CircumferenceImpl(
|
|
||||||
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> _$$CircumferenceImplToJson(_$CircumferenceImpl 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(),
|
|
||||||
};
|
|
||||||
|
|
||||||
_$UserImpl _$$UserImplFromJson(Map<String, dynamic> json) => _$UserImpl(
|
|
||||||
id: (json['id'] as num).toInt(),
|
|
||||||
name: json['name'] as String,
|
|
||||||
email: json['email'] as String,
|
|
||||||
emailVerifiedAt: json['email_verified_at'],
|
|
||||||
twoFactorConfirmedAt: json['two_factor_confirmed_at'],
|
|
||||||
currentTeamId: json['current_team_id'],
|
|
||||||
profilePhotoPath: json['profile_photo_path'] as String?,
|
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
|
||||||
isConsultant: (json['is_consultant'] as num).toInt(),
|
|
||||||
isPublicProfile: (json['is_public_profile'] as num).toInt(),
|
|
||||||
slug: json['slug'] as String,
|
|
||||||
userSettingsId: json['user_settings_id'],
|
|
||||||
profilePhotoUrl: json['profile_photo_url'] as String?,
|
|
||||||
detailz: UserDetails.fromJson(json['detailz'] as Map<String, dynamic>),
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$$UserImplToJson(_$UserImpl instance) =>
|
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'id': instance.id,
|
'id': instance.id,
|
||||||
'name': instance.name,
|
'name': instance.name,
|
||||||
'email': instance.email,
|
'email': instance.email,
|
||||||
'email_verified_at': instance.emailVerifiedAt,
|
'email_verified_at': instance.emailVerifiedAt?.toIso8601String(),
|
||||||
'two_factor_confirmed_at': instance.twoFactorConfirmedAt,
|
'created_at': instance.createdAt?.toIso8601String(),
|
||||||
'current_team_id': instance.currentTeamId,
|
'updated_at': instance.updatedAt?.toIso8601String(),
|
||||||
'profile_photo_path': instance.profilePhotoPath,
|
|
||||||
'created_at': instance.createdAt.toIso8601String(),
|
|
||||||
'updated_at': instance.updatedAt.toIso8601String(),
|
|
||||||
'is_consultant': instance.isConsultant,
|
|
||||||
'is_public_profile': instance.isPublicProfile,
|
'is_public_profile': instance.isPublicProfile,
|
||||||
'slug': instance.slug,
|
'slug': instance.slug,
|
||||||
'user_settings_id': instance.userSettingsId,
|
|
||||||
'profile_photo_url': instance.profilePhotoUrl,
|
'profile_photo_url': instance.profilePhotoUrl,
|
||||||
'detailz': instance.detailz,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_$UserDetailsImpl _$$UserDetailsImplFromJson(Map<String, dynamic> json) =>
|
_$ProfileDetailsModelImpl _$$ProfileDetailsModelImplFromJson(
|
||||||
_$UserDetailsImpl(
|
Map<String, dynamic> json) =>
|
||||||
id: (json['id'] as num).toInt(),
|
_$ProfileDetailsModelImpl(
|
||||||
userId: (json['user_id'] as num).toInt(),
|
|
||||||
firstName: json['first_name'] as String,
|
firstName: json['first_name'] as String,
|
||||||
lastName: json['last_name'] as String,
|
lastName: json['last_name'] as String,
|
||||||
birthdate: DateTime.parse(json['birthdate'] as String),
|
birthdate: json['birthdate'] as String,
|
||||||
gender: json['gender'] as String,
|
gender: json['gender'] as String,
|
||||||
country: json['country'] as String,
|
country: json['country'] as String,
|
||||||
city: json['city'] as String,
|
city: json['city'] as String,
|
||||||
lang: json['lang'] as String,
|
lang: json['lang'] as String,
|
||||||
weight: (json['weight'] as num).toInt(),
|
weight: (json['weight'] as num).toDouble(),
|
||||||
height: (json['height'] as num).toInt(),
|
height: (json['height'] as num).toInt(),
|
||||||
chestCircumference: (json['chest_circumference'] as num).toInt(),
|
chestCircumference: (json['chest_circumference'] as num).toInt(),
|
||||||
waistCircumference: (json['waist_circumference'] as num).toInt(),
|
waistCircumference: (json['waist_circumference'] as num).toInt(),
|
||||||
hipCircumference: (json['hip_circumference'] as num).toInt(),
|
hipCircumference: (json['hip_circumference'] as num).toInt(),
|
||||||
bloodPressureUp: (json['blood_pressure_up'] as num).toInt(),
|
bloodPressureUp: (json['blood_pressure_up'] as num).toInt(),
|
||||||
bloodPressureDown: (json['blood_pressure_down'] as num).toInt(),
|
bloodPressureDown: (json['blood_pressure_down'] as num).toInt(),
|
||||||
hasHypo: (json['has_hypo'] as num).toInt(),
|
hasHypo: json['has_hypo'] as bool,
|
||||||
hasHyper: (json['has_hyper'] as num).toInt(),
|
hasHyper: json['has_hyper'] as bool,
|
||||||
aboutAlergy: json['about_alergy'] as String,
|
aboutAlergy: json['about_alergy'] as String,
|
||||||
aboutTakingPils: json['about_taking_pils'] as String,
|
aboutTakingPils: json['about_taking_pils'] as String,
|
||||||
aboutSportHobbies: json['about_sport_hobbies'] as String,
|
aboutSportHobbies: json['about_sport_hobbies'] as String,
|
||||||
favoriteFoods: json['favorite_foods'] as String,
|
favoriteFoods: json['favorite_foods'] as String,
|
||||||
unfavoriteFoods: json['unfavorite_foods'] as String,
|
unfavoriteFoods: json['unfavorite_foods'] as String,
|
||||||
additionalInfo: json['additional_info'] as String,
|
additionalInfo: json['additional_info'] as String,
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: json['created_at'] == null
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
? null
|
||||||
isMoodFillable: (json['is_mood_fillable'] as num).toInt(),
|
: DateTime.parse(json['created_at'] as String),
|
||||||
isBedtimeFillable: (json['is_bedtime_fillable'] as num).toInt(),
|
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(),
|
activityCoefficient: (json['activity_coefficient'] as num).toDouble(),
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$UserDetailsImplToJson(_$UserDetailsImpl instance) =>
|
Map<String, dynamic> _$$ProfileDetailsModelImplToJson(
|
||||||
|
_$ProfileDetailsModelImpl instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'id': instance.id,
|
|
||||||
'user_id': instance.userId,
|
|
||||||
'first_name': instance.firstName,
|
'first_name': instance.firstName,
|
||||||
'last_name': instance.lastName,
|
'last_name': instance.lastName,
|
||||||
'birthdate': instance.birthdate.toIso8601String(),
|
'birthdate': instance.birthdate,
|
||||||
'gender': instance.gender,
|
'gender': instance.gender,
|
||||||
'country': instance.country,
|
'country': instance.country,
|
||||||
'city': instance.city,
|
'city': instance.city,
|
||||||
@@ -157,31 +99,9 @@ Map<String, dynamic> _$$UserDetailsImplToJson(_$UserDetailsImpl instance) =>
|
|||||||
'favorite_foods': instance.favoriteFoods,
|
'favorite_foods': instance.favoriteFoods,
|
||||||
'unfavorite_foods': instance.unfavoriteFoods,
|
'unfavorite_foods': instance.unfavoriteFoods,
|
||||||
'additional_info': instance.additionalInfo,
|
'additional_info': instance.additionalInfo,
|
||||||
'created_at': instance.createdAt.toIso8601String(),
|
'created_at': instance.createdAt?.toIso8601String(),
|
||||||
'updated_at': instance.updatedAt.toIso8601String(),
|
'updated_at': instance.updatedAt?.toIso8601String(),
|
||||||
'is_mood_fillable': instance.isMoodFillable,
|
'is_mood_fillable': instance.isMoodFillable,
|
||||||
'is_bedtime_fillable': instance.isBedtimeFillable,
|
'is_bedtime_fillable': instance.isBedtimeFillable,
|
||||||
'activity_coefficient': instance.activityCoefficient,
|
'activity_coefficient': instance.activityCoefficient,
|
||||||
};
|
};
|
||||||
|
|
||||||
_$ChartPointModelImpl _$$ChartPointModelImplFromJson(
|
|
||||||
Map<String, dynamic> json) =>
|
|
||||||
_$ChartPointModelImpl(
|
|
||||||
id: (json['id'] as num).toInt(),
|
|
||||||
userId: (json['user_id'] as num).toInt(),
|
|
||||||
weight: (json['weight'] as num).toDouble(),
|
|
||||||
bmi: (json['bmi'] as num).toDouble(),
|
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$$ChartPointModelImplToJson(
|
|
||||||
_$ChartPointModelImpl instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'id': instance.id,
|
|
||||||
'user_id': instance.userId,
|
|
||||||
'weight': instance.weight,
|
|
||||||
'bmi': instance.bmi,
|
|
||||||
'created_at': instance.createdAt.toIso8601String(),
|
|
||||||
'updated_at': instance.updatedAt.toIso8601String(),
|
|
||||||
};
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ class ProfileCubit extends Cubit<ProfileState> {
|
|||||||
try {
|
try {
|
||||||
emit(ProfileState.loaded(
|
emit(ProfileState.loaded(
|
||||||
profile: await profileRepository.getProfileBySlug(slug),
|
profile: await profileRepository.getProfileBySlug(slug),
|
||||||
|
profileDetails: await profileRepository.getMyProfileDetails(),
|
||||||
blogPosts: await profileRepository.getBlogPostsByAuthorSlug(slug: slug),
|
blogPosts: await profileRepository.getBlogPostsByAuthorSlug(slug: slug),
|
||||||
));
|
));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -23,10 +24,11 @@ class ProfileCubit extends Cubit<ProfileState> {
|
|||||||
|
|
||||||
getMyProfile() async {
|
getMyProfile() async {
|
||||||
try {
|
try {
|
||||||
final myProfile = await profileRepository.getMyProfile();
|
final profile = await profileRepository.getMyProfile();
|
||||||
emit(ProfileState.loaded(
|
emit(ProfileState.loaded(
|
||||||
profile: myProfile,
|
profile: profile,
|
||||||
blogPosts: await profileRepository.getBlogPostsByAuthorSlug(slug: myProfile.user.slug),
|
profileDetails: await profileRepository.getMyProfileDetails(),
|
||||||
|
blogPosts: await profileRepository.getBlogPostsByAuthorSlug(slug: profile.slug),
|
||||||
));
|
));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
emit(ProfileState.error(errorMessage: e.toString()));
|
emit(ProfileState.error(errorMessage: e.toString()));
|
||||||
@@ -45,12 +47,7 @@ class ProfileCubit extends Cubit<ProfileState> {
|
|||||||
waistCircumference: waistCircumference,
|
waistCircumference: waistCircumference,
|
||||||
hipCircumference: hipCircumference,
|
hipCircumference: hipCircumference,
|
||||||
);
|
);
|
||||||
emit(
|
emit((state as ProfileStateLoaded).copyWith());
|
||||||
ProfileState.loaded(
|
|
||||||
profile: await profileRepository.getMyProfile(),
|
|
||||||
blogPosts: (state as ProfileStateLoaded).blogPosts,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
emit(ProfileState.error(errorMessage: e.toString()));
|
emit(ProfileState.error(errorMessage: e.toString()));
|
||||||
print(e);
|
print(e);
|
||||||
@@ -61,15 +58,8 @@ class ProfileCubit extends Cubit<ProfileState> {
|
|||||||
required double weight,
|
required double weight,
|
||||||
}) async {
|
}) async {
|
||||||
try {
|
try {
|
||||||
await profileRepository.addWeight(
|
await profileRepository.addWeight(weight: weight);
|
||||||
weight: weight,
|
emit((state as ProfileStateLoaded).copyWith());
|
||||||
);
|
|
||||||
emit(
|
|
||||||
ProfileState.loaded(
|
|
||||||
profile: await profileRepository.getMyProfile(),
|
|
||||||
blogPosts: (state as ProfileStateLoaded).blogPosts,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
emit(ProfileState.error(errorMessage: e.toString()));
|
emit(ProfileState.error(errorMessage: e.toString()));
|
||||||
print(e);
|
print(e);
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ abstract class ProfileState with _$ProfileState {
|
|||||||
|
|
||||||
const factory ProfileState.loaded({
|
const factory ProfileState.loaded({
|
||||||
required ProfileModel profile,
|
required ProfileModel profile,
|
||||||
|
required ProfileDetailsModel profileDetails,
|
||||||
required List<FeedBlogPostModel> blogPosts,
|
required List<FeedBlogPostModel> blogPosts,
|
||||||
}) = ProfileStateLoaded;
|
}) = ProfileStateLoaded;
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,9 @@ mixin _$ProfileState {
|
|||||||
TResult Function() $default, {
|
TResult Function() $default, {
|
||||||
required TResult Function() loading,
|
required TResult Function() loading,
|
||||||
required TResult Function(
|
required TResult Function(
|
||||||
ProfileModel profile, List<FeedBlogPostModel> blogPosts)
|
ProfileModel profile,
|
||||||
|
ProfileDetailsModel profileDetails,
|
||||||
|
List<FeedBlogPostModel> blogPosts)
|
||||||
loaded,
|
loaded,
|
||||||
required TResult Function(String errorMessage) error,
|
required TResult Function(String errorMessage) error,
|
||||||
}) =>
|
}) =>
|
||||||
@@ -30,7 +32,8 @@ mixin _$ProfileState {
|
|||||||
TResult? whenOrNull<TResult extends Object?>(
|
TResult? whenOrNull<TResult extends Object?>(
|
||||||
TResult? Function()? $default, {
|
TResult? Function()? $default, {
|
||||||
TResult? Function()? loading,
|
TResult? Function()? loading,
|
||||||
TResult? Function(ProfileModel profile, List<FeedBlogPostModel> blogPosts)?
|
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails,
|
||||||
|
List<FeedBlogPostModel> blogPosts)?
|
||||||
loaded,
|
loaded,
|
||||||
TResult? Function(String errorMessage)? error,
|
TResult? Function(String errorMessage)? error,
|
||||||
}) =>
|
}) =>
|
||||||
@@ -39,7 +42,8 @@ mixin _$ProfileState {
|
|||||||
TResult maybeWhen<TResult extends Object?>(
|
TResult maybeWhen<TResult extends Object?>(
|
||||||
TResult Function()? $default, {
|
TResult Function()? $default, {
|
||||||
TResult Function()? loading,
|
TResult Function()? loading,
|
||||||
TResult Function(ProfileModel profile, List<FeedBlogPostModel> blogPosts)?
|
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails,
|
||||||
|
List<FeedBlogPostModel> blogPosts)?
|
||||||
loaded,
|
loaded,
|
||||||
TResult Function(String errorMessage)? error,
|
TResult Function(String errorMessage)? error,
|
||||||
required TResult orElse(),
|
required TResult orElse(),
|
||||||
@@ -88,6 +92,9 @@ class _$ProfileStateCopyWithImpl<$Res, $Val extends ProfileState>
|
|||||||
final $Val _value;
|
final $Val _value;
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ProfileState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -104,6 +111,9 @@ class __$$ProfileStateImplCopyWithImpl<$Res>
|
|||||||
__$$ProfileStateImplCopyWithImpl(
|
__$$ProfileStateImplCopyWithImpl(
|
||||||
_$ProfileStateImpl _value, $Res Function(_$ProfileStateImpl) _then)
|
_$ProfileStateImpl _value, $Res Function(_$ProfileStateImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ProfileState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -131,7 +141,9 @@ class _$ProfileStateImpl implements _ProfileState {
|
|||||||
TResult Function() $default, {
|
TResult Function() $default, {
|
||||||
required TResult Function() loading,
|
required TResult Function() loading,
|
||||||
required TResult Function(
|
required TResult Function(
|
||||||
ProfileModel profile, List<FeedBlogPostModel> blogPosts)
|
ProfileModel profile,
|
||||||
|
ProfileDetailsModel profileDetails,
|
||||||
|
List<FeedBlogPostModel> blogPosts)
|
||||||
loaded,
|
loaded,
|
||||||
required TResult Function(String errorMessage) error,
|
required TResult Function(String errorMessage) error,
|
||||||
}) {
|
}) {
|
||||||
@@ -143,7 +155,8 @@ class _$ProfileStateImpl implements _ProfileState {
|
|||||||
TResult? whenOrNull<TResult extends Object?>(
|
TResult? whenOrNull<TResult extends Object?>(
|
||||||
TResult? Function()? $default, {
|
TResult? Function()? $default, {
|
||||||
TResult? Function()? loading,
|
TResult? Function()? loading,
|
||||||
TResult? Function(ProfileModel profile, List<FeedBlogPostModel> blogPosts)?
|
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails,
|
||||||
|
List<FeedBlogPostModel> blogPosts)?
|
||||||
loaded,
|
loaded,
|
||||||
TResult? Function(String errorMessage)? error,
|
TResult? Function(String errorMessage)? error,
|
||||||
}) {
|
}) {
|
||||||
@@ -155,7 +168,8 @@ class _$ProfileStateImpl implements _ProfileState {
|
|||||||
TResult maybeWhen<TResult extends Object?>(
|
TResult maybeWhen<TResult extends Object?>(
|
||||||
TResult Function()? $default, {
|
TResult Function()? $default, {
|
||||||
TResult Function()? loading,
|
TResult Function()? loading,
|
||||||
TResult Function(ProfileModel profile, List<FeedBlogPostModel> blogPosts)?
|
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails,
|
||||||
|
List<FeedBlogPostModel> blogPosts)?
|
||||||
loaded,
|
loaded,
|
||||||
TResult Function(String errorMessage)? error,
|
TResult Function(String errorMessage)? error,
|
||||||
required TResult orElse(),
|
required TResult orElse(),
|
||||||
@@ -222,6 +236,9 @@ class __$$ProfileStateLoadingImplCopyWithImpl<$Res>
|
|||||||
__$$ProfileStateLoadingImplCopyWithImpl(_$ProfileStateLoadingImpl _value,
|
__$$ProfileStateLoadingImplCopyWithImpl(_$ProfileStateLoadingImpl _value,
|
||||||
$Res Function(_$ProfileStateLoadingImpl) _then)
|
$Res Function(_$ProfileStateLoadingImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ProfileState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -250,7 +267,9 @@ class _$ProfileStateLoadingImpl implements ProfileStateLoading {
|
|||||||
TResult Function() $default, {
|
TResult Function() $default, {
|
||||||
required TResult Function() loading,
|
required TResult Function() loading,
|
||||||
required TResult Function(
|
required TResult Function(
|
||||||
ProfileModel profile, List<FeedBlogPostModel> blogPosts)
|
ProfileModel profile,
|
||||||
|
ProfileDetailsModel profileDetails,
|
||||||
|
List<FeedBlogPostModel> blogPosts)
|
||||||
loaded,
|
loaded,
|
||||||
required TResult Function(String errorMessage) error,
|
required TResult Function(String errorMessage) error,
|
||||||
}) {
|
}) {
|
||||||
@@ -262,7 +281,8 @@ class _$ProfileStateLoadingImpl implements ProfileStateLoading {
|
|||||||
TResult? whenOrNull<TResult extends Object?>(
|
TResult? whenOrNull<TResult extends Object?>(
|
||||||
TResult? Function()? $default, {
|
TResult? Function()? $default, {
|
||||||
TResult? Function()? loading,
|
TResult? Function()? loading,
|
||||||
TResult? Function(ProfileModel profile, List<FeedBlogPostModel> blogPosts)?
|
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails,
|
||||||
|
List<FeedBlogPostModel> blogPosts)?
|
||||||
loaded,
|
loaded,
|
||||||
TResult? Function(String errorMessage)? error,
|
TResult? Function(String errorMessage)? error,
|
||||||
}) {
|
}) {
|
||||||
@@ -274,7 +294,8 @@ class _$ProfileStateLoadingImpl implements ProfileStateLoading {
|
|||||||
TResult maybeWhen<TResult extends Object?>(
|
TResult maybeWhen<TResult extends Object?>(
|
||||||
TResult Function()? $default, {
|
TResult Function()? $default, {
|
||||||
TResult Function()? loading,
|
TResult Function()? loading,
|
||||||
TResult Function(ProfileModel profile, List<FeedBlogPostModel> blogPosts)?
|
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails,
|
||||||
|
List<FeedBlogPostModel> blogPosts)?
|
||||||
loaded,
|
loaded,
|
||||||
TResult Function(String errorMessage)? error,
|
TResult Function(String errorMessage)? error,
|
||||||
required TResult orElse(),
|
required TResult orElse(),
|
||||||
@@ -333,9 +354,13 @@ abstract class _$$ProfileStateLoadedImplCopyWith<$Res> {
|
|||||||
$Res Function(_$ProfileStateLoadedImpl) then) =
|
$Res Function(_$ProfileStateLoadedImpl) then) =
|
||||||
__$$ProfileStateLoadedImplCopyWithImpl<$Res>;
|
__$$ProfileStateLoadedImplCopyWithImpl<$Res>;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({ProfileModel profile, List<FeedBlogPostModel> blogPosts});
|
$Res call(
|
||||||
|
{ProfileModel profile,
|
||||||
|
ProfileDetailsModel profileDetails,
|
||||||
|
List<FeedBlogPostModel> blogPosts});
|
||||||
|
|
||||||
$ProfileModelCopyWith<$Res> get profile;
|
$ProfileModelCopyWith<$Res> get profile;
|
||||||
|
$ProfileDetailsModelCopyWith<$Res> get profileDetails;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -346,10 +371,13 @@ class __$$ProfileStateLoadedImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$ProfileStateLoadedImpl) _then)
|
$Res Function(_$ProfileStateLoadedImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ProfileState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
Object? profile = null,
|
Object? profile = null,
|
||||||
|
Object? profileDetails = null,
|
||||||
Object? blogPosts = null,
|
Object? blogPosts = null,
|
||||||
}) {
|
}) {
|
||||||
return _then(_$ProfileStateLoadedImpl(
|
return _then(_$ProfileStateLoadedImpl(
|
||||||
@@ -357,6 +385,10 @@ class __$$ProfileStateLoadedImplCopyWithImpl<$Res>
|
|||||||
? _value.profile
|
? _value.profile
|
||||||
: profile // ignore: cast_nullable_to_non_nullable
|
: profile // ignore: cast_nullable_to_non_nullable
|
||||||
as ProfileModel,
|
as ProfileModel,
|
||||||
|
profileDetails: null == profileDetails
|
||||||
|
? _value.profileDetails
|
||||||
|
: profileDetails // ignore: cast_nullable_to_non_nullable
|
||||||
|
as ProfileDetailsModel,
|
||||||
blogPosts: null == blogPosts
|
blogPosts: null == blogPosts
|
||||||
? _value._blogPosts
|
? _value._blogPosts
|
||||||
: blogPosts // ignore: cast_nullable_to_non_nullable
|
: blogPosts // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -364,6 +396,8 @@ class __$$ProfileStateLoadedImplCopyWithImpl<$Res>
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of ProfileState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$ProfileModelCopyWith<$Res> get profile {
|
$ProfileModelCopyWith<$Res> get profile {
|
||||||
@@ -371,17 +405,31 @@ class __$$ProfileStateLoadedImplCopyWithImpl<$Res>
|
|||||||
return _then(_value.copyWith(profile: value));
|
return _then(_value.copyWith(profile: value));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of ProfileState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$ProfileDetailsModelCopyWith<$Res> get profileDetails {
|
||||||
|
return $ProfileDetailsModelCopyWith<$Res>(_value.profileDetails, (value) {
|
||||||
|
return _then(_value.copyWith(profileDetails: value));
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
|
|
||||||
class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
|
class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
|
||||||
const _$ProfileStateLoadedImpl(
|
const _$ProfileStateLoadedImpl(
|
||||||
{required this.profile, required final List<FeedBlogPostModel> blogPosts})
|
{required this.profile,
|
||||||
|
required this.profileDetails,
|
||||||
|
required final List<FeedBlogPostModel> blogPosts})
|
||||||
: _blogPosts = blogPosts;
|
: _blogPosts = blogPosts;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final ProfileModel profile;
|
final ProfileModel profile;
|
||||||
|
@override
|
||||||
|
final ProfileDetailsModel profileDetails;
|
||||||
final List<FeedBlogPostModel> _blogPosts;
|
final List<FeedBlogPostModel> _blogPosts;
|
||||||
@override
|
@override
|
||||||
List<FeedBlogPostModel> get blogPosts {
|
List<FeedBlogPostModel> get blogPosts {
|
||||||
@@ -392,7 +440,7 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'ProfileState.loaded(profile: $profile, blogPosts: $blogPosts)';
|
return 'ProfileState.loaded(profile: $profile, profileDetails: $profileDetails, blogPosts: $blogPosts)';
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -401,15 +449,19 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
|
|||||||
(other.runtimeType == runtimeType &&
|
(other.runtimeType == runtimeType &&
|
||||||
other is _$ProfileStateLoadedImpl &&
|
other is _$ProfileStateLoadedImpl &&
|
||||||
(identical(other.profile, profile) || other.profile == profile) &&
|
(identical(other.profile, profile) || other.profile == profile) &&
|
||||||
|
(identical(other.profileDetails, profileDetails) ||
|
||||||
|
other.profileDetails == profileDetails) &&
|
||||||
const DeepCollectionEquality()
|
const DeepCollectionEquality()
|
||||||
.equals(other._blogPosts, _blogPosts));
|
.equals(other._blogPosts, _blogPosts));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(
|
int get hashCode => Object.hash(runtimeType, profile, profileDetails,
|
||||||
runtimeType, profile, const DeepCollectionEquality().hash(_blogPosts));
|
const DeepCollectionEquality().hash(_blogPosts));
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of ProfileState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$ProfileStateLoadedImplCopyWith<_$ProfileStateLoadedImpl> get copyWith =>
|
_$$ProfileStateLoadedImplCopyWith<_$ProfileStateLoadedImpl> get copyWith =>
|
||||||
@@ -422,11 +474,13 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
|
|||||||
TResult Function() $default, {
|
TResult Function() $default, {
|
||||||
required TResult Function() loading,
|
required TResult Function() loading,
|
||||||
required TResult Function(
|
required TResult Function(
|
||||||
ProfileModel profile, List<FeedBlogPostModel> blogPosts)
|
ProfileModel profile,
|
||||||
|
ProfileDetailsModel profileDetails,
|
||||||
|
List<FeedBlogPostModel> blogPosts)
|
||||||
loaded,
|
loaded,
|
||||||
required TResult Function(String errorMessage) error,
|
required TResult Function(String errorMessage) error,
|
||||||
}) {
|
}) {
|
||||||
return loaded(profile, blogPosts);
|
return loaded(profile, profileDetails, blogPosts);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -434,11 +488,12 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
|
|||||||
TResult? whenOrNull<TResult extends Object?>(
|
TResult? whenOrNull<TResult extends Object?>(
|
||||||
TResult? Function()? $default, {
|
TResult? Function()? $default, {
|
||||||
TResult? Function()? loading,
|
TResult? Function()? loading,
|
||||||
TResult? Function(ProfileModel profile, List<FeedBlogPostModel> blogPosts)?
|
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails,
|
||||||
|
List<FeedBlogPostModel> blogPosts)?
|
||||||
loaded,
|
loaded,
|
||||||
TResult? Function(String errorMessage)? error,
|
TResult? Function(String errorMessage)? error,
|
||||||
}) {
|
}) {
|
||||||
return loaded?.call(profile, blogPosts);
|
return loaded?.call(profile, profileDetails, blogPosts);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -446,13 +501,14 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
|
|||||||
TResult maybeWhen<TResult extends Object?>(
|
TResult maybeWhen<TResult extends Object?>(
|
||||||
TResult Function()? $default, {
|
TResult Function()? $default, {
|
||||||
TResult Function()? loading,
|
TResult Function()? loading,
|
||||||
TResult Function(ProfileModel profile, List<FeedBlogPostModel> blogPosts)?
|
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails,
|
||||||
|
List<FeedBlogPostModel> blogPosts)?
|
||||||
loaded,
|
loaded,
|
||||||
TResult Function(String errorMessage)? error,
|
TResult Function(String errorMessage)? error,
|
||||||
required TResult orElse(),
|
required TResult orElse(),
|
||||||
}) {
|
}) {
|
||||||
if (loaded != null) {
|
if (loaded != null) {
|
||||||
return loaded(profile, blogPosts);
|
return loaded(profile, profileDetails, blogPosts);
|
||||||
}
|
}
|
||||||
return orElse();
|
return orElse();
|
||||||
}
|
}
|
||||||
@@ -498,12 +554,17 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
|
|||||||
abstract class ProfileStateLoaded implements ProfileState {
|
abstract class ProfileStateLoaded implements ProfileState {
|
||||||
const factory ProfileStateLoaded(
|
const factory ProfileStateLoaded(
|
||||||
{required final ProfileModel profile,
|
{required final ProfileModel profile,
|
||||||
|
required final ProfileDetailsModel profileDetails,
|
||||||
required final List<FeedBlogPostModel> blogPosts}) =
|
required final List<FeedBlogPostModel> blogPosts}) =
|
||||||
_$ProfileStateLoadedImpl;
|
_$ProfileStateLoadedImpl;
|
||||||
|
|
||||||
ProfileModel get profile;
|
ProfileModel get profile;
|
||||||
|
ProfileDetailsModel get profileDetails;
|
||||||
List<FeedBlogPostModel> get blogPosts;
|
List<FeedBlogPostModel> get blogPosts;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
_$$ProfileStateLoadedImplCopyWith<_$ProfileStateLoadedImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -525,6 +586,8 @@ class __$$ProfileStateErrorImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$ProfileStateErrorImpl) _then)
|
$Res Function(_$ProfileStateErrorImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of ProfileState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -564,7 +627,9 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
|
|||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, errorMessage);
|
int get hashCode => Object.hash(runtimeType, errorMessage);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of ProfileState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$ProfileStateErrorImplCopyWith<_$ProfileStateErrorImpl> get copyWith =>
|
_$$ProfileStateErrorImplCopyWith<_$ProfileStateErrorImpl> get copyWith =>
|
||||||
@@ -577,7 +642,9 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
|
|||||||
TResult Function() $default, {
|
TResult Function() $default, {
|
||||||
required TResult Function() loading,
|
required TResult Function() loading,
|
||||||
required TResult Function(
|
required TResult Function(
|
||||||
ProfileModel profile, List<FeedBlogPostModel> blogPosts)
|
ProfileModel profile,
|
||||||
|
ProfileDetailsModel profileDetails,
|
||||||
|
List<FeedBlogPostModel> blogPosts)
|
||||||
loaded,
|
loaded,
|
||||||
required TResult Function(String errorMessage) error,
|
required TResult Function(String errorMessage) error,
|
||||||
}) {
|
}) {
|
||||||
@@ -589,7 +656,8 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
|
|||||||
TResult? whenOrNull<TResult extends Object?>(
|
TResult? whenOrNull<TResult extends Object?>(
|
||||||
TResult? Function()? $default, {
|
TResult? Function()? $default, {
|
||||||
TResult? Function()? loading,
|
TResult? Function()? loading,
|
||||||
TResult? Function(ProfileModel profile, List<FeedBlogPostModel> blogPosts)?
|
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails,
|
||||||
|
List<FeedBlogPostModel> blogPosts)?
|
||||||
loaded,
|
loaded,
|
||||||
TResult? Function(String errorMessage)? error,
|
TResult? Function(String errorMessage)? error,
|
||||||
}) {
|
}) {
|
||||||
@@ -601,7 +669,8 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
|
|||||||
TResult maybeWhen<TResult extends Object?>(
|
TResult maybeWhen<TResult extends Object?>(
|
||||||
TResult Function()? $default, {
|
TResult Function()? $default, {
|
||||||
TResult Function()? loading,
|
TResult Function()? loading,
|
||||||
TResult Function(ProfileModel profile, List<FeedBlogPostModel> blogPosts)?
|
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails,
|
||||||
|
List<FeedBlogPostModel> blogPosts)?
|
||||||
loaded,
|
loaded,
|
||||||
TResult Function(String errorMessage)? error,
|
TResult Function(String errorMessage)? error,
|
||||||
required TResult orElse(),
|
required TResult orElse(),
|
||||||
@@ -655,7 +724,10 @@ abstract class ProfileStateError implements ProfileState {
|
|||||||
_$ProfileStateErrorImpl;
|
_$ProfileStateErrorImpl;
|
||||||
|
|
||||||
String get errorMessage;
|
String get errorMessage;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
_$$ProfileStateErrorImplCopyWith<_$ProfileStateErrorImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
import 'package:eatvio_app/core/app_export.dart';
|
import 'package:eatvio_app/core/app_export.dart';
|
||||||
import 'package:eatvio_app/features/feed/models/diets_pagination_model.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/feed/presentation/widgets/blog_post_widget.dart';
|
||||||
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: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/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/locator_service.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
@@ -23,8 +19,8 @@ class ProfileScreen extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _ProfileScreenState extends State<ProfileScreen> {
|
class _ProfileScreenState extends State<ProfileScreen> {
|
||||||
List<Circumference> chartData = [];
|
// List<Circumference> chartData = [];
|
||||||
List<ChartPointModel> chartPoints = [];
|
// List<ChartPointModel> chartPoints = [];
|
||||||
final List<String> chipsLabelList = ['Вес', 'Замеры', 'ИМТ'];
|
final List<String> chipsLabelList = ['Вес', 'Замеры', 'ИМТ'];
|
||||||
final List<String> chipsIntervalLabelList = ['1М', '3М', '6М', '1Г', 'ВСЁ ВРЕМЯ'];
|
final List<String> chipsIntervalLabelList = ['1М', '3М', '6М', '1Г', 'ВСЁ ВРЕМЯ'];
|
||||||
int _selectedChipIndex = 0;
|
int _selectedChipIndex = 0;
|
||||||
@@ -42,8 +38,8 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
|||||||
child: BlocBuilder<ProfileCubit, ProfileState>(
|
child: BlocBuilder<ProfileCubit, ProfileState>(
|
||||||
builder: (BuildContext context, ProfileState state) {
|
builder: (BuildContext context, ProfileState state) {
|
||||||
if (state is ProfileStateLoaded) {
|
if (state is ProfileStateLoaded) {
|
||||||
chartData = state.profile.circumferences;
|
// chartData = state.profile.circumferences;
|
||||||
chartPoints = state.profile.chartPoints;
|
// chartPoints = state.profile.chartPoints;
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.grey.shade200,
|
backgroundColor: Colors.grey.shade200,
|
||||||
appBar: widget.author == null ? AppBar(toolbarHeight: 0) : AppBar(),
|
appBar: widget.author == null ? AppBar(toolbarHeight: 0) : AppBar(),
|
||||||
@@ -65,17 +61,13 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
|||||||
padding: const EdgeInsets.only(left: 16, right: 16, bottom: 16),
|
padding: const EdgeInsets.only(left: 16, right: 16, bottom: 16),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
state.profile.user.profilePhotoUrl != null
|
CircleAvatar(
|
||||||
? CircleAvatar(
|
radius: 32,
|
||||||
radius: 32,
|
backgroundImage: NetworkImage(state.profile.profilePhotoUrl),
|
||||||
backgroundImage: NetworkImage(state.profile.user.profilePhotoUrl!),
|
),
|
||||||
)
|
|
||||||
: CircleAvatar(
|
|
||||||
radius: 32,
|
|
||||||
),
|
|
||||||
const SizedBox(width: 12),
|
const SizedBox(width: 12),
|
||||||
Text(
|
Text(
|
||||||
state.profile.user.name,
|
state.profile.name,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
@@ -123,7 +115,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
|||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () => Share.shareUri(
|
onTap: () => Share.shareUri(
|
||||||
Uri.parse(
|
Uri.parse(
|
||||||
baseUrl + '/ru/profile/' + state.profile.user.slug,
|
baseUrl + '/ru/profile/' + state.profile.slug,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Container(
|
child: Container(
|
||||||
@@ -139,12 +131,12 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (state.profile.userDetails.additionalInfo.isNotEmpty)
|
if (state.profileDetails.additionalInfo.isNotEmpty)
|
||||||
Container(
|
Container(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
padding: const EdgeInsets.all(16),
|
padding: const EdgeInsets.all(16),
|
||||||
child: Text(
|
child: Text(
|
||||||
state.profile.userDetails.additionalInfo,
|
state.profileDetails.additionalInfo,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.black.withOpacity(0.4),
|
color: Colors.black.withOpacity(0.4),
|
||||||
height: 1,
|
height: 1,
|
||||||
@@ -157,7 +149,9 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
|||||||
children: [
|
children: [
|
||||||
SizedBox(width: 16),
|
SizedBox(width: 16),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () => GoRouter.of(context).pushNamed('chatScreen', ),
|
onTap: () => GoRouter.of(context).pushNamed(
|
||||||
|
'chatScreen',
|
||||||
|
),
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.all(8),
|
padding: EdgeInsets.all(8),
|
||||||
@@ -213,25 +207,25 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Builder(
|
// Builder(
|
||||||
builder: (context) {
|
// builder: (context) {
|
||||||
switch (_selectedChipIndex) {
|
// switch (_selectedChipIndex) {
|
||||||
case 0:
|
// case 0:
|
||||||
return WeightChartWidget(
|
// return WeightChartWidget(
|
||||||
chartPoints: chartPoints,
|
// chartPoints: chartPoints,
|
||||||
profileCubit: context.read<ProfileCubit>(),
|
// profileCubit: context.read<ProfileCubit>(),
|
||||||
);
|
// );
|
||||||
case 1:
|
// case 1:
|
||||||
return CircumferenceChartWidget(
|
// return CircumferenceChartWidget(
|
||||||
chartData: chartData,
|
// chartData: chartData,
|
||||||
profileCubit: context.read<ProfileCubit>(),
|
// profileCubit: context.read<ProfileCubit>(),
|
||||||
);
|
// );
|
||||||
case 2:
|
// case 2:
|
||||||
return ImtChartWidget(chartPoints: chartPoints);
|
// return ImtChartWidget(chartPoints: chartPoints);
|
||||||
}
|
// }
|
||||||
return SizedBox.shrink();
|
// return SizedBox.shrink();
|
||||||
},
|
// },
|
||||||
),
|
// ),
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -1,374 +1,374 @@
|
|||||||
import 'package:eatvio_app/core/app_export.dart';
|
// import 'package:eatvio_app/core/app_export.dart';
|
||||||
import 'package:eatvio_app/features/profile/models/profile_model.dart';
|
// 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:eatvio_app/features/profile/presentation/bloc/profile_cubit/profile_cubit.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
// import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
// import 'package:flutter/material.dart';
|
||||||
import 'package:intl/intl.dart';
|
// import 'package:intl/intl.dart';
|
||||||
import 'package:syncfusion_flutter_charts/charts.dart';
|
// import 'package:syncfusion_flutter_charts/charts.dart';
|
||||||
|
//
|
||||||
class CircumferenceChartWidget extends StatefulWidget {
|
// class CircumferenceChartWidget extends StatefulWidget {
|
||||||
final List<Circumference> chartData;
|
// final List<Circumference> chartData;
|
||||||
final ProfileCubit profileCubit;
|
// final ProfileCubit profileCubit;
|
||||||
|
//
|
||||||
const CircumferenceChartWidget({
|
// const CircumferenceChartWidget({
|
||||||
super.key,
|
// super.key,
|
||||||
required this.chartData,
|
// required this.chartData,
|
||||||
required this.profileCubit,
|
// required this.profileCubit,
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
@override
|
// @override
|
||||||
State<CircumferenceChartWidget> createState() => _CircumferenceChartWidgetState();
|
// State<CircumferenceChartWidget> createState() => _CircumferenceChartWidgetState();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
|
// class _CircumferenceChartWidgetState extends State<CircumferenceChartWidget> {
|
||||||
late FixedExtentScrollController chestController;
|
// late FixedExtentScrollController chestController;
|
||||||
late FixedExtentScrollController waistController;
|
// late FixedExtentScrollController waistController;
|
||||||
late FixedExtentScrollController hipController;
|
// late FixedExtentScrollController hipController;
|
||||||
late int chest;
|
// late int chest;
|
||||||
late int waist;
|
// late int waist;
|
||||||
late int hip;
|
// late int hip;
|
||||||
|
//
|
||||||
@override
|
// @override
|
||||||
Widget build(BuildContext context) {
|
// Widget build(BuildContext context) {
|
||||||
return Column(
|
// return Column(
|
||||||
children: [
|
// children: [
|
||||||
if (widget.chartData.isNotEmpty)
|
// if (widget.chartData.isNotEmpty)
|
||||||
Padding(
|
// Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
// padding: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||||
child: Row(
|
// child: Row(
|
||||||
children: [
|
// children: [
|
||||||
Text(
|
// Text(
|
||||||
'${widget.chartData.last.chestCircumference}',
|
// '${widget.chartData.last.chestCircumference}',
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: Colors.black,
|
// color: Colors.black,
|
||||||
fontSize: 40,
|
// fontSize: 40,
|
||||||
fontWeight: FontWeight.w500,
|
// fontWeight: FontWeight.w500,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
if (widget.chartData.length == 1)
|
// if (widget.chartData.length == 1)
|
||||||
Container(
|
// Container(
|
||||||
margin: EdgeInsets.symmetric(horizontal: 12),
|
// margin: EdgeInsets.symmetric(horizontal: 12),
|
||||||
width: 8,
|
// width: 8,
|
||||||
height: 8,
|
// height: 8,
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
shape: BoxShape.circle,
|
// shape: BoxShape.circle,
|
||||||
color: Colors.black12,
|
// color: Colors.black12,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
if (widget.chartData.length > 1)
|
// if (widget.chartData.length > 1)
|
||||||
widget.chartData.last.chestCircumference > widget.chartData[widget.chartData.length - 2].chestCircumference
|
// widget.chartData.last.chestCircumference > widget.chartData[widget.chartData.length - 2].chestCircumference
|
||||||
? Icon(
|
// ? Icon(
|
||||||
Icons.arrow_drop_up,
|
// Icons.arrow_drop_up,
|
||||||
size: 40,
|
// size: 40,
|
||||||
color: Colors.grey,
|
// color: Colors.grey,
|
||||||
)
|
// )
|
||||||
: Icon(
|
// : Icon(
|
||||||
Icons.arrow_drop_down,
|
// Icons.arrow_drop_down,
|
||||||
size: 40,
|
// size: 40,
|
||||||
color: Colors.grey,
|
// color: Colors.grey,
|
||||||
),
|
// ),
|
||||||
Text(
|
// Text(
|
||||||
'${widget.chartData.last.waistCircumference}',
|
// '${widget.chartData.last.waistCircumference}',
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: Colors.black,
|
// color: Colors.black,
|
||||||
fontSize: 40,
|
// fontSize: 40,
|
||||||
fontWeight: FontWeight.w500,
|
// fontWeight: FontWeight.w500,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
if (widget.chartData.length == 1)
|
// if (widget.chartData.length == 1)
|
||||||
Container(
|
// Container(
|
||||||
margin: EdgeInsets.symmetric(horizontal: 12),
|
// margin: EdgeInsets.symmetric(horizontal: 12),
|
||||||
width: 8,
|
// width: 8,
|
||||||
height: 8,
|
// height: 8,
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
shape: BoxShape.circle,
|
// shape: BoxShape.circle,
|
||||||
color: Colors.black12,
|
// color: Colors.black12,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
if (widget.chartData.length > 1)
|
// if (widget.chartData.length > 1)
|
||||||
widget.chartData.last.waistCircumference > widget.chartData[widget.chartData.length - 2].waistCircumference
|
// widget.chartData.last.waistCircumference > widget.chartData[widget.chartData.length - 2].waistCircumference
|
||||||
? Icon(
|
// ? Icon(
|
||||||
Icons.arrow_drop_up,
|
// Icons.arrow_drop_up,
|
||||||
size: 40,
|
// size: 40,
|
||||||
color: Colors.grey,
|
// color: Colors.grey,
|
||||||
)
|
// )
|
||||||
: Icon(
|
// : Icon(
|
||||||
Icons.arrow_drop_down,
|
// Icons.arrow_drop_down,
|
||||||
size: 40,
|
// size: 40,
|
||||||
color: Colors.grey,
|
// color: Colors.grey,
|
||||||
),
|
// ),
|
||||||
Text(
|
// Text(
|
||||||
'${widget.chartData.last.hipCircumference}',
|
// '${widget.chartData.last.hipCircumference}',
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: Colors.black,
|
// color: Colors.black,
|
||||||
fontSize: 40,
|
// fontSize: 40,
|
||||||
fontWeight: FontWeight.w500,
|
// fontWeight: FontWeight.w500,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
if (widget.chartData.length == 1)
|
// if (widget.chartData.length == 1)
|
||||||
Container(
|
// Container(
|
||||||
margin: EdgeInsets.symmetric(horizontal: 12),
|
// margin: EdgeInsets.symmetric(horizontal: 12),
|
||||||
width: 8,
|
// width: 8,
|
||||||
height: 8,
|
// height: 8,
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
shape: BoxShape.circle,
|
// shape: BoxShape.circle,
|
||||||
color: Colors.black12,
|
// color: Colors.black12,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
if (widget.chartData.length > 1)
|
// if (widget.chartData.length > 1)
|
||||||
widget.chartData.last.hipCircumference > widget.chartData[widget.chartData.length - 2].hipCircumference
|
// widget.chartData.last.hipCircumference > widget.chartData[widget.chartData.length - 2].hipCircumference
|
||||||
? Icon(
|
// ? Icon(
|
||||||
Icons.arrow_drop_up,
|
// Icons.arrow_drop_up,
|
||||||
size: 40,
|
// size: 40,
|
||||||
color: Colors.grey,
|
// color: Colors.grey,
|
||||||
)
|
// )
|
||||||
: Icon(
|
// : Icon(
|
||||||
Icons.arrow_drop_down,
|
// Icons.arrow_drop_down,
|
||||||
size: 40,
|
// size: 40,
|
||||||
color: Colors.grey,
|
// color: Colors.grey,
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
Stack(
|
// Stack(
|
||||||
alignment: Alignment.bottomRight,
|
// alignment: Alignment.bottomRight,
|
||||||
children: [
|
// children: [
|
||||||
SfCartesianChart(
|
// SfCartesianChart(
|
||||||
margin: EdgeInsets.symmetric(horizontal: 8),
|
// margin: EdgeInsets.symmetric(horizontal: 8),
|
||||||
enableAxisAnimation: true,
|
// enableAxisAnimation: true,
|
||||||
plotAreaBorderWidth: 0,
|
// plotAreaBorderWidth: 0,
|
||||||
trackballBehavior: TrackballBehavior(
|
// trackballBehavior: TrackballBehavior(
|
||||||
enable: true,
|
// enable: true,
|
||||||
activationMode: ActivationMode.singleTap,
|
// activationMode: ActivationMode.singleTap,
|
||||||
tooltipDisplayMode: TrackballDisplayMode.groupAllPoints,
|
// tooltipDisplayMode: TrackballDisplayMode.groupAllPoints,
|
||||||
tooltipSettings: InteractiveTooltip(),
|
// tooltipSettings: InteractiveTooltip(),
|
||||||
lineType: TrackballLineType.vertical,
|
// lineType: TrackballLineType.vertical,
|
||||||
),
|
// ),
|
||||||
primaryXAxis: DateTimeCategoryAxis(
|
// primaryXAxis: DateTimeCategoryAxis(
|
||||||
tickPosition: TickPosition.inside,
|
// tickPosition: TickPosition.inside,
|
||||||
majorTickLines: MajorTickLines(
|
// majorTickLines: MajorTickLines(
|
||||||
size: 0,
|
// size: 0,
|
||||||
),
|
// ),
|
||||||
edgeLabelPlacement: EdgeLabelPlacement.shift,
|
// edgeLabelPlacement: EdgeLabelPlacement.shift,
|
||||||
dateFormat: DateFormat.MMMd('ru'),
|
// dateFormat: DateFormat.MMMd('ru'),
|
||||||
labelStyle: TextStyle(
|
// labelStyle: TextStyle(
|
||||||
color: Colors.grey,
|
// color: Colors.grey,
|
||||||
),
|
// ),
|
||||||
majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey.withOpacity(0.3)),
|
// majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey.withOpacity(0.3)),
|
||||||
axisLine: AxisLine(
|
// axisLine: AxisLine(
|
||||||
color: Colors.grey.withOpacity(0.3),
|
// color: Colors.grey.withOpacity(0.3),
|
||||||
width: 0.4,
|
// width: 0.4,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
primaryYAxis: NumericAxis(
|
// primaryYAxis: NumericAxis(
|
||||||
isVisible: false,
|
// isVisible: false,
|
||||||
labelFormat: '{value} см',
|
// labelFormat: '{value} см',
|
||||||
axisLine: AxisLine(
|
// axisLine: AxisLine(
|
||||||
width: 1,
|
// width: 1,
|
||||||
),
|
// ),
|
||||||
majorTickLines: MajorTickLines(size: 0),
|
// majorTickLines: MajorTickLines(size: 0),
|
||||||
),
|
// ),
|
||||||
series: _getSplineSeries(),
|
// series: _getSplineSeries(),
|
||||||
tooltipBehavior: TooltipBehavior(enable: true),
|
// tooltipBehavior: TooltipBehavior(enable: true),
|
||||||
),
|
// ),
|
||||||
FloatingActionButton.small(
|
// FloatingActionButton.small(
|
||||||
heroTag: 'addCircumference',
|
// heroTag: 'addCircumference',
|
||||||
onPressed: () {
|
// onPressed: () {
|
||||||
if (widget.chartData.isNotEmpty) {
|
// if (widget.chartData.isNotEmpty) {
|
||||||
chest = widget.chartData.last.chestCircumference;
|
// chest = widget.chartData.last.chestCircumference;
|
||||||
waist = widget.chartData.last.waistCircumference;
|
// waist = widget.chartData.last.waistCircumference;
|
||||||
hip = widget.chartData.last.hipCircumference;
|
// hip = widget.chartData.last.hipCircumference;
|
||||||
chestController = FixedExtentScrollController(initialItem: chest - 20);
|
// chestController = FixedExtentScrollController(initialItem: chest - 20);
|
||||||
waistController = FixedExtentScrollController(initialItem: waist - 20);
|
// waistController = FixedExtentScrollController(initialItem: waist - 20);
|
||||||
hipController = FixedExtentScrollController(initialItem: hip - 20);
|
// hipController = FixedExtentScrollController(initialItem: hip - 20);
|
||||||
} else {
|
// } else {
|
||||||
chestController = FixedExtentScrollController();
|
// chestController = FixedExtentScrollController();
|
||||||
waistController = FixedExtentScrollController();
|
// waistController = FixedExtentScrollController();
|
||||||
hipController = FixedExtentScrollController();
|
// hipController = FixedExtentScrollController();
|
||||||
}
|
// }
|
||||||
showModalBottomSheet(
|
// showModalBottomSheet(
|
||||||
useRootNavigator: true,
|
// useRootNavigator: true,
|
||||||
context: context,
|
// context: context,
|
||||||
builder: (context) {
|
// builder: (context) {
|
||||||
return Column(
|
// return Column(
|
||||||
children: [
|
// children: [
|
||||||
Expanded(
|
// Expanded(
|
||||||
child: Row(
|
// child: Row(
|
||||||
children: [
|
// children: [
|
||||||
Expanded(
|
// Expanded(
|
||||||
child: CupertinoPicker(
|
// child: CupertinoPicker(
|
||||||
magnification: 1.22,
|
// magnification: 1.22,
|
||||||
squeeze: 1.2,
|
// squeeze: 1.2,
|
||||||
useMagnifier: true,
|
// useMagnifier: true,
|
||||||
scrollController: chestController,
|
// scrollController: chestController,
|
||||||
itemExtent: 24,
|
// itemExtent: 24,
|
||||||
onSelectedItemChanged: (int value) {
|
// onSelectedItemChanged: (int value) {
|
||||||
chest = value;
|
// chest = value;
|
||||||
},
|
// },
|
||||||
children: [
|
// children: [
|
||||||
for (int i = 20; i < 200; i++) Text('$i'),
|
// for (int i = 20; i < 200; i++) Text('$i'),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
Expanded(
|
// Expanded(
|
||||||
child: CupertinoPicker(
|
// child: CupertinoPicker(
|
||||||
magnification: 1.22,
|
// magnification: 1.22,
|
||||||
squeeze: 1.2,
|
// squeeze: 1.2,
|
||||||
useMagnifier: true,
|
// useMagnifier: true,
|
||||||
scrollController: waistController,
|
// scrollController: waistController,
|
||||||
itemExtent: 24,
|
// itemExtent: 24,
|
||||||
onSelectedItemChanged: (int value) {
|
// onSelectedItemChanged: (int value) {
|
||||||
waist = value;
|
// waist = value;
|
||||||
},
|
// },
|
||||||
children: [
|
// children: [
|
||||||
for (int i = 20; i < 200; i++) Text('$i'),
|
// for (int i = 20; i < 200; i++) Text('$i'),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
Expanded(
|
// Expanded(
|
||||||
child: CupertinoPicker(
|
// child: CupertinoPicker(
|
||||||
magnification: 1.22,
|
// magnification: 1.22,
|
||||||
squeeze: 1.2,
|
// squeeze: 1.2,
|
||||||
useMagnifier: true,
|
// useMagnifier: true,
|
||||||
scrollController: hipController,
|
// scrollController: hipController,
|
||||||
itemExtent: 24,
|
// itemExtent: 24,
|
||||||
onSelectedItemChanged: (int value) {
|
// onSelectedItemChanged: (int value) {
|
||||||
hip = value;
|
// hip = value;
|
||||||
},
|
// },
|
||||||
children: [
|
// children: [
|
||||||
for (int i = 20; i < 200; i++) Text('$i'),
|
// for (int i = 20; i < 200; i++) Text('$i'),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
InkWell(
|
// InkWell(
|
||||||
onTap: () {
|
// onTap: () {
|
||||||
widget.profileCubit.addCircumference(
|
// widget.profileCubit.addCircumference(
|
||||||
chestCircumference: chest,
|
// chestCircumference: chest,
|
||||||
waistCircumference: waist,
|
// waistCircumference: waist,
|
||||||
hipCircumference: hip,
|
// hipCircumference: hip,
|
||||||
);
|
// );
|
||||||
Navigator.of(context).pop();
|
// Navigator.of(context).pop();
|
||||||
},
|
// },
|
||||||
borderRadius: BorderRadius.circular(16),
|
// borderRadius: BorderRadius.circular(16),
|
||||||
child: Ink(
|
// child: Ink(
|
||||||
width: MediaQuery.of(context).size.width - 32,
|
// width: MediaQuery.of(context).size.width - 32,
|
||||||
padding: EdgeInsets.all(16),
|
// padding: EdgeInsets.all(16),
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
color: appTheme.blueA400,
|
// color: appTheme.blueA400,
|
||||||
borderRadius: BorderRadius.circular(16),
|
// borderRadius: BorderRadius.circular(16),
|
||||||
),
|
// ),
|
||||||
child: Center(
|
// child: Center(
|
||||||
child: Text(
|
// child: Text(
|
||||||
'Сохранить',
|
// 'Сохранить',
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: Colors.white,
|
// color: Colors.white,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
backgroundColor: Colors.red,
|
// backgroundColor: Colors.red,
|
||||||
shape: CircleBorder(),
|
// shape: CircleBorder(),
|
||||||
child: Icon(
|
// child: Icon(
|
||||||
Icons.add,
|
// Icons.add,
|
||||||
color: Colors.white,
|
// color: Colors.white,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
List<CartesianSeries<Circumference, DateTime>> _getSplineSeries() {
|
// List<CartesianSeries<Circumference, DateTime>> _getSplineSeries() {
|
||||||
final Color seriesColor1 = Colors.red;
|
// final Color seriesColor1 = Colors.red;
|
||||||
final Color seriesColor2 = appTheme.blueA400;
|
// final Color seriesColor2 = appTheme.blueA400;
|
||||||
final Color seriesColor3 = Colors.green;
|
// final Color seriesColor3 = Colors.green;
|
||||||
|
//
|
||||||
return <CartesianSeries<Circumference, DateTime>>[
|
// return <CartesianSeries<Circumference, DateTime>>[
|
||||||
SplineAreaSeries<Circumference, DateTime>(
|
// SplineAreaSeries<Circumference, DateTime>(
|
||||||
markerSettings: MarkerSettings(
|
// markerSettings: MarkerSettings(
|
||||||
isVisible: true,
|
// isVisible: true,
|
||||||
color: seriesColor1,
|
// color: seriesColor1,
|
||||||
height: 8,
|
// height: 8,
|
||||||
width: 8,
|
// width: 8,
|
||||||
),
|
// ),
|
||||||
dataLabelSettings: DataLabelSettings(
|
// dataLabelSettings: DataLabelSettings(
|
||||||
labelAlignment: ChartDataLabelAlignment.top,
|
// labelAlignment: ChartDataLabelAlignment.top,
|
||||||
isVisible: true,
|
// isVisible: true,
|
||||||
),
|
// ),
|
||||||
dataSource: widget.chartData,
|
// dataSource: widget.chartData,
|
||||||
borderColor: seriesColor1,
|
// borderColor: seriesColor1,
|
||||||
gradient: LinearGradient(
|
// gradient: LinearGradient(
|
||||||
colors: [
|
// colors: [
|
||||||
seriesColor1.withOpacity(0.14),
|
// seriesColor1.withOpacity(0.14),
|
||||||
Colors.transparent,
|
// Colors.transparent,
|
||||||
],
|
// ],
|
||||||
begin: Alignment.topCenter,
|
// begin: Alignment.topCenter,
|
||||||
end: Alignment(0, 0.6),
|
// end: Alignment(0, 0.6),
|
||||||
),
|
// ),
|
||||||
name: 'Грудь',
|
// name: 'Грудь',
|
||||||
xValueMapper: (Circumference value, int index) => value.createdAt,
|
// xValueMapper: (Circumference value, int index) => value.createdAt,
|
||||||
yValueMapper: (Circumference value, int index) => value.chestCircumference,
|
// yValueMapper: (Circumference value, int index) => value.chestCircumference,
|
||||||
),
|
// ),
|
||||||
SplineAreaSeries<Circumference, DateTime>(
|
// SplineAreaSeries<Circumference, DateTime>(
|
||||||
markerSettings: MarkerSettings(
|
// markerSettings: MarkerSettings(
|
||||||
isVisible: true,
|
// isVisible: true,
|
||||||
color: seriesColor2,
|
// color: seriesColor2,
|
||||||
height: 8,
|
// height: 8,
|
||||||
width: 8,
|
// width: 8,
|
||||||
),
|
// ),
|
||||||
dataLabelSettings: DataLabelSettings(
|
// dataLabelSettings: DataLabelSettings(
|
||||||
labelAlignment: ChartDataLabelAlignment.top,
|
// labelAlignment: ChartDataLabelAlignment.top,
|
||||||
isVisible: true,
|
// isVisible: true,
|
||||||
),
|
// ),
|
||||||
dataSource: widget.chartData,
|
// dataSource: widget.chartData,
|
||||||
borderColor: seriesColor2,
|
// borderColor: seriesColor2,
|
||||||
gradient: LinearGradient(
|
// gradient: LinearGradient(
|
||||||
colors: [
|
// colors: [
|
||||||
seriesColor2.withOpacity(0.14),
|
// seriesColor2.withOpacity(0.14),
|
||||||
Colors.transparent,
|
// Colors.transparent,
|
||||||
],
|
// ],
|
||||||
begin: Alignment.topCenter,
|
// begin: Alignment.topCenter,
|
||||||
end: Alignment(0, 0.6),
|
// end: Alignment(0, 0.6),
|
||||||
),
|
// ),
|
||||||
name: 'Талия',
|
// name: 'Талия',
|
||||||
xValueMapper: (Circumference value, int index) => value.createdAt,
|
// xValueMapper: (Circumference value, int index) => value.createdAt,
|
||||||
yValueMapper: (Circumference value, int index) => value.waistCircumference,
|
// yValueMapper: (Circumference value, int index) => value.waistCircumference,
|
||||||
),
|
// ),
|
||||||
SplineAreaSeries<Circumference, DateTime>(
|
// SplineAreaSeries<Circumference, DateTime>(
|
||||||
markerSettings: MarkerSettings(
|
// markerSettings: MarkerSettings(
|
||||||
isVisible: true,
|
// isVisible: true,
|
||||||
color: seriesColor3,
|
// color: seriesColor3,
|
||||||
height: 8,
|
// height: 8,
|
||||||
width: 8,
|
// width: 8,
|
||||||
),
|
// ),
|
||||||
dataLabelSettings: DataLabelSettings(
|
// dataLabelSettings: DataLabelSettings(
|
||||||
labelAlignment: ChartDataLabelAlignment.top,
|
// labelAlignment: ChartDataLabelAlignment.top,
|
||||||
isVisible: true,
|
// isVisible: true,
|
||||||
),
|
// ),
|
||||||
dataSource: widget.chartData,
|
// dataSource: widget.chartData,
|
||||||
borderColor: seriesColor3,
|
// borderColor: seriesColor3,
|
||||||
gradient: LinearGradient(
|
// gradient: LinearGradient(
|
||||||
colors: [
|
// colors: [
|
||||||
seriesColor3.withOpacity(0.14),
|
// seriesColor3.withOpacity(0.14),
|
||||||
Colors.transparent,
|
// Colors.transparent,
|
||||||
],
|
// ],
|
||||||
begin: Alignment.topCenter,
|
// begin: Alignment.topCenter,
|
||||||
end: Alignment(0, 0.6),
|
// end: Alignment(0, 0.6),
|
||||||
),
|
// ),
|
||||||
name: 'Бёдра',
|
// name: 'Бёдра',
|
||||||
xValueMapper: (Circumference value, int index) => value.createdAt,
|
// xValueMapper: (Circumference value, int index) => value.createdAt,
|
||||||
yValueMapper: (Circumference value, int index) => value.hipCircumference,
|
// yValueMapper: (Circumference value, int index) => value.hipCircumference,
|
||||||
),
|
// ),
|
||||||
];
|
// ];
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|||||||
@@ -1,114 +1,114 @@
|
|||||||
import 'package:eatvio_app/features/profile/models/profile_model.dart';
|
// import 'package:eatvio_app/features/profile/models/profile_model.dart';
|
||||||
import 'package:eatvio_app/theme/theme_helper.dart';
|
// import 'package:eatvio_app/theme/theme_helper.dart';
|
||||||
import 'package:flutter/material.dart';
|
// import 'package:flutter/material.dart';
|
||||||
import 'package:syncfusion_flutter_charts/charts.dart';
|
// import 'package:syncfusion_flutter_charts/charts.dart';
|
||||||
import 'package:intl/intl.dart';
|
// import 'package:intl/intl.dart';
|
||||||
|
//
|
||||||
class ImtChartWidget extends StatelessWidget {
|
// class ImtChartWidget extends StatelessWidget {
|
||||||
final List<ChartPointModel> chartPoints;
|
// final List<ChartPointModel> chartPoints;
|
||||||
|
//
|
||||||
const ImtChartWidget({
|
// const ImtChartWidget({
|
||||||
super.key,
|
// super.key,
|
||||||
required this.chartPoints,
|
// required this.chartPoints,
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
@override
|
// @override
|
||||||
Widget build(BuildContext context) {
|
// Widget build(BuildContext context) {
|
||||||
return Column(
|
// return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
// children: [
|
||||||
Padding(
|
// Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
// padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||||
child: Row(
|
// child: Row(
|
||||||
children: [
|
// children: [
|
||||||
Text(
|
// Text(
|
||||||
'${chartPoints.last.bmi.toStringAsFixed(2)}',
|
// '${chartPoints.last.bmi.toStringAsFixed(2)}',
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: Colors.black,
|
// color: Colors.black,
|
||||||
fontSize: 40,
|
// fontSize: 40,
|
||||||
fontWeight: FontWeight.w500,
|
// fontWeight: FontWeight.w500,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
chartPoints.last.bmi > chartPoints[chartPoints.length - 2].bmi
|
// chartPoints.last.bmi > chartPoints[chartPoints.length - 2].bmi
|
||||||
? Icon(
|
// ? Icon(
|
||||||
Icons.arrow_drop_up,
|
// Icons.arrow_drop_up,
|
||||||
size: 40,
|
// size: 40,
|
||||||
color: Colors.grey,
|
// color: Colors.grey,
|
||||||
)
|
// )
|
||||||
: Icon(
|
// : Icon(
|
||||||
Icons.arrow_drop_down,
|
// Icons.arrow_drop_down,
|
||||||
size: 40,
|
// size: 40,
|
||||||
color: Colors.grey,
|
// color: Colors.grey,
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
SfCartesianChart(
|
// SfCartesianChart(
|
||||||
margin: EdgeInsets.symmetric(horizontal: 8),
|
// margin: EdgeInsets.symmetric(horizontal: 8),
|
||||||
enableAxisAnimation: true,
|
// enableAxisAnimation: true,
|
||||||
plotAreaBorderWidth: 0,
|
// plotAreaBorderWidth: 0,
|
||||||
trackballBehavior: TrackballBehavior(
|
// trackballBehavior: TrackballBehavior(
|
||||||
enable: true,
|
// enable: true,
|
||||||
activationMode: ActivationMode.singleTap,
|
// activationMode: ActivationMode.singleTap,
|
||||||
tooltipDisplayMode: TrackballDisplayMode.groupAllPoints,
|
// tooltipDisplayMode: TrackballDisplayMode.groupAllPoints,
|
||||||
tooltipSettings: InteractiveTooltip(),
|
// tooltipSettings: InteractiveTooltip(),
|
||||||
lineType: TrackballLineType.vertical,
|
// lineType: TrackballLineType.vertical,
|
||||||
),
|
// ),
|
||||||
primaryXAxis: DateTimeCategoryAxis(
|
// primaryXAxis: DateTimeCategoryAxis(
|
||||||
initialVisibleMinimum: chartPoints.first.createdAt,
|
// initialVisibleMinimum: chartPoints.first.createdAt,
|
||||||
initialVisibleMaximum: chartPoints.last.createdAt,
|
// initialVisibleMaximum: chartPoints.last.createdAt,
|
||||||
tickPosition: TickPosition.inside,
|
// tickPosition: TickPosition.inside,
|
||||||
majorTickLines: MajorTickLines(
|
// majorTickLines: MajorTickLines(
|
||||||
size: 0,
|
// size: 0,
|
||||||
),
|
// ),
|
||||||
edgeLabelPlacement: EdgeLabelPlacement.shift,
|
// edgeLabelPlacement: EdgeLabelPlacement.shift,
|
||||||
dateFormat: DateFormat.MMMd('ru'),
|
// dateFormat: DateFormat.MMMd('ru'),
|
||||||
labelStyle: TextStyle(
|
// labelStyle: TextStyle(
|
||||||
color: Colors.grey,
|
// color: Colors.grey,
|
||||||
),
|
// ),
|
||||||
majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey.withOpacity(0.3)),
|
// majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey.withOpacity(0.3)),
|
||||||
axisLine: AxisLine(
|
// axisLine: AxisLine(
|
||||||
color: Colors.grey.withOpacity(0.3),
|
// color: Colors.grey.withOpacity(0.3),
|
||||||
width: 0.4,
|
// width: 0.4,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
primaryYAxis: NumericAxis(
|
// primaryYAxis: NumericAxis(
|
||||||
isVisible: false,
|
// isVisible: false,
|
||||||
),
|
// ),
|
||||||
series: _getSplineSeries(),
|
// series: _getSplineSeries(),
|
||||||
tooltipBehavior: TooltipBehavior(enable: true),
|
// tooltipBehavior: TooltipBehavior(enable: true),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
List<CartesianSeries<ChartPointModel, DateTime>> _getSplineSeries() {
|
// List<CartesianSeries<ChartPointModel, DateTime>> _getSplineSeries() {
|
||||||
return <CartesianSeries<ChartPointModel, DateTime>>[
|
// return <CartesianSeries<ChartPointModel, DateTime>>[
|
||||||
SplineAreaSeries<ChartPointModel, DateTime>(
|
// SplineAreaSeries<ChartPointModel, DateTime>(
|
||||||
markerSettings: MarkerSettings(
|
// markerSettings: MarkerSettings(
|
||||||
isVisible: true,
|
// isVisible: true,
|
||||||
color: appTheme.blueA400,
|
// color: appTheme.blueA400,
|
||||||
height: 8,
|
// height: 8,
|
||||||
width: 8,
|
// width: 8,
|
||||||
),
|
// ),
|
||||||
dataLabelSettings: DataLabelSettings(
|
// dataLabelSettings: DataLabelSettings(
|
||||||
labelAlignment: ChartDataLabelAlignment.top,
|
// labelAlignment: ChartDataLabelAlignment.top,
|
||||||
isVisible: true,
|
// isVisible: true,
|
||||||
),
|
// ),
|
||||||
dataSource: chartPoints,
|
// dataSource: chartPoints,
|
||||||
borderColor: appTheme.blueA400,
|
// borderColor: appTheme.blueA400,
|
||||||
gradient: LinearGradient(
|
// gradient: LinearGradient(
|
||||||
colors: [
|
// colors: [
|
||||||
appTheme.blueA400.withOpacity(0.14),
|
// appTheme.blueA400.withOpacity(0.14),
|
||||||
Colors.transparent,
|
// Colors.transparent,
|
||||||
],
|
// ],
|
||||||
begin: Alignment.topCenter,
|
// begin: Alignment.topCenter,
|
||||||
end: Alignment(0, 0.6),
|
// end: Alignment(0, 0.6),
|
||||||
),
|
// ),
|
||||||
name: 'ИМТ',
|
// name: 'ИМТ',
|
||||||
xValueMapper: (ChartPointModel value, int index) => value.createdAt,
|
// xValueMapper: (ChartPointModel value, int index) => value.createdAt,
|
||||||
yValueMapper: (ChartPointModel value, int index) => double.parse(value.bmi.toStringAsFixed(2)),
|
// yValueMapper: (ChartPointModel value, int index) => double.parse(value.bmi.toStringAsFixed(2)),
|
||||||
),
|
// ),
|
||||||
];
|
// ];
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|||||||
@@ -1,237 +1,237 @@
|
|||||||
import 'package:eatvio_app/core/app_export.dart';
|
// import 'package:eatvio_app/core/app_export.dart';
|
||||||
import 'package:eatvio_app/features/profile/models/profile_model.dart';
|
// 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:eatvio_app/features/profile/presentation/bloc/profile_cubit/profile_cubit.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
// import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
// import 'package:flutter/material.dart';
|
||||||
import 'package:intl/intl.dart';
|
// import 'package:intl/intl.dart';
|
||||||
import 'package:syncfusion_flutter_charts/charts.dart';
|
// import 'package:syncfusion_flutter_charts/charts.dart';
|
||||||
|
//
|
||||||
class WeightChartWidget extends StatefulWidget {
|
// class WeightChartWidget extends StatefulWidget {
|
||||||
final List<ChartPointModel> chartPoints;
|
// final List<ChartPointModel> chartPoints;
|
||||||
final ProfileCubit profileCubit;
|
// final ProfileCubit profileCubit;
|
||||||
|
//
|
||||||
const WeightChartWidget({
|
// const WeightChartWidget({
|
||||||
super.key,
|
// super.key,
|
||||||
required this.chartPoints,
|
// required this.chartPoints,
|
||||||
required this.profileCubit,
|
// required this.profileCubit,
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
@override
|
// @override
|
||||||
State<WeightChartWidget> createState() => _WeightChartWidgetState();
|
// State<WeightChartWidget> createState() => _WeightChartWidgetState();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
class _WeightChartWidgetState extends State<WeightChartWidget> {
|
// class _WeightChartWidgetState extends State<WeightChartWidget> {
|
||||||
late FixedExtentScrollController weightKiloController;
|
// late FixedExtentScrollController weightKiloController;
|
||||||
late FixedExtentScrollController weightGramsController;
|
// late FixedExtentScrollController weightGramsController;
|
||||||
late int weightKilo;
|
// late int weightKilo;
|
||||||
late int weightGrams;
|
// late int weightGrams;
|
||||||
|
//
|
||||||
@override
|
// @override
|
||||||
Widget build(BuildContext context) {
|
// Widget build(BuildContext context) {
|
||||||
return Column(
|
// return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
// children: [
|
||||||
if (widget.chartPoints.isNotEmpty)
|
// if (widget.chartPoints.isNotEmpty)
|
||||||
Padding(
|
// Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
// padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||||
child: Row(
|
// child: Row(
|
||||||
children: [
|
// children: [
|
||||||
Text(
|
// Text(
|
||||||
'${widget.chartPoints.last.weight.toStringAsFixed(1)} кг',
|
// '${widget.chartPoints.last.weight.toStringAsFixed(1)} кг',
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: Colors.black,
|
// color: Colors.black,
|
||||||
fontSize: 40,
|
// fontSize: 40,
|
||||||
fontWeight: FontWeight.w500,
|
// fontWeight: FontWeight.w500,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
if (widget.chartPoints.length == 1)
|
// if (widget.chartPoints.length == 1)
|
||||||
Container(
|
// Container(
|
||||||
margin: EdgeInsets.symmetric(horizontal: 12),
|
// margin: EdgeInsets.symmetric(horizontal: 12),
|
||||||
width: 8,
|
// width: 8,
|
||||||
height: 8,
|
// height: 8,
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
shape: BoxShape.circle,
|
// shape: BoxShape.circle,
|
||||||
color: Colors.black12,
|
// color: Colors.black12,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
if (widget.chartPoints.length > 1) widget.chartPoints.last.weight > widget.chartPoints[widget.chartPoints.length - 2].weight
|
// if (widget.chartPoints.length > 1) widget.chartPoints.last.weight > widget.chartPoints[widget.chartPoints.length - 2].weight
|
||||||
? Icon(
|
// ? Icon(
|
||||||
Icons.arrow_drop_up,
|
// Icons.arrow_drop_up,
|
||||||
size: 40,
|
// size: 40,
|
||||||
color: Colors.grey.withOpacity(0.4),
|
// color: Colors.grey.withOpacity(0.4),
|
||||||
)
|
// )
|
||||||
: Icon(
|
// : Icon(
|
||||||
Icons.arrow_drop_down,
|
// Icons.arrow_drop_down,
|
||||||
size: 40,
|
// size: 40,
|
||||||
color: Colors.grey.withOpacity(0.4),
|
// color: Colors.grey.withOpacity(0.4),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
Stack(
|
// Stack(
|
||||||
alignment: Alignment.bottomRight,
|
// alignment: Alignment.bottomRight,
|
||||||
children: [
|
// children: [
|
||||||
SfCartesianChart(
|
// SfCartesianChart(
|
||||||
margin: EdgeInsets.symmetric(horizontal: 8),
|
// margin: EdgeInsets.symmetric(horizontal: 8),
|
||||||
enableAxisAnimation: true,
|
// enableAxisAnimation: true,
|
||||||
plotAreaBorderWidth: 0,
|
// plotAreaBorderWidth: 0,
|
||||||
trackballBehavior: TrackballBehavior(
|
// trackballBehavior: TrackballBehavior(
|
||||||
enable: true,
|
// enable: true,
|
||||||
activationMode: ActivationMode.singleTap,
|
// activationMode: ActivationMode.singleTap,
|
||||||
tooltipDisplayMode: TrackballDisplayMode.groupAllPoints,
|
// tooltipDisplayMode: TrackballDisplayMode.groupAllPoints,
|
||||||
tooltipSettings: InteractiveTooltip(),
|
// tooltipSettings: InteractiveTooltip(),
|
||||||
lineType: TrackballLineType.vertical,
|
// lineType: TrackballLineType.vertical,
|
||||||
),
|
// ),
|
||||||
primaryXAxis: DateTimeCategoryAxis(
|
// primaryXAxis: DateTimeCategoryAxis(
|
||||||
tickPosition: TickPosition.inside,
|
// tickPosition: TickPosition.inside,
|
||||||
majorTickLines: MajorTickLines(
|
// majorTickLines: MajorTickLines(
|
||||||
size: 0,
|
// size: 0,
|
||||||
),
|
// ),
|
||||||
edgeLabelPlacement: EdgeLabelPlacement.shift,
|
// edgeLabelPlacement: EdgeLabelPlacement.shift,
|
||||||
dateFormat: DateFormat.MMMd('ru'),
|
// dateFormat: DateFormat.MMMd('ru'),
|
||||||
labelStyle: TextStyle(
|
// labelStyle: TextStyle(
|
||||||
color: Colors.grey,
|
// color: Colors.grey,
|
||||||
),
|
// ),
|
||||||
majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey.withOpacity(0.3)),
|
// majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey.withOpacity(0.3)),
|
||||||
axisLine: AxisLine(
|
// axisLine: AxisLine(
|
||||||
color: Colors.grey.withOpacity(0.3),
|
// color: Colors.grey.withOpacity(0.3),
|
||||||
width: 0.4,
|
// width: 0.4,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
primaryYAxis: NumericAxis(
|
// primaryYAxis: NumericAxis(
|
||||||
isVisible: false,
|
// isVisible: false,
|
||||||
labelFormat: '{value} кг',
|
// labelFormat: '{value} кг',
|
||||||
majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey),
|
// majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey),
|
||||||
axisLine: AxisLine(
|
// axisLine: AxisLine(
|
||||||
width: 1,
|
// width: 1,
|
||||||
),
|
// ),
|
||||||
majorTickLines: MajorTickLines(size: 0),
|
// majorTickLines: MajorTickLines(size: 0),
|
||||||
),
|
// ),
|
||||||
series: _getSplineSeries(),
|
// series: _getSplineSeries(),
|
||||||
tooltipBehavior: TooltipBehavior(enable: true),
|
// tooltipBehavior: TooltipBehavior(enable: true),
|
||||||
),
|
// ),
|
||||||
FloatingActionButton.small(
|
// FloatingActionButton.small(
|
||||||
heroTag: 'addWeight',
|
// heroTag: 'addWeight',
|
||||||
onPressed: () {
|
// onPressed: () {
|
||||||
if (widget.chartPoints.isNotEmpty) {
|
// if (widget.chartPoints.isNotEmpty) {
|
||||||
weightKilo = int.parse(widget.chartPoints.last.weight.toString().split('.')[0]);
|
// weightKilo = int.parse(widget.chartPoints.last.weight.toString().split('.')[0]);
|
||||||
weightGrams = int.parse(widget.chartPoints.last.weight.toString().split('.')[1][0]);
|
// weightGrams = int.parse(widget.chartPoints.last.weight.toString().split('.')[1][0]);
|
||||||
weightKiloController = FixedExtentScrollController(initialItem: weightKilo - 20);
|
// weightKiloController = FixedExtentScrollController(initialItem: weightKilo - 20);
|
||||||
weightGramsController = FixedExtentScrollController(initialItem: weightGrams);
|
// weightGramsController = FixedExtentScrollController(initialItem: weightGrams);
|
||||||
} else {
|
// } else {
|
||||||
weightKiloController = FixedExtentScrollController();
|
// weightKiloController = FixedExtentScrollController();
|
||||||
weightGramsController = FixedExtentScrollController();
|
// weightGramsController = FixedExtentScrollController();
|
||||||
}
|
// }
|
||||||
showModalBottomSheet(
|
// showModalBottomSheet(
|
||||||
useRootNavigator: true,
|
// useRootNavigator: true,
|
||||||
context: context,
|
// context: context,
|
||||||
builder: (context) {
|
// builder: (context) {
|
||||||
return Column(
|
// return Column(
|
||||||
children: [
|
// children: [
|
||||||
Expanded(
|
// Expanded(
|
||||||
child: Row(
|
// child: Row(
|
||||||
children: [
|
// children: [
|
||||||
Expanded(
|
// Expanded(
|
||||||
child: CupertinoPicker(
|
// child: CupertinoPicker(
|
||||||
magnification: 1.22,
|
// magnification: 1.22,
|
||||||
squeeze: 1.2,
|
// squeeze: 1.2,
|
||||||
useMagnifier: true,
|
// useMagnifier: true,
|
||||||
scrollController: weightKiloController,
|
// scrollController: weightKiloController,
|
||||||
itemExtent: 24,
|
// itemExtent: 24,
|
||||||
onSelectedItemChanged: (int value) {
|
// onSelectedItemChanged: (int value) {
|
||||||
weightKilo = value + 20;
|
// weightKilo = value + 20;
|
||||||
},
|
// },
|
||||||
children: [
|
// children: [
|
||||||
for (int i = 20; i < 300; i++) Text('$i'),
|
// for (int i = 20; i < 300; i++) Text('$i'),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
Expanded(
|
// Expanded(
|
||||||
child: CupertinoPicker(
|
// child: CupertinoPicker(
|
||||||
magnification: 1.22,
|
// magnification: 1.22,
|
||||||
squeeze: 1.2,
|
// squeeze: 1.2,
|
||||||
useMagnifier: true,
|
// useMagnifier: true,
|
||||||
scrollController: weightGramsController,
|
// scrollController: weightGramsController,
|
||||||
itemExtent: 24,
|
// itemExtent: 24,
|
||||||
onSelectedItemChanged: (int value) {
|
// onSelectedItemChanged: (int value) {
|
||||||
weightGrams = value;
|
// weightGrams = value;
|
||||||
},
|
// },
|
||||||
children: [
|
// children: [
|
||||||
for (int i = 0; i < 10; i++) Text('$i'),
|
// for (int i = 0; i < 10; i++) Text('$i'),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
InkWell(
|
// InkWell(
|
||||||
onTap: () {
|
// onTap: () {
|
||||||
widget.profileCubit.addWeight(weight: double.parse('$weightKilo.$weightGrams'));
|
// widget.profileCubit.addWeight(weight: double.parse('$weightKilo.$weightGrams'));
|
||||||
Navigator.of(context).pop();
|
// Navigator.of(context).pop();
|
||||||
},
|
// },
|
||||||
borderRadius: BorderRadius.circular(16),
|
// borderRadius: BorderRadius.circular(16),
|
||||||
child: Ink(
|
// child: Ink(
|
||||||
width: MediaQuery.of(context).size.width - 32,
|
// width: MediaQuery.of(context).size.width - 32,
|
||||||
padding: EdgeInsets.all(16),
|
// padding: EdgeInsets.all(16),
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
color: appTheme.blueA400,
|
// color: appTheme.blueA400,
|
||||||
borderRadius: BorderRadius.circular(16),
|
// borderRadius: BorderRadius.circular(16),
|
||||||
),
|
// ),
|
||||||
child: Center(
|
// child: Center(
|
||||||
child: Text(
|
// child: Text(
|
||||||
'Сохранить',
|
// 'Сохранить',
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: Colors.white,
|
// color: Colors.white,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
backgroundColor: Colors.red,
|
// backgroundColor: Colors.red,
|
||||||
shape: CircleBorder(),
|
// shape: CircleBorder(),
|
||||||
child: Icon(
|
// child: Icon(
|
||||||
Icons.add,
|
// Icons.add,
|
||||||
color: Colors.white,
|
// color: Colors.white,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
List<CartesianSeries<ChartPointModel, DateTime>> _getSplineSeries() {
|
// List<CartesianSeries<ChartPointModel, DateTime>> _getSplineSeries() {
|
||||||
return <CartesianSeries<ChartPointModel, DateTime>>[
|
// return <CartesianSeries<ChartPointModel, DateTime>>[
|
||||||
SplineAreaSeries<ChartPointModel, DateTime>(
|
// SplineAreaSeries<ChartPointModel, DateTime>(
|
||||||
markerSettings: MarkerSettings(
|
// markerSettings: MarkerSettings(
|
||||||
isVisible: true,
|
// isVisible: true,
|
||||||
color: appTheme.blueA400,
|
// color: appTheme.blueA400,
|
||||||
height: 8,
|
// height: 8,
|
||||||
width: 8,
|
// width: 8,
|
||||||
),
|
// ),
|
||||||
dataLabelSettings: DataLabelSettings(
|
// dataLabelSettings: DataLabelSettings(
|
||||||
labelAlignment: ChartDataLabelAlignment.top,
|
// labelAlignment: ChartDataLabelAlignment.top,
|
||||||
isVisible: true,
|
// isVisible: true,
|
||||||
),
|
// ),
|
||||||
dataSource: widget.chartPoints,
|
// dataSource: widget.chartPoints,
|
||||||
borderColor: appTheme.blueA400,
|
// borderColor: appTheme.blueA400,
|
||||||
gradient: LinearGradient(
|
// gradient: LinearGradient(
|
||||||
colors: [
|
// colors: [
|
||||||
appTheme.blueA400.withOpacity(0.14),
|
// appTheme.blueA400.withOpacity(0.14),
|
||||||
Colors.transparent,
|
// Colors.transparent,
|
||||||
],
|
// ],
|
||||||
begin: Alignment.topCenter,
|
// begin: Alignment.topCenter,
|
||||||
end: Alignment(0, 0.6),
|
// end: Alignment(0, 0.6),
|
||||||
),
|
// ),
|
||||||
name: 'Вес',
|
// name: 'Вес',
|
||||||
xValueMapper: (ChartPointModel value, int index) => value.createdAt,
|
// xValueMapper: (ChartPointModel value, int index) => value.createdAt,
|
||||||
yValueMapper: (ChartPointModel value, int index) => value.weight,
|
// yValueMapper: (ChartPointModel value, int index) => value.weight,
|
||||||
),
|
// ),
|
||||||
];
|
// ];
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|||||||
@@ -23,6 +23,14 @@ class ProfileRepository {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<ProfileDetailsModel> getMyProfileDetails() async {
|
||||||
|
try {
|
||||||
|
return await profileService.getMyProfileDetails();
|
||||||
|
} catch (e) {
|
||||||
|
rethrow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> addCircumference({
|
Future<void> addCircumference({
|
||||||
required int chestCircumference,
|
required int chestCircumference,
|
||||||
required int waistCircumference,
|
required int waistCircumference,
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ abstract class ProfileService {
|
|||||||
@GET('/api/profile/index')
|
@GET('/api/profile/index')
|
||||||
Future<ProfileModel> getMyProfile();
|
Future<ProfileModel> getMyProfile();
|
||||||
|
|
||||||
|
@GET('/api/profile/detailz')
|
||||||
|
Future<ProfileDetailsModel> getMyProfileDetails();
|
||||||
|
|
||||||
@POST('/api/profile/addCircumference')
|
@POST('/api/profile/addCircumference')
|
||||||
Future<void> addCircumference({
|
Future<void> addCircumference({
|
||||||
@Part(name: 'chest_circumference') required int chestCircumference,
|
@Part(name: 'chest_circumference') required int chestCircumference,
|
||||||
|
|||||||
@@ -87,6 +87,39 @@ class _ProfileService implements ProfileService {
|
|||||||
return _value;
|
return _value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<ProfileDetailsModel> getMyProfileDetails() async {
|
||||||
|
final _extra = <String, dynamic>{};
|
||||||
|
final queryParameters = <String, dynamic>{};
|
||||||
|
final _headers = <String, dynamic>{};
|
||||||
|
const Map<String, dynamic>? _data = null;
|
||||||
|
final _options = _setStreamType<ProfileDetailsModel>(Options(
|
||||||
|
method: 'GET',
|
||||||
|
headers: _headers,
|
||||||
|
extra: _extra,
|
||||||
|
)
|
||||||
|
.compose(
|
||||||
|
_dio.options,
|
||||||
|
'/api/profile/detailz',
|
||||||
|
queryParameters: queryParameters,
|
||||||
|
data: _data,
|
||||||
|
)
|
||||||
|
.copyWith(
|
||||||
|
baseUrl: _combineBaseUrls(
|
||||||
|
_dio.options.baseUrl,
|
||||||
|
baseUrl,
|
||||||
|
)));
|
||||||
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
|
||||||
|
late ProfileDetailsModel _value;
|
||||||
|
try {
|
||||||
|
_value = ProfileDetailsModel.fromJson(_result.data!);
|
||||||
|
} on Object catch (e, s) {
|
||||||
|
errorLogger?.logError(e, s, _options);
|
||||||
|
rethrow;
|
||||||
|
}
|
||||||
|
return _value;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> addCircumference({
|
Future<void> addCircumference({
|
||||||
required int chestCircumference,
|
required int chestCircumference,
|
||||||
|
|||||||
@@ -24,8 +24,12 @@ mixin _$Ingredient {
|
|||||||
String get unit => throw _privateConstructorUsedError;
|
String get unit => throw _privateConstructorUsedError;
|
||||||
String get portion => throw _privateConstructorUsedError;
|
String get portion => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this Ingredient to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$IngredientCopyWith<Ingredient> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -49,6 +53,8 @@ class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of Ingredient
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -92,6 +98,8 @@ class __$$IngredientImplCopyWithImpl<$Res>
|
|||||||
_$IngredientImpl _value, $Res Function(_$IngredientImpl) _then)
|
_$IngredientImpl _value, $Res Function(_$IngredientImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of Ingredient
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -147,11 +155,13 @@ class _$IngredientImpl implements _Ingredient {
|
|||||||
(identical(other.portion, portion) || other.portion == portion));
|
(identical(other.portion, portion) || other.portion == portion));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, name, unit, portion);
|
int get hashCode => Object.hash(runtimeType, name, unit, portion);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of Ingredient
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
|
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
|
||||||
@@ -180,8 +190,11 @@ abstract class _Ingredient implements Ingredient {
|
|||||||
String get unit;
|
String get unit;
|
||||||
@override
|
@override
|
||||||
String get portion;
|
String get portion;
|
||||||
|
|
||||||
|
/// Create a copy of Ingredient
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
|
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,8 +30,12 @@ mixin _$RecipeModel {
|
|||||||
String? get image => throw _privateConstructorUsedError;
|
String? get image => throw _privateConstructorUsedError;
|
||||||
int? get cooking_time => throw _privateConstructorUsedError;
|
int? get cooking_time => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this RecipeModel to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$RecipeModelCopyWith<RecipeModel> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -64,6 +68,8 @@ class _$RecipeModelCopyWithImpl<$Res, $Val extends RecipeModel>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of RecipeModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -146,6 +152,8 @@ class __$$RecipeModelImplCopyWithImpl<$Res>
|
|||||||
_$RecipeModelImpl _value, $Res Function(_$RecipeModelImpl) _then)
|
_$RecipeModelImpl _value, $Res Function(_$RecipeModelImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of RecipeModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -279,7 +287,7 @@ class _$RecipeModelImpl implements _RecipeModel {
|
|||||||
other.cooking_time == cooking_time));
|
other.cooking_time == cooking_time));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(
|
int get hashCode => Object.hash(
|
||||||
runtimeType,
|
runtimeType,
|
||||||
@@ -293,7 +301,9 @@ class _$RecipeModelImpl implements _RecipeModel {
|
|||||||
image,
|
image,
|
||||||
cooking_time);
|
cooking_time);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of RecipeModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$RecipeModelImplCopyWith<_$RecipeModelImpl> get copyWith =>
|
_$$RecipeModelImplCopyWith<_$RecipeModelImpl> get copyWith =>
|
||||||
@@ -340,8 +350,11 @@ abstract class _RecipeModel implements RecipeModel {
|
|||||||
String? get image;
|
String? get image;
|
||||||
@override
|
@override
|
||||||
int? get cooking_time;
|
int? get cooking_time;
|
||||||
|
|
||||||
|
/// Create a copy of RecipeModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$RecipeModelImplCopyWith<_$RecipeModelImpl> get copyWith =>
|
_$$RecipeModelImplCopyWith<_$RecipeModelImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,8 +27,12 @@ mixin _$RecipeTagModel {
|
|||||||
@JsonKey(name: "meta")
|
@JsonKey(name: "meta")
|
||||||
Meta get meta => throw _privateConstructorUsedError;
|
Meta get meta => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this RecipeTagModel to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$RecipeTagModelCopyWith<RecipeTagModel> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -58,6 +62,8 @@ class _$RecipeTagModelCopyWithImpl<$Res, $Val extends RecipeTagModel>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of RecipeTagModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -81,6 +87,8 @@ class _$RecipeTagModelCopyWithImpl<$Res, $Val extends RecipeTagModel>
|
|||||||
) as $Val);
|
) as $Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of RecipeTagModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$LinksCopyWith<$Res> get links {
|
$LinksCopyWith<$Res> get links {
|
||||||
@@ -89,6 +97,8 @@ class _$RecipeTagModelCopyWithImpl<$Res, $Val extends RecipeTagModel>
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of RecipeTagModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$MetaCopyWith<$Res> get meta {
|
$MetaCopyWith<$Res> get meta {
|
||||||
@@ -125,6 +135,8 @@ class __$$RecipeTagModelImplCopyWithImpl<$Res>
|
|||||||
_$RecipeTagModelImpl _value, $Res Function(_$RecipeTagModelImpl) _then)
|
_$RecipeTagModelImpl _value, $Res Function(_$RecipeTagModelImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of RecipeTagModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -192,12 +204,14 @@ class _$RecipeTagModelImpl implements _RecipeTagModel {
|
|||||||
(identical(other.meta, meta) || other.meta == meta));
|
(identical(other.meta, meta) || other.meta == meta));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(
|
int get hashCode => Object.hash(
|
||||||
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of RecipeTagModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith =>
|
_$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith =>
|
||||||
@@ -230,8 +244,11 @@ abstract class _RecipeTagModel implements RecipeTagModel {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: "meta")
|
@JsonKey(name: "meta")
|
||||||
Meta get meta;
|
Meta get meta;
|
||||||
|
|
||||||
|
/// Create a copy of RecipeTagModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith =>
|
_$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -253,8 +270,12 @@ mixin _$RecipeTag {
|
|||||||
@JsonKey(name: "updated_at")
|
@JsonKey(name: "updated_at")
|
||||||
DateTime get updatedAt => throw _privateConstructorUsedError;
|
DateTime get updatedAt => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this RecipeTag to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// 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 =>
|
$RecipeTagCopyWith<RecipeTag> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -282,6 +303,8 @@ class _$RecipeTagCopyWithImpl<$Res, $Val extends RecipeTag>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of RecipeTag
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -340,6 +363,8 @@ class __$$RecipeTagImplCopyWithImpl<$Res>
|
|||||||
_$RecipeTagImpl _value, $Res Function(_$RecipeTagImpl) _then)
|
_$RecipeTagImpl _value, $Res Function(_$RecipeTagImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of RecipeTag
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -423,12 +448,14 @@ class _$RecipeTagImpl implements _RecipeTag {
|
|||||||
other.updatedAt == updatedAt));
|
other.updatedAt == updatedAt));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
Object.hash(runtimeType, id, name, recipesCount, createdAt, updatedAt);
|
Object.hash(runtimeType, id, name, recipesCount, createdAt, updatedAt);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of RecipeTag
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$RecipeTagImplCopyWith<_$RecipeTagImpl> get copyWith =>
|
_$$RecipeTagImplCopyWith<_$RecipeTagImpl> get copyWith =>
|
||||||
@@ -469,8 +496,11 @@ abstract class _RecipeTag implements RecipeTag {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: "updated_at")
|
@JsonKey(name: "updated_at")
|
||||||
DateTime get updatedAt;
|
DateTime get updatedAt;
|
||||||
|
|
||||||
|
/// Create a copy of RecipeTag
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$RecipeTagImplCopyWith<_$RecipeTagImpl> get copyWith =>
|
_$$RecipeTagImplCopyWith<_$RecipeTagImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,8 +23,12 @@ mixin _$Step {
|
|||||||
String? get image => throw _privateConstructorUsedError;
|
String? get image => throw _privateConstructorUsedError;
|
||||||
String? get description => throw _privateConstructorUsedError;
|
String? get description => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this Step to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of Step
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
$StepCopyWith<Step> get copyWith => throw _privateConstructorUsedError;
|
$StepCopyWith<Step> get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,6 +50,8 @@ class _$StepCopyWithImpl<$Res, $Val extends Step>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of Step
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -82,6 +88,8 @@ class __$$StepImplCopyWithImpl<$Res>
|
|||||||
__$$StepImplCopyWithImpl(_$StepImpl _value, $Res Function(_$StepImpl) _then)
|
__$$StepImplCopyWithImpl(_$StepImpl _value, $Res Function(_$StepImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of Step
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -129,11 +137,13 @@ class _$StepImpl implements _Step {
|
|||||||
other.description == description));
|
other.description == description));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, image, description);
|
int get hashCode => Object.hash(runtimeType, image, description);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of Step
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
|
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
|
||||||
@@ -157,8 +167,11 @@ abstract class _Step implements Step {
|
|||||||
String? get image;
|
String? get image;
|
||||||
@override
|
@override
|
||||||
String? get description;
|
String? get description;
|
||||||
|
|
||||||
|
/// Create a copy of Step
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
|
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,6 +147,9 @@ class _$RecipeCreateStateCopyWithImpl<$Res, $Val extends RecipeCreateState>
|
|||||||
final $Val _value;
|
final $Val _value;
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of RecipeCreateState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -163,6 +166,9 @@ class __$$RecipeCreateStateImplCopyWithImpl<$Res>
|
|||||||
__$$RecipeCreateStateImplCopyWithImpl(_$RecipeCreateStateImpl _value,
|
__$$RecipeCreateStateImplCopyWithImpl(_$RecipeCreateStateImpl _value,
|
||||||
$Res Function(_$RecipeCreateStateImpl) _then)
|
$Res Function(_$RecipeCreateStateImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of RecipeCreateState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -343,6 +349,9 @@ class __$$RecipeCreateStateLoadingImplCopyWithImpl<$Res>
|
|||||||
_$RecipeCreateStateLoadingImpl _value,
|
_$RecipeCreateStateLoadingImpl _value,
|
||||||
$Res Function(_$RecipeCreateStateLoadingImpl) _then)
|
$Res Function(_$RecipeCreateStateLoadingImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of RecipeCreateState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -551,6 +560,8 @@ class __$$RecipeCreateStateLoadedImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$RecipeCreateStateLoadedImpl) _then)
|
$Res Function(_$RecipeCreateStateLoadedImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of RecipeCreateState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -659,6 +670,8 @@ class __$$RecipeCreateStateLoadedImplCopyWithImpl<$Res>
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of RecipeCreateState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$RecipeModelCopyWith<$Res>? get recipe {
|
$RecipeModelCopyWith<$Res>? get recipe {
|
||||||
@@ -671,6 +684,8 @@ class __$$RecipeCreateStateLoadedImplCopyWithImpl<$Res>
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of RecipeCreateState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$SelectionPopupModelCopyWith<$Res> get selectedType {
|
$SelectionPopupModelCopyWith<$Res> get selectedType {
|
||||||
@@ -679,6 +694,8 @@ class __$$RecipeCreateStateLoadedImplCopyWithImpl<$Res>
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of RecipeCreateState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$SelectionPopupModelCopyWith<$Res> get selectedCookingTime {
|
$SelectionPopupModelCopyWith<$Res> get selectedCookingTime {
|
||||||
@@ -688,6 +705,8 @@ class __$$RecipeCreateStateLoadedImplCopyWithImpl<$Res>
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of RecipeCreateState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$SelectionPopupModelCopyWith<$Res> get selectedStatus {
|
$SelectionPopupModelCopyWith<$Res> get selectedStatus {
|
||||||
@@ -887,7 +906,9 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded {
|
|||||||
selectedStatus
|
selectedStatus
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of RecipeCreateState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$RecipeCreateStateLoadedImplCopyWith<_$RecipeCreateStateLoadedImpl>
|
_$$RecipeCreateStateLoadedImplCopyWith<_$RecipeCreateStateLoadedImpl>
|
||||||
@@ -1136,7 +1157,10 @@ abstract class RecipeCreateStateLoaded implements RecipeCreateState {
|
|||||||
SelectionPopupModel get selectedType;
|
SelectionPopupModel get selectedType;
|
||||||
SelectionPopupModel get selectedCookingTime;
|
SelectionPopupModel get selectedCookingTime;
|
||||||
SelectionPopupModel get selectedStatus;
|
SelectionPopupModel get selectedStatus;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of RecipeCreateState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$RecipeCreateStateLoadedImplCopyWith<_$RecipeCreateStateLoadedImpl>
|
_$$RecipeCreateStateLoadedImplCopyWith<_$RecipeCreateStateLoadedImpl>
|
||||||
get copyWith => throw _privateConstructorUsedError;
|
get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -1160,6 +1184,8 @@ class __$$RecipeCreateStateErrorImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$RecipeCreateStateErrorImpl) _then)
|
$Res Function(_$RecipeCreateStateErrorImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of RecipeCreateState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -1199,7 +1225,9 @@ class _$RecipeCreateStateErrorImpl implements RecipeCreateStateError {
|
|||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, errorMessage);
|
int get hashCode => Object.hash(runtimeType, errorMessage);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of RecipeCreateState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$RecipeCreateStateErrorImplCopyWith<_$RecipeCreateStateErrorImpl>
|
_$$RecipeCreateStateErrorImplCopyWith<_$RecipeCreateStateErrorImpl>
|
||||||
@@ -1349,7 +1377,10 @@ abstract class RecipeCreateStateError implements RecipeCreateState {
|
|||||||
_$RecipeCreateStateErrorImpl;
|
_$RecipeCreateStateErrorImpl;
|
||||||
|
|
||||||
String get errorMessage;
|
String get errorMessage;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of RecipeCreateState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$RecipeCreateStateErrorImplCopyWith<_$RecipeCreateStateErrorImpl>
|
_$$RecipeCreateStateErrorImplCopyWith<_$RecipeCreateStateErrorImpl>
|
||||||
get copyWith => throw _privateConstructorUsedError;
|
get copyWith => throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import 'package:eatvio_app/features/feed/presentation/bloc/comments_cubit/commen
|
|||||||
import 'package:eatvio_app/features/feed/presentation/bloc/comments_cubit/comments_state.dart';
|
import 'package:eatvio_app/features/feed/presentation/bloc/comments_cubit/comments_state.dart';
|
||||||
import 'package:eatvio_app/features/feed/presentation/widgets/comments_widget.dart';
|
import 'package:eatvio_app/features/feed/presentation/widgets/comments_widget.dart';
|
||||||
import 'package:eatvio_app/locator_service.dart';
|
import 'package:eatvio_app/locator_service.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
|
|
||||||
@@ -345,7 +344,7 @@ class _AboutRecipesScreenState extends State<AboutRecipesScreen> {
|
|||||||
if (state is CommentsStateLoading)
|
if (state is CommentsStateLoading)
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(32),
|
padding: const EdgeInsets.all(32),
|
||||||
child: CupertinoActivityIndicator(),
|
child: CircularProgressIndicator(),
|
||||||
),
|
),
|
||||||
if (state is CommentsStateLoaded)
|
if (state is CommentsStateLoaded)
|
||||||
CommentsWidget(
|
CommentsWidget(
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import 'package:eatvio_app/features/recipes/presentation/bloc/recipe_create_stat
|
|||||||
import 'package:eatvio_app/widgets/custom_drop_down.dart';
|
import 'package:eatvio_app/widgets/custom_drop_down.dart';
|
||||||
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
|
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:image_picker/image_picker.dart';
|
import 'package:image_picker/image_picker.dart';
|
||||||
|
|
||||||
@@ -26,7 +25,7 @@ class RecipeCreateScreen extends StatelessWidget {
|
|||||||
} else if (state is RecipeCreateStateLoading) {
|
} else if (state is RecipeCreateStateLoading) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Center(
|
body: Center(
|
||||||
child: CupertinoActivityIndicator(),
|
child: CircularProgressIndicator(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else if (state is RecipeCreateStateError) {
|
} else if (state is RecipeCreateStateError) {
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import 'package:eatvio_app/features/recipes/presentation/bloc/recipe_create_stat
|
|||||||
import 'package:eatvio_app/widgets/custom_drop_down.dart';
|
import 'package:eatvio_app/widgets/custom_drop_down.dart';
|
||||||
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
|
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:image_picker/image_picker.dart';
|
import 'package:image_picker/image_picker.dart';
|
||||||
|
|
||||||
@@ -30,7 +29,7 @@ class RecipeEditScreen extends StatelessWidget {
|
|||||||
} else if (state is RecipeCreateStateLoading) {
|
} else if (state is RecipeCreateStateLoading) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Center(
|
body: Center(
|
||||||
child: CupertinoActivityIndicator(),
|
child: CircularProgressIndicator(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else if (state is RecipeCreateStateError) {
|
} else if (state is RecipeCreateStateError) {
|
||||||
|
|||||||
@@ -24,8 +24,12 @@ mixin _$LocationModel {
|
|||||||
@JsonKey(name: 'response_body')
|
@JsonKey(name: 'response_body')
|
||||||
String get responseBody => throw _privateConstructorUsedError;
|
String get responseBody => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this LocationModel to a JSON map.
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
@JsonKey(ignore: true)
|
|
||||||
|
/// Create a copy of LocationModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
$LocationModelCopyWith<LocationModel> get copyWith =>
|
$LocationModelCopyWith<LocationModel> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -51,6 +55,8 @@ class _$LocationModelCopyWithImpl<$Res, $Val extends LocationModel>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of LocationModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -91,6 +97,8 @@ class __$$LocationModelImplCopyWithImpl<$Res>
|
|||||||
_$LocationModelImpl _value, $Res Function(_$LocationModelImpl) _then)
|
_$LocationModelImpl _value, $Res Function(_$LocationModelImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of LocationModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -149,12 +157,14 @@ class _$LocationModelImpl implements _LocationModel {
|
|||||||
other.responseBody == responseBody));
|
other.responseBody == responseBody));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,
|
int get hashCode => Object.hash(runtimeType,
|
||||||
const DeepCollectionEquality().hash(_locations), responseBody);
|
const DeepCollectionEquality().hash(_locations), responseBody);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of LocationModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$LocationModelImplCopyWith<_$LocationModelImpl> get copyWith =>
|
_$$LocationModelImplCopyWith<_$LocationModelImpl> get copyWith =>
|
||||||
@@ -182,8 +192,11 @@ abstract class _LocationModel implements LocationModel {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: 'response_body')
|
@JsonKey(name: 'response_body')
|
||||||
String get responseBody;
|
String get responseBody;
|
||||||
|
|
||||||
|
/// Create a copy of LocationModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$LocationModelImplCopyWith<_$LocationModelImpl> get copyWith =>
|
_$$LocationModelImplCopyWith<_$LocationModelImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,9 @@ final _privateConstructorUsedError = UnsupportedError(
|
|||||||
mixin _$RegistrationState {
|
mixin _$RegistrationState {
|
||||||
UserRegistrationSheet get sheet => throw _privateConstructorUsedError;
|
UserRegistrationSheet get sheet => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of RegistrationState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
$RegistrationStateCopyWith<RegistrationState> get copyWith =>
|
$RegistrationStateCopyWith<RegistrationState> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
@@ -44,6 +46,8 @@ class _$RegistrationStateCopyWithImpl<$Res, $Val extends RegistrationState>
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final $Res Function($Val) _then;
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of RegistrationState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -57,6 +61,8 @@ class _$RegistrationStateCopyWithImpl<$Res, $Val extends RegistrationState>
|
|||||||
) as $Val);
|
) as $Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a copy of RegistrationState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$UserRegistrationSheetCopyWith<$Res> get sheet {
|
$UserRegistrationSheetCopyWith<$Res> get sheet {
|
||||||
@@ -88,6 +94,8 @@ class __$$RegistrationStateImplCopyWithImpl<$Res>
|
|||||||
$Res Function(_$RegistrationStateImpl) _then)
|
$Res Function(_$RegistrationStateImpl) _then)
|
||||||
: super(_value, _then);
|
: super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of RegistrationState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
@@ -126,7 +134,9 @@ class _$RegistrationStateImpl implements _RegistrationState {
|
|||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, sheet);
|
int get hashCode => Object.hash(runtimeType, sheet);
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
/// Create a copy of RegistrationState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$$RegistrationStateImplCopyWith<_$RegistrationStateImpl> get copyWith =>
|
_$$RegistrationStateImplCopyWith<_$RegistrationStateImpl> get copyWith =>
|
||||||
@@ -140,8 +150,11 @@ abstract class _RegistrationState implements RegistrationState {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
UserRegistrationSheet get sheet;
|
UserRegistrationSheet get sheet;
|
||||||
|
|
||||||
|
/// Create a copy of RegistrationState
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
_$$RegistrationStateImplCopyWith<_$RegistrationStateImpl> get copyWith =>
|
_$$RegistrationStateImplCopyWith<_$RegistrationStateImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import 'package:eatvio_app/core/app_export.dart';
|
|||||||
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
|
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
|
||||||
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
|
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
|
||||||
import 'package:eatvio_app/widgets/custom_edit_text_form_field.dart';
|
import 'package:eatvio_app/widgets/custom_edit_text_form_field.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_typeahead/flutter_typeahead.dart';
|
import 'package:flutter_typeahead/flutter_typeahead.dart';
|
||||||
import 'package:location/location.dart';
|
import 'package:location/location.dart';
|
||||||
@@ -152,7 +151,7 @@ class _CityOfLivingScreenState extends State<CityOfLivingScreen> {
|
|||||||
Icons.near_me_rounded,
|
Icons.near_me_rounded,
|
||||||
color: appTheme.blueA400,
|
color: appTheme.blueA400,
|
||||||
)
|
)
|
||||||
: CupertinoActivityIndicator(),
|
: CircularProgressIndicator(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/new_
|
|||||||
import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_cubit.dart';
|
import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_cubit.dart';
|
||||||
import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_cubit.dart';
|
import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_cubit.dart';
|
||||||
import 'package:eatvio_app/features/calendar/presentation/bloc/calendar_cubit.dart';
|
import 'package:eatvio_app/features/calendar/presentation/bloc/calendar_cubit.dart';
|
||||||
import 'package:eatvio_app/features/chat/presentation/bloc/chat_select_cubit/chat_select_cubit.dart';
|
|
||||||
import 'package:eatvio_app/features/diary/presentation/bloc/diary_bloc.dart';
|
import 'package:eatvio_app/features/diary/presentation/bloc/diary_bloc.dart';
|
||||||
import 'package:eatvio_app/features/feed/presentation/bloc/diets_cubit/diets_cubit.dart';
|
import 'package:eatvio_app/features/feed/presentation/bloc/diets_cubit/diets_cubit.dart';
|
||||||
import 'package:eatvio_app/features/feed/presentation/bloc/feed_cubit/feed_cubit.dart';
|
import 'package:eatvio_app/features/feed/presentation/bloc/feed_cubit/feed_cubit.dart';
|
||||||
@@ -15,23 +14,15 @@ import 'package:eatvio_app/locator_service.dart';
|
|||||||
import 'package:eatvio_app/old/profile/my_profile_screen/bloc/my_profile_bloc.dart';
|
import 'package:eatvio_app/old/profile/my_profile_screen/bloc/my_profile_bloc.dart';
|
||||||
import 'package:eatvio_app/old/profile/my_profile_screen/models/my_profile_model.dart';
|
import 'package:eatvio_app/old/profile/my_profile_screen/models/my_profile_model.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
import 'package:intl/date_symbol_data_local.dart';
|
|
||||||
import 'package:keyboard_dismisser/keyboard_dismisser.dart';
|
import 'package:keyboard_dismisser/keyboard_dismisser.dart';
|
||||||
import 'core/app_export.dart';
|
import 'core/app_export.dart';
|
||||||
|
|
||||||
var globalMessengerKey = GlobalKey<ScaffoldMessengerState>();
|
var globalMessengerKey = GlobalKey<ScaffoldMessengerState>();
|
||||||
|
Future<void> main() async {
|
||||||
void main() async {
|
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
await di.init();
|
await di.init();
|
||||||
SystemChrome.setPreferredOrientations([
|
runApp(MyApp());
|
||||||
DeviceOrientation.landscapeLeft,
|
|
||||||
DeviceOrientation.landscapeRight,
|
|
||||||
DeviceOrientation.portraitUp,
|
|
||||||
]);
|
|
||||||
initializeDateFormatting().then((_) => runApp(MyApp()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
@@ -48,17 +39,13 @@ class MyApp extends StatelessWidget {
|
|||||||
BlocProvider<DietsCubit>(create: (context) => sl<DietsCubit>()..loadDiets()),
|
BlocProvider<DietsCubit>(create: (context) => sl<DietsCubit>()..loadDiets()),
|
||||||
BlocProvider<MyProfileBloc>(create: (context) => MyProfileBloc(MyProfileState(myProfileModelObj: MyProfileModel()))..add(MyProfileInitialEvent())),
|
BlocProvider<MyProfileBloc>(create: (context) => MyProfileBloc(MyProfileState(myProfileModelObj: MyProfileModel()))..add(MyProfileInitialEvent())),
|
||||||
BlocProvider<DiaryBloc>(create: (context) => sl<DiaryBloc>()..add(LoadDiary())),
|
BlocProvider<DiaryBloc>(create: (context) => sl<DiaryBloc>()..add(LoadDiary())),
|
||||||
BlocProvider<ChatSelectCubit>(create: (context) => sl<ChatSelectCubit>()..getChatRooms()),
|
|
||||||
BlocProvider<CalendarCubit>(create: (context) => sl<CalendarCubit>()..loadCalendarList()),
|
BlocProvider<CalendarCubit>(create: (context) => sl<CalendarCubit>()..loadCalendarList()),
|
||||||
BlocProvider<RecipeCreateCubit>(create: (context) => sl<RecipeCreateCubit>()..loadRecipeCreate()),
|
BlocProvider<RecipeCreateCubit>(create: (context) => sl<RecipeCreateCubit>()..loadRecipeCreate()),
|
||||||
],
|
],
|
||||||
child: KeyboardDismisser(
|
child: KeyboardDismisser(
|
||||||
gestures: [
|
|
||||||
GestureType.onTap,
|
|
||||||
GestureType.onPanUpdateDownDirection,
|
|
||||||
],
|
|
||||||
child: MaterialApp.router(
|
child: MaterialApp.router(
|
||||||
theme: theme,
|
theme: theme,
|
||||||
|
themeMode: ThemeMode.light,
|
||||||
routerConfig: AppRouter.appRouter,
|
routerConfig: AppRouter.appRouter,
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
localizationsDelegates: [
|
localizationsDelegates: [
|
||||||
|
|||||||
Reference in New Issue
Block a user