diff --git a/lib/core/initialization_cubit/initialization_state.freezed.dart b/lib/core/initialization_cubit/initialization_state.freezed.dart
index 3364e440..b0535c68 100644
--- a/lib/core/initialization_cubit/initialization_state.freezed.dart
+++ b/lib/core/initialization_cubit/initialization_state.freezed.dart
@@ -84,6 +84,9 @@ class _$InitializationStateCopyWithImpl<$Res, $Val extends InitializationState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
+
+ /// Create a copy of InitializationState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -100,6 +103,9 @@ class __$$InitializationStateImplCopyWithImpl<$Res>
__$$InitializationStateImplCopyWithImpl(_$InitializationStateImpl _value,
$Res Function(_$InitializationStateImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of InitializationState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -218,6 +224,9 @@ class __$$InitializationStateLoadingImplCopyWithImpl<$Res>
_$InitializationStateLoadingImpl _value,
$Res Function(_$InitializationStateLoadingImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of InitializationState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -339,6 +348,8 @@ class __$$InitializationStateSuccessImplCopyWithImpl<$Res>
$Res Function(_$InitializationStateSuccessImpl) _then)
: super(_value, _then);
+ /// Create a copy of InitializationState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -377,7 +388,9 @@ class _$InitializationStateSuccessImpl implements InitializationStateSuccess {
@override
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
@pragma('vm:prefer-inline')
_$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl>
@@ -465,7 +478,10 @@ abstract class InitializationStateSuccess implements InitializationState {
_$InitializationStateSuccessImpl;
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>
get copyWith => throw _privateConstructorUsedError;
}
@@ -490,6 +506,8 @@ class __$$InitializationStateErrorImplCopyWithImpl<$Res>
$Res Function(_$InitializationStateErrorImpl) _then)
: super(_value, _then);
+ /// Create a copy of InitializationState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -529,7 +547,9 @@ class _$InitializationStateErrorImpl implements InitializationStateError {
@override
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
@pragma('vm:prefer-inline')
_$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl>
@@ -616,7 +636,10 @@ abstract class InitializationStateError implements InitializationState {
_$InitializationStateErrorImpl;
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>
get copyWith => throw _privateConstructorUsedError;
}
diff --git a/lib/core/models/base_models.dart b/lib/core/models/base_models.dart
index 2293cb9f..1f6e04d5 100644
--- a/lib/core/models/base_models.dart
+++ b/lib/core/models/base_models.dart
@@ -22,7 +22,7 @@ class Meta with _$Meta {
@JsonKey(name: "from") required dynamic from,
@JsonKey(name: "last_page") required int lastPage,
@JsonKey(name: "links") required List links,
- @JsonKey(name: "path") required String path,
+ @JsonKey(name: "path") String? path,
@JsonKey(name: "per_page") required int perPage,
@JsonKey(name: "to") required dynamic to,
@JsonKey(name: "total") required int total,
@@ -34,9 +34,9 @@ class Meta with _$Meta {
@freezed
class Link with _$Link {
const factory Link({
- @JsonKey(name: "url") required String? url,
- @JsonKey(name: "label") required String label,
- @JsonKey(name: "active") required bool active,
+ @JsonKey(name: "url") String? url,
+ @JsonKey(name: "label") String? label,
+ @JsonKey(name: "active") bool? active,
}) = _Link;
factory Link.fromJson(Map json) => _$LinkFromJson(json);
diff --git a/lib/core/models/base_models.freezed.dart b/lib/core/models/base_models.freezed.dart
index 6571812b..8abf29f4 100644
--- a/lib/core/models/base_models.freezed.dart
+++ b/lib/core/models/base_models.freezed.dart
@@ -29,8 +29,12 @@ mixin _$Links {
@JsonKey(name: "next")
dynamic get next => throw _privateConstructorUsedError;
+ /// Serializes this Links to a JSON map.
Map 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 get copyWith => throw _privateConstructorUsedError;
}
@@ -56,6 +60,8 @@ class _$LinksCopyWithImpl<$Res, $Val extends Links>
// ignore: unused_field
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')
@override
$Res call({
@@ -107,6 +113,8 @@ class __$$LinksImplCopyWithImpl<$Res>
_$LinksImpl _value, $Res Function(_$LinksImpl) _then)
: super(_value, _then);
+ /// Create a copy of Links
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -177,7 +185,7 @@ class _$LinksImpl implements _Links {
const DeepCollectionEquality().equals(other.next, next));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
@@ -186,7 +194,9 @@ class _$LinksImpl implements _Links {
const DeepCollectionEquality().hash(prev),
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
@pragma('vm:prefer-inline')
_$$LinksImplCopyWith<_$LinksImpl> get copyWith =>
@@ -221,8 +231,11 @@ abstract class _Links implements Links {
@override
@JsonKey(name: "next")
dynamic get next;
+
+ /// Create a copy of Links
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$LinksImplCopyWith<_$LinksImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -242,7 +255,7 @@ mixin _$Meta {
@JsonKey(name: "links")
List get links => throw _privateConstructorUsedError;
@JsonKey(name: "path")
- String get path => throw _privateConstructorUsedError;
+ String? get path => throw _privateConstructorUsedError;
@JsonKey(name: "per_page")
int get perPage => throw _privateConstructorUsedError;
@JsonKey(name: "to")
@@ -250,8 +263,12 @@ mixin _$Meta {
@JsonKey(name: "total")
int get total => throw _privateConstructorUsedError;
+ /// Serializes this Meta to a JSON map.
Map 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 get copyWith => throw _privateConstructorUsedError;
}
@@ -265,7 +282,7 @@ abstract class $MetaCopyWith<$Res> {
@JsonKey(name: "from") dynamic from,
@JsonKey(name: "last_page") int lastPage,
@JsonKey(name: "links") List links,
- @JsonKey(name: "path") String path,
+ @JsonKey(name: "path") String? path,
@JsonKey(name: "per_page") int perPage,
@JsonKey(name: "to") dynamic to,
@JsonKey(name: "total") int total});
@@ -281,6 +298,8 @@ class _$MetaCopyWithImpl<$Res, $Val extends Meta>
// ignore: unused_field
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')
@override
$Res call({
@@ -288,7 +307,7 @@ class _$MetaCopyWithImpl<$Res, $Val extends Meta>
Object? from = freezed,
Object? lastPage = null,
Object? links = null,
- Object? path = null,
+ Object? path = freezed,
Object? perPage = null,
Object? to = freezed,
Object? total = null,
@@ -310,10 +329,10 @@ class _$MetaCopyWithImpl<$Res, $Val extends Meta>
? _value.links
: links // ignore: cast_nullable_to_non_nullable
as List,
- path: null == path
+ path: freezed == path
? _value.path
: path // ignore: cast_nullable_to_non_nullable
- as String,
+ as String?,
perPage: null == perPage
? _value.perPage
: 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: "last_page") int lastPage,
@JsonKey(name: "links") List links,
- @JsonKey(name: "path") String path,
+ @JsonKey(name: "path") String? path,
@JsonKey(name: "per_page") int perPage,
@JsonKey(name: "to") dynamic to,
@JsonKey(name: "total") int total});
@@ -355,6 +374,8 @@ class __$$MetaImplCopyWithImpl<$Res>
__$$MetaImplCopyWithImpl(_$MetaImpl _value, $Res Function(_$MetaImpl) _then)
: super(_value, _then);
+ /// Create a copy of Meta
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -362,7 +383,7 @@ class __$$MetaImplCopyWithImpl<$Res>
Object? from = freezed,
Object? lastPage = null,
Object? links = null,
- Object? path = null,
+ Object? path = freezed,
Object? perPage = null,
Object? to = freezed,
Object? total = null,
@@ -384,10 +405,10 @@ class __$$MetaImplCopyWithImpl<$Res>
? _value._links
: links // ignore: cast_nullable_to_non_nullable
as List,
- path: null == path
+ path: freezed == path
? _value.path
: path // ignore: cast_nullable_to_non_nullable
- as String,
+ as String?,
perPage: null == perPage
? _value.perPage
: perPage // ignore: cast_nullable_to_non_nullable
@@ -412,7 +433,7 @@ class _$MetaImpl implements _Meta {
@JsonKey(name: "from") required this.from,
@JsonKey(name: "last_page") required this.lastPage,
@JsonKey(name: "links") required final List links,
- @JsonKey(name: "path") required this.path,
+ @JsonKey(name: "path") this.path,
@JsonKey(name: "per_page") required this.perPage,
@JsonKey(name: "to") required this.to,
@JsonKey(name: "total") required this.total})
@@ -441,7 +462,7 @@ class _$MetaImpl implements _Meta {
@override
@JsonKey(name: "path")
- final String path;
+ final String? path;
@override
@JsonKey(name: "per_page")
final int perPage;
@@ -474,7 +495,7 @@ class _$MetaImpl implements _Meta {
(identical(other.total, total) || other.total == total));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
@@ -487,7 +508,9 @@ class _$MetaImpl implements _Meta {
const DeepCollectionEquality().hash(to),
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
@pragma('vm:prefer-inline')
_$$MetaImplCopyWith<_$MetaImpl> get copyWith =>
@@ -507,7 +530,7 @@ abstract class _Meta implements Meta {
@JsonKey(name: "from") required final dynamic from,
@JsonKey(name: "last_page") required final int lastPage,
@JsonKey(name: "links") required final List links,
- @JsonKey(name: "path") required final String path,
+ @JsonKey(name: "path") final String? path,
@JsonKey(name: "per_page") required final int perPage,
@JsonKey(name: "to") required final dynamic to,
@JsonKey(name: "total") required final int total}) = _$MetaImpl;
@@ -528,7 +551,7 @@ abstract class _Meta implements Meta {
List get links;
@override
@JsonKey(name: "path")
- String get path;
+ String? get path;
@override
@JsonKey(name: "per_page")
int get perPage;
@@ -538,8 +561,11 @@ abstract class _Meta implements Meta {
@override
@JsonKey(name: "total")
int get total;
+
+ /// Create a copy of Meta
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$MetaImplCopyWith<_$MetaImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -553,12 +579,16 @@ mixin _$Link {
@JsonKey(name: "url")
String? get url => throw _privateConstructorUsedError;
@JsonKey(name: "label")
- String get label => throw _privateConstructorUsedError;
+ String? get label => throw _privateConstructorUsedError;
@JsonKey(name: "active")
- bool get active => throw _privateConstructorUsedError;
+ bool? get active => throw _privateConstructorUsedError;
+ /// Serializes this Link to a JSON map.
Map 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 get copyWith => throw _privateConstructorUsedError;
}
@@ -569,8 +599,8 @@ abstract class $LinkCopyWith<$Res> {
@useResult
$Res call(
{@JsonKey(name: "url") String? url,
- @JsonKey(name: "label") String label,
- @JsonKey(name: "active") bool active});
+ @JsonKey(name: "label") String? label,
+ @JsonKey(name: "active") bool? active});
}
/// @nodoc
@@ -583,26 +613,28 @@ class _$LinkCopyWithImpl<$Res, $Val extends Link>
// ignore: unused_field
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')
@override
$Res call({
Object? url = freezed,
- Object? label = null,
- Object? active = null,
+ Object? label = freezed,
+ Object? active = freezed,
}) {
return _then(_value.copyWith(
url: freezed == url
? _value.url
: url // ignore: cast_nullable_to_non_nullable
as String?,
- label: null == label
+ label: freezed == label
? _value.label
: label // ignore: cast_nullable_to_non_nullable
- as String,
- active: null == active
+ as String?,
+ active: freezed == active
? _value.active
: active // ignore: cast_nullable_to_non_nullable
- as bool,
+ as bool?,
) as $Val);
}
}
@@ -616,8 +648,8 @@ abstract class _$$LinkImplCopyWith<$Res> implements $LinkCopyWith<$Res> {
@useResult
$Res call(
{@JsonKey(name: "url") String? url,
- @JsonKey(name: "label") String label,
- @JsonKey(name: "active") bool active});
+ @JsonKey(name: "label") String? label,
+ @JsonKey(name: "active") bool? active});
}
/// @nodoc
@@ -627,26 +659,28 @@ class __$$LinkImplCopyWithImpl<$Res>
__$$LinkImplCopyWithImpl(_$LinkImpl _value, $Res Function(_$LinkImpl) _then)
: super(_value, _then);
+ /// Create a copy of Link
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? url = freezed,
- Object? label = null,
- Object? active = null,
+ Object? label = freezed,
+ Object? active = freezed,
}) {
return _then(_$LinkImpl(
url: freezed == url
? _value.url
: url // ignore: cast_nullable_to_non_nullable
as String?,
- label: null == label
+ label: freezed == label
? _value.label
: label // ignore: cast_nullable_to_non_nullable
- as String,
- active: null == active
+ as String?,
+ active: freezed == active
? _value.active
: active // ignore: cast_nullable_to_non_nullable
- as bool,
+ as bool?,
));
}
}
@@ -655,9 +689,9 @@ class __$$LinkImplCopyWithImpl<$Res>
@JsonSerializable()
class _$LinkImpl implements _Link {
const _$LinkImpl(
- {@JsonKey(name: "url") required this.url,
- @JsonKey(name: "label") required this.label,
- @JsonKey(name: "active") required this.active});
+ {@JsonKey(name: "url") this.url,
+ @JsonKey(name: "label") this.label,
+ @JsonKey(name: "active") this.active});
factory _$LinkImpl.fromJson(Map json) =>
_$$LinkImplFromJson(json);
@@ -667,10 +701,10 @@ class _$LinkImpl implements _Link {
final String? url;
@override
@JsonKey(name: "label")
- final String label;
+ final String? label;
@override
@JsonKey(name: "active")
- final bool active;
+ final bool? active;
@override
String toString() {
@@ -687,11 +721,13 @@ class _$LinkImpl implements _Link {
(identical(other.active, active) || other.active == active));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
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
@pragma('vm:prefer-inline')
_$$LinkImplCopyWith<_$LinkImpl> get copyWith =>
@@ -707,9 +743,9 @@ class _$LinkImpl implements _Link {
abstract class _Link implements Link {
const factory _Link(
- {@JsonKey(name: "url") required final String? url,
- @JsonKey(name: "label") required final String label,
- @JsonKey(name: "active") required final bool active}) = _$LinkImpl;
+ {@JsonKey(name: "url") final String? url,
+ @JsonKey(name: "label") final String? label,
+ @JsonKey(name: "active") final bool? active}) = _$LinkImpl;
factory _Link.fromJson(Map json) = _$LinkImpl.fromJson;
@@ -718,12 +754,15 @@ abstract class _Link implements Link {
String? get url;
@override
@JsonKey(name: "label")
- String get label;
+ String? get label;
@override
@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
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$LinkImplCopyWith<_$LinkImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/core/models/base_models.g.dart b/lib/core/models/base_models.g.dart
index 3c061e32..ada8e71f 100644
--- a/lib/core/models/base_models.g.dart
+++ b/lib/core/models/base_models.g.dart
@@ -28,7 +28,7 @@ _$MetaImpl _$$MetaImplFromJson(Map json) => _$MetaImpl(
links: (json['links'] as List)
.map((e) => Link.fromJson(e as Map))
.toList(),
- path: json['path'] as String,
+ path: json['path'] as String?,
perPage: (json['per_page'] as num).toInt(),
to: json['to'],
total: (json['total'] as num).toInt(),
@@ -48,8 +48,8 @@ Map _$$MetaImplToJson(_$MetaImpl instance) =>
_$LinkImpl _$$LinkImplFromJson(Map json) => _$LinkImpl(
url: json['url'] as String?,
- label: json['label'] as String,
- active: json['active'] as bool,
+ label: json['label'] as String?,
+ active: json['active'] as bool?,
);
Map _$$LinkImplToJson(_$LinkImpl instance) =>
diff --git a/lib/data/models/selectionPopupModel/selection_popup_model.freezed.dart b/lib/data/models/selectionPopupModel/selection_popup_model.freezed.dart
index 917785c7..97ab368c 100644
--- a/lib/data/models/selectionPopupModel/selection_popup_model.freezed.dart
+++ b/lib/data/models/selectionPopupModel/selection_popup_model.freezed.dart
@@ -21,7 +21,9 @@ mixin _$SelectionPopupModel {
dynamic get value => 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -45,6 +47,8 @@ class _$SelectionPopupModelCopyWithImpl<$Res, $Val extends SelectionPopupModel>
// ignore: unused_field
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')
@override
$Res call({
@@ -93,6 +97,8 @@ class __$$SelectionPopupModelImplCopyWithImpl<$Res>
$Res Function(_$SelectionPopupModelImpl) _then)
: super(_value, _then);
+ /// Create a copy of SelectionPopupModel
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -159,7 +165,9 @@ class _$SelectionPopupModelImpl implements _SelectionPopupModel {
int get hashCode => Object.hash(runtimeType, id, title,
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
@pragma('vm:prefer-inline')
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith =>
@@ -182,8 +190,11 @@ abstract class _SelectionPopupModel implements SelectionPopupModel {
dynamic get value;
@override
bool get isSelected;
+
+ /// Create a copy of SelectionPopupModel
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/data/models/userRegistrationModel/user_registration_model.freezed.dart b/lib/data/models/userRegistrationModel/user_registration_model.freezed.dart
index 4a15327c..fd835a26 100644
--- a/lib/data/models/userRegistrationModel/user_registration_model.freezed.dart
+++ b/lib/data/models/userRegistrationModel/user_registration_model.freezed.dart
@@ -68,8 +68,12 @@ mixin _$UserRegistrationSheet {
@JsonKey(name: 'activity_coefficient')
double get activityCoefficient => throw _privateConstructorUsedError;
+ /// Serializes this UserRegistrationSheet to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -121,6 +125,8 @@ class _$UserRegistrationSheetCopyWithImpl<$Res,
// ignore: unused_field
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')
@override
$Res call({
@@ -313,6 +319,8 @@ class __$$UserRegistrationSheetImplCopyWithImpl<$Res>
$Res Function(_$UserRegistrationSheetImpl) _then)
: super(_value, _then);
+ /// Create a copy of UserRegistrationSheet
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -627,7 +635,7 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
other.activityCoefficient == activityCoefficient));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hashAll([
runtimeType,
@@ -660,7 +668,9 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
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
@pragma('vm:prefer-inline')
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl>
@@ -787,8 +797,11 @@ abstract class _UserRegistrationSheet implements UserRegistrationSheet {
@override
@JsonKey(name: 'activity_coefficient')
double get activityCoefficient;
+
+ /// Create a copy of UserRegistrationSheet
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl>
get copyWith => throw _privateConstructorUsedError;
}
diff --git a/lib/features/blog_post/presentation/pages/blog_post_screen.dart b/lib/features/blog_post/presentation/pages/blog_post_screen.dart
index 0c375699..3114518a 100644
--- a/lib/features/blog_post/presentation/pages/blog_post_screen.dart
+++ b/lib/features/blog_post/presentation/pages/blog_post_screen.dart
@@ -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/widgets/comments_widget.dart';
import 'package:eatvio_app/locator_service.dart';
-import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:share_plus/share_plus.dart';
@@ -322,7 +321,7 @@ class _BlogPostScreenState extends State {
if (state is CommentsStateLoading)
Padding(
padding: const EdgeInsets.all(32),
- child: CupertinoActivityIndicator(),
+ child: CircularProgressIndicator(),
),
if (state is CommentsStateLoaded)
CommentsWidget(
diff --git a/lib/features/bottom_navigation_bar/presentation/bloc/new_messages_cubit/new_messages_state.freezed.dart b/lib/features/bottom_navigation_bar/presentation/bloc/new_messages_cubit/new_messages_state.freezed.dart
index 02a1c4bd..7c5d7ffd 100644
--- a/lib/features/bottom_navigation_bar/presentation/bloc/new_messages_cubit/new_messages_state.freezed.dart
+++ b/lib/features/bottom_navigation_bar/presentation/bloc/new_messages_cubit/new_messages_state.freezed.dart
@@ -84,6 +84,9 @@ class _$NewMessagesStateCopyWithImpl<$Res, $Val extends NewMessagesState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
+
+ /// Create a copy of NewMessagesState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -100,6 +103,9 @@ class __$$NewMessagesStateImplCopyWithImpl<$Res>
__$$NewMessagesStateImplCopyWithImpl(_$NewMessagesStateImpl _value,
$Res Function(_$NewMessagesStateImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of NewMessagesState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -215,6 +221,9 @@ class __$$NewMessagesStateEmptyImplCopyWithImpl<$Res>
__$$NewMessagesStateEmptyImplCopyWithImpl(_$NewMessagesStateEmptyImpl _value,
$Res Function(_$NewMessagesStateEmptyImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of NewMessagesState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -335,6 +344,8 @@ class __$$NewMessagesStateLoadedImplCopyWithImpl<$Res>
$Res Function(_$NewMessagesStateLoadedImpl) _then)
: super(_value, _then);
+ /// Create a copy of NewMessagesState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -374,7 +385,9 @@ class _$NewMessagesStateLoadedImpl implements NewMessagesStateLoaded {
@override
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
@pragma('vm:prefer-inline')
_$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl>
@@ -461,7 +474,10 @@ abstract class NewMessagesStateLoaded implements NewMessagesState {
_$NewMessagesStateLoadedImpl;
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>
get copyWith => throw _privateConstructorUsedError;
}
@@ -484,6 +500,8 @@ class __$$NewMessagesStateErrorImplCopyWithImpl<$Res>
$Res Function(_$NewMessagesStateErrorImpl) _then)
: super(_value, _then);
+ /// Create a copy of NewMessagesState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -523,7 +541,9 @@ class _$NewMessagesStateErrorImpl implements NewMessagesStateError {
@override
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
@pragma('vm:prefer-inline')
_$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl>
@@ -610,7 +630,10 @@ abstract class NewMessagesStateError implements NewMessagesState {
_$NewMessagesStateErrorImpl;
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>
get copyWith => throw _privateConstructorUsedError;
}
diff --git a/lib/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_state.freezed.dart b/lib/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_state.freezed.dart
index 4ba18f06..d634b318 100644
--- a/lib/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_state.freezed.dart
+++ b/lib/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_state.freezed.dart
@@ -88,6 +88,9 @@ class _$NotificationsStateCopyWithImpl<$Res, $Val extends NotificationsState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
+
+ /// Create a copy of NotificationsState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -104,6 +107,9 @@ class __$$NotificationsStateImplCopyWithImpl<$Res>
__$$NotificationsStateImplCopyWithImpl(_$NotificationsStateImpl _value,
$Res Function(_$NotificationsStateImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of NotificationsState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -225,6 +231,9 @@ class __$$NotificationsStateEmptyImplCopyWithImpl<$Res>
_$NotificationsStateEmptyImpl _value,
$Res Function(_$NotificationsStateEmptyImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of NotificationsState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -350,6 +359,8 @@ class __$$NotificationsStateLoadedImplCopyWithImpl<$Res>
$Res Function(_$NotificationsStateLoadedImpl) _then)
: super(_value, _then);
+ /// Create a copy of NotificationsState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -408,7 +419,9 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
int get hashCode => Object.hash(runtimeType,
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
@pragma('vm:prefer-inline')
_$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl>
@@ -501,7 +514,10 @@ abstract class NotificationsStateLoaded implements NotificationsState {
List get notifications;
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>
get copyWith => throw _privateConstructorUsedError;
}
@@ -526,6 +542,8 @@ class __$$NotificationsStateErrorImplCopyWithImpl<$Res>
$Res Function(_$NotificationsStateErrorImpl) _then)
: super(_value, _then);
+ /// Create a copy of NotificationsState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -565,7 +583,9 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
@override
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
@pragma('vm:prefer-inline')
_$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl>
@@ -656,7 +676,10 @@ abstract class NotificationsStateError implements NotificationsState {
_$NotificationsStateErrorImpl;
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>
get copyWith => throw _privateConstructorUsedError;
}
diff --git a/lib/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_state.freezed.dart b/lib/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_state.freezed.dart
index 5d8de7ff..b629d579 100644
--- a/lib/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_state.freezed.dart
+++ b/lib/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_state.freezed.dart
@@ -84,6 +84,9 @@ class _$ProfileAvatarStateCopyWithImpl<$Res, $Val extends ProfileAvatarState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
+
+ /// Create a copy of ProfileAvatarState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -100,6 +103,9 @@ class __$$ProfileAvatarStateImplCopyWithImpl<$Res>
__$$ProfileAvatarStateImplCopyWithImpl(_$ProfileAvatarStateImpl _value,
$Res Function(_$ProfileAvatarStateImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of ProfileAvatarState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -217,6 +223,9 @@ class __$$ProfileAvatarStateLoadingImplCopyWithImpl<$Res>
_$ProfileAvatarStateLoadingImpl _value,
$Res Function(_$ProfileAvatarStateLoadingImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of ProfileAvatarState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -340,6 +349,8 @@ class __$$ProfileAvatarStateLoadedImplCopyWithImpl<$Res>
$Res Function(_$ProfileAvatarStateLoadedImpl) _then)
: super(_value, _then);
+ /// Create a copy of ProfileAvatarState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$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
@pragma('vm:prefer-inline')
$ProfileModelCopyWith<$Res> get profile {
@@ -386,7 +399,9 @@ class _$ProfileAvatarStateLoadedImpl implements ProfileAvatarStateLoaded {
@override
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
@pragma('vm:prefer-inline')
_$$ProfileAvatarStateLoadedImplCopyWith<_$ProfileAvatarStateLoadedImpl>
@@ -473,7 +488,10 @@ abstract class ProfileAvatarStateLoaded implements ProfileAvatarState {
{required final ProfileModel profile}) = _$ProfileAvatarStateLoadedImpl;
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>
get copyWith => throw _privateConstructorUsedError;
}
@@ -498,6 +516,8 @@ class __$$ProfileAvatarStateErrorImplCopyWithImpl<$Res>
$Res Function(_$ProfileAvatarStateErrorImpl) _then)
: super(_value, _then);
+ /// Create a copy of ProfileAvatarState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -537,7 +557,9 @@ class _$ProfileAvatarStateErrorImpl implements ProfileAvatarStateError {
@override
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
@pragma('vm:prefer-inline')
_$$ProfileAvatarStateErrorImplCopyWith<_$ProfileAvatarStateErrorImpl>
@@ -624,7 +646,10 @@ abstract class ProfileAvatarStateError implements ProfileAvatarState {
_$ProfileAvatarStateErrorImpl;
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>
get copyWith => throw _privateConstructorUsedError;
}
diff --git a/lib/features/bottom_navigation_bar/presentation/widgets/bottom_navigation_bar_widget.dart b/lib/features/bottom_navigation_bar/presentation/widgets/bottom_navigation_bar_widget.dart
index a4bd7924..6f730432 100644
--- a/lib/features/bottom_navigation_bar/presentation/widgets/bottom_navigation_bar_widget.dart
+++ b/lib/features/bottom_navigation_bar/presentation/widgets/bottom_navigation_bar_widget.dart
@@ -190,9 +190,9 @@ class _BottomNavigationBarWidgetState extends State {
label: '',
icon: BlocBuilder(
builder: (BuildContext context, ProfileAvatarState state) {
- if (state is ProfileAvatarStateLoaded && state.profile.user.profilePhotoUrl != null) {
+ if (state is ProfileAvatarStateLoaded) {
return CircleAvatar(
- backgroundImage: NetworkImage(state.profile.user.profilePhotoUrl!),
+ backgroundImage: NetworkImage(state.profile.profilePhotoUrl),
radius: 16,
);
}
diff --git a/lib/features/calendar/models/calendar_model.freezed.dart b/lib/features/calendar/models/calendar_model.freezed.dart
index 5e47f848..d10fc8f2 100644
--- a/lib/features/calendar/models/calendar_model.freezed.dart
+++ b/lib/features/calendar/models/calendar_model.freezed.dart
@@ -25,8 +25,12 @@ mixin _$CalendarModel {
throw _privateConstructorUsedError;
Object? get diary => throw _privateConstructorUsedError;
+ /// Serializes this CalendarModel to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -53,6 +57,8 @@ class _$CalendarModelCopyWithImpl<$Res, $Val extends CalendarModel>
// ignore: unused_field
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')
@override
$Res call({
@@ -97,6 +103,8 @@ class __$$CalendarModelImplCopyWithImpl<$Res>
_$CalendarModelImpl _value, $Res Function(_$CalendarModelImpl) _then)
: super(_value, _then);
+ /// Create a copy of CalendarModel
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -157,7 +165,7 @@ class _$CalendarModelImpl implements _CalendarModel {
const DeepCollectionEquality().equals(other.diary, diary));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
@@ -165,7 +173,9 @@ class _$CalendarModelImpl implements _CalendarModel {
is_current_day_included_in_the_chosen_diet_progression,
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
@pragma('vm:prefer-inline')
_$$CalendarModelImplCopyWith<_$CalendarModelImpl> get copyWith =>
@@ -195,8 +205,11 @@ abstract class _CalendarModel implements CalendarModel {
bool get is_current_day_included_in_the_chosen_diet_progression;
@override
Object? get diary;
+
+ /// Create a copy of CalendarModel
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$CalendarModelImplCopyWith<_$CalendarModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/calendar/presentation/bloc/calendar_state.freezed.dart b/lib/features/calendar/presentation/bloc/calendar_state.freezed.dart
index c71d5226..0e7bdbcd 100644
--- a/lib/features/calendar/presentation/bloc/calendar_state.freezed.dart
+++ b/lib/features/calendar/presentation/bloc/calendar_state.freezed.dart
@@ -84,6 +84,9 @@ class _$CalendarStateCopyWithImpl<$Res, $Val extends CalendarState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
+
+ /// Create a copy of CalendarState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -100,6 +103,9 @@ class __$$CalendarStateImplCopyWithImpl<$Res>
__$$CalendarStateImplCopyWithImpl(
_$CalendarStateImpl _value, $Res Function(_$CalendarStateImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of CalendarState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -214,6 +220,9 @@ class __$$CalendarStateLoadingImplCopyWithImpl<$Res>
__$$CalendarStateLoadingImplCopyWithImpl(_$CalendarStateLoadingImpl _value,
$Res Function(_$CalendarStateLoadingImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of CalendarState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -332,6 +341,8 @@ class __$$CalendarStateLoadedImplCopyWithImpl<$Res>
$Res Function(_$CalendarStateLoadedImpl) _then)
: super(_value, _then);
+ /// Create a copy of CalendarState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -379,7 +390,9 @@ class _$CalendarStateLoadedImpl implements CalendarStateLoaded {
int get hashCode => Object.hash(
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
@pragma('vm:prefer-inline')
_$$CalendarStateLoadedImplCopyWith<_$CalendarStateLoadedImpl> get copyWith =>
@@ -467,7 +480,10 @@ abstract class CalendarStateLoaded implements CalendarState {
_$CalendarStateLoadedImpl;
List 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 =>
throw _privateConstructorUsedError;
}
@@ -489,6 +505,8 @@ class __$$CalendarStateErrorImplCopyWithImpl<$Res>
$Res Function(_$CalendarStateErrorImpl) _then)
: super(_value, _then);
+ /// Create a copy of CalendarState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -528,7 +546,9 @@ class _$CalendarStateErrorImpl implements CalendarStateError {
@override
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
@pragma('vm:prefer-inline')
_$$CalendarStateErrorImplCopyWith<_$CalendarStateErrorImpl> get copyWith =>
@@ -615,7 +635,10 @@ abstract class CalendarStateError implements CalendarState {
_$CalendarStateErrorImpl;
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 =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/calendar/presentation/pages/calendar_screen.dart b/lib/features/calendar/presentation/pages/calendar_screen.dart
index bcd365c2..ab31b68b 100644
--- a/lib/features/calendar/presentation/pages/calendar_screen.dart
+++ b/lib/features/calendar/presentation/pages/calendar_screen.dart
@@ -6,7 +6,6 @@ import 'package:eatvio_app/core/app_export.dart';
import 'package:go_router/go_router.dart';
import 'package:intl/intl.dart';
import 'package:flutter/material.dart';
-import 'package:flutter/cupertino.dart';
import 'package:flutter_form_builder/flutter_form_builder.dart';
// ignore: must_be_immutable
@@ -20,7 +19,7 @@ class CalendarScreen extends StatelessWidget {
} else if (state is CalendarStateLoading) {
return Scaffold(
body: Center(
- child: CupertinoActivityIndicator(),
+ child: CircularProgressIndicator(),
),
);
} else if (state is CalendarStateError) {
diff --git a/lib/features/chat/models/chat_message_model.freezed.dart b/lib/features/chat/models/chat_message_model.freezed.dart
index 76a91cbc..8f921425 100644
--- a/lib/features/chat/models/chat_message_model.freezed.dart
+++ b/lib/features/chat/models/chat_message_model.freezed.dart
@@ -29,8 +29,12 @@ mixin _$ChatMessageModel {
@JsonKey(name: 'updated_at')
String get updatedAt => throw _privateConstructorUsedError;
+ /// Serializes this ChatMessageModel to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -59,6 +63,8 @@ class _$ChatMessageModelCopyWithImpl<$Res, $Val extends ChatMessageModel>
// ignore: unused_field
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')
@override
$Res call({
@@ -117,6 +123,8 @@ class __$$ChatMessageModelImplCopyWithImpl<$Res>
$Res Function(_$ChatMessageModelImpl) _then)
: super(_value, _then);
+ /// Create a copy of ChatMessageModel
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -207,12 +215,14 @@ class _$ChatMessageModelImpl implements _ChatMessageModel {
other.updatedAt == updatedAt));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, id, data,
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
@pragma('vm:prefer-inline')
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith =>
@@ -252,8 +262,11 @@ abstract class _ChatMessageModel implements ChatMessageModel {
@override
@JsonKey(name: 'updated_at')
String get updatedAt;
+
+ /// Create a copy of ChatMessageModel
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/chat/models/chat_messages_model.freezed.dart b/lib/features/chat/models/chat_messages_model.freezed.dart
index a970241c..852b33e4 100644
--- a/lib/features/chat/models/chat_messages_model.freezed.dart
+++ b/lib/features/chat/models/chat_messages_model.freezed.dart
@@ -24,8 +24,12 @@ mixin _$ChatMessagesModel {
List get messagesList => throw _privateConstructorUsedError;
ChatMetaModel get meta => throw _privateConstructorUsedError;
+ /// Serializes this ChatMessagesModel to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -53,6 +57,8 @@ class _$ChatMessagesModelCopyWithImpl<$Res, $Val extends ChatMessagesModel>
// ignore: unused_field
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')
@override
$Res call({
@@ -71,6 +77,8 @@ class _$ChatMessagesModelCopyWithImpl<$Res, $Val extends ChatMessagesModel>
) as $Val);
}
+ /// Create a copy of ChatMessagesModel
+ /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ChatMetaModelCopyWith<$Res> get meta {
@@ -104,6 +112,8 @@ class __$$ChatMessagesModelImplCopyWithImpl<$Res>
$Res Function(_$ChatMessagesModelImpl) _then)
: super(_value, _then);
+ /// Create a copy of ChatMessagesModel
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -162,12 +172,14 @@ class _$ChatMessagesModelImpl implements _ChatMessagesModel {
(identical(other.meta, meta) || other.meta == meta));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
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
@pragma('vm:prefer-inline')
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith =>
@@ -196,8 +208,11 @@ abstract class _ChatMessagesModel implements ChatMessagesModel {
List get messagesList;
@override
ChatMetaModel get meta;
+
+ /// Create a copy of ChatMessagesModel
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/chat/models/chat_meta_model.freezed.dart b/lib/features/chat/models/chat_meta_model.freezed.dart
index 11ecb9e2..e8e4e96b 100644
--- a/lib/features/chat/models/chat_meta_model.freezed.dart
+++ b/lib/features/chat/models/chat_meta_model.freezed.dart
@@ -23,8 +23,12 @@ mixin _$ChatMetaModel {
@JsonKey(name: "last_page")
int get lastPage => throw _privateConstructorUsedError;
+ /// Serializes this ChatMetaModel to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -48,6 +52,8 @@ class _$ChatMetaModelCopyWithImpl<$Res, $Val extends ChatMetaModel>
// ignore: unused_field
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')
@override
$Res call({
@@ -81,6 +87,8 @@ class __$$ChatMetaModelImplCopyWithImpl<$Res>
_$ChatMetaModelImpl _value, $Res Function(_$ChatMetaModelImpl) _then)
: super(_value, _then);
+ /// Create a copy of ChatMetaModel
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -122,11 +130,13 @@ class _$ChatMetaModelImpl implements _ChatMetaModel {
other.lastPage == lastPage));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
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
@pragma('vm:prefer-inline')
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith =>
@@ -151,8 +161,11 @@ abstract class _ChatMetaModel implements ChatMetaModel {
@override
@JsonKey(name: "last_page")
int get lastPage;
+
+ /// Create a copy of ChatMetaModel
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/chat/models/chat_room_model.freezed.dart b/lib/features/chat/models/chat_room_model.freezed.dart
index 5a0b6e62..6afb3a94 100644
--- a/lib/features/chat/models/chat_room_model.freezed.dart
+++ b/lib/features/chat/models/chat_room_model.freezed.dart
@@ -26,8 +26,12 @@ mixin _$ChatRoomModel {
throw _privateConstructorUsedError;
Map get users => throw _privateConstructorUsedError;
+ /// Serializes this ChatRoomModel to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -57,6 +61,8 @@ class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel>
// ignore: unused_field
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')
@override
$Res call({
@@ -80,6 +86,8 @@ class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel>
) as $Val);
}
+ /// Create a copy of ChatRoomModel
+ /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings {
@@ -116,6 +124,8 @@ class __$$ChatRoomModelImplCopyWithImpl<$Res>
_$ChatRoomModelImpl _value, $Res Function(_$ChatRoomModelImpl) _then)
: super(_value, _then);
+ /// Create a copy of ChatRoomModel
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -181,12 +191,14 @@ class _$ChatRoomModelImpl implements _ChatRoomModel {
const DeepCollectionEquality().equals(other._users, _users));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, id, chatRoomSettings,
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
@pragma('vm:prefer-inline')
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith =>
@@ -217,8 +229,11 @@ abstract class _ChatRoomModel implements ChatRoomModel {
ChatRoomSettingsModel get chatRoomSettings;
@override
Map get users;
+
+ /// Create a copy of ChatRoomModel
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/chat/models/chat_room_preview_model.freezed.dart b/lib/features/chat/models/chat_room_preview_model.freezed.dart
index 8d41bd4b..4b006cf0 100644
--- a/lib/features/chat/models/chat_room_preview_model.freezed.dart
+++ b/lib/features/chat/models/chat_room_preview_model.freezed.dart
@@ -23,8 +23,12 @@ mixin _$ChatRoomPreviewModel {
@JsonKey(name: "chatRooms")
List get chatRooms => throw _privateConstructorUsedError;
+ /// Serializes this ChatRoomPreviewModel to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -49,6 +53,8 @@ class _$ChatRoomPreviewModelCopyWithImpl<$Res,
// ignore: unused_field
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')
@override
$Res call({
@@ -82,6 +88,8 @@ class __$$ChatRoomPreviewModelImplCopyWithImpl<$Res>
$Res Function(_$ChatRoomPreviewModelImpl) _then)
: super(_value, _then);
+ /// Create a copy of ChatRoomPreviewModel
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -129,12 +137,14 @@ class _$ChatRoomPreviewModelImpl implements _ChatRoomPreviewModel {
.equals(other._chatRooms, _chatRooms));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
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
@pragma('vm:prefer-inline')
_$$ChatRoomPreviewModelImplCopyWith<_$ChatRoomPreviewModelImpl>
@@ -161,8 +171,11 @@ abstract class _ChatRoomPreviewModel implements ChatRoomPreviewModel {
@override
@JsonKey(name: "chatRooms")
List get chatRooms;
+
+ /// Create a copy of ChatRoomPreviewModel
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatRoomPreviewModelImplCopyWith<_$ChatRoomPreviewModelImpl>
get copyWith => throw _privateConstructorUsedError;
}
@@ -182,8 +195,12 @@ mixin _$ChatRoom {
@JsonKey(name: "users")
Users get users => throw _privateConstructorUsedError;
+ /// Serializes this ChatRoom to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -212,6 +229,8 @@ class _$ChatRoomCopyWithImpl<$Res, $Val extends ChatRoom>
// ignore: unused_field
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')
@override
$Res call({
@@ -240,6 +259,8 @@ class _$ChatRoomCopyWithImpl<$Res, $Val extends ChatRoom>
) as $Val);
}
+ /// Create a copy of ChatRoom
+ /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UsersCopyWith<$Res> get users {
@@ -275,6 +296,8 @@ class __$$ChatRoomImplCopyWithImpl<$Res>
_$ChatRoomImpl _value, $Res Function(_$ChatRoomImpl) _then)
: super(_value, _then);
+ /// Create a copy of ChatRoom
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -347,12 +370,14 @@ class _$ChatRoomImpl implements _ChatRoom {
(identical(other.users, users) || other.users == users));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, id, roomName,
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
@pragma('vm:prefer-inline')
_$$ChatRoomImplCopyWith<_$ChatRoomImpl> get copyWith =>
@@ -388,8 +413,11 @@ abstract class _ChatRoom implements ChatRoom {
@override
@JsonKey(name: "users")
Users get users;
+
+ /// Create a copy of ChatRoom
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatRoomImplCopyWith<_$ChatRoomImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -415,8 +443,12 @@ mixin _$LastMessageClass {
@JsonKey(name: "updated_at")
DateTime get updatedAt => throw _privateConstructorUsedError;
+ /// Serializes this LastMessageClass to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -448,6 +480,8 @@ class _$LastMessageClassCopyWithImpl<$Res, $Val extends LastMessageClass>
// ignore: unused_field
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')
@override
$Res call({
@@ -519,6 +553,8 @@ class __$$LastMessageClassImplCopyWithImpl<$Res>
$Res Function(_$LastMessageClassImpl) _then)
: super(_value, _then);
+ /// Create a copy of LastMessageClass
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -633,7 +669,7 @@ class _$LastMessageClassImpl implements _LastMessageClass {
other.updatedAt == updatedAt));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
@@ -645,7 +681,9 @@ class _$LastMessageClassImpl implements _LastMessageClass {
readByToUser,
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
@pragma('vm:prefer-inline')
_$$LastMessageClassImplCopyWith<_$LastMessageClassImpl> get copyWith =>
@@ -696,8 +734,11 @@ abstract class _LastMessageClass implements LastMessageClass {
@override
@JsonKey(name: "updated_at")
DateTime get updatedAt;
+
+ /// Create a copy of LastMessageClass
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$LastMessageClassImplCopyWith<_$LastMessageClassImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -713,8 +754,12 @@ mixin _$Users {
@JsonKey(name: "to_chat_user")
ChatUser get toChatUser => throw _privateConstructorUsedError;
+ /// Serializes this Users to a JSON map.
Map 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 get copyWith => throw _privateConstructorUsedError;
}
@@ -741,6 +786,8 @@ class _$UsersCopyWithImpl<$Res, $Val extends Users>
// ignore: unused_field
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')
@override
$Res call({
@@ -759,6 +806,8 @@ class _$UsersCopyWithImpl<$Res, $Val extends Users>
) as $Val);
}
+ /// Create a copy of Users
+ /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$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
@pragma('vm:prefer-inline')
$ChatUserCopyWith<$Res> get toChatUser {
@@ -801,6 +852,8 @@ class __$$UsersImplCopyWithImpl<$Res>
_$UsersImpl _value, $Res Function(_$UsersImpl) _then)
: super(_value, _then);
+ /// Create a copy of Users
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -853,11 +906,13 @@ class _$UsersImpl implements _Users {
other.toChatUser == toChatUser));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
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
@pragma('vm:prefer-inline')
_$$UsersImplCopyWith<_$UsersImpl> get copyWith =>
@@ -885,8 +940,11 @@ abstract class _Users implements Users {
@override
@JsonKey(name: "to_chat_user")
ChatUser get toChatUser;
+
+ /// Create a copy of Users
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$UsersImplCopyWith<_$UsersImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -906,8 +964,12 @@ mixin _$ChatUser {
@JsonKey(name: "profile_photo_url")
String get profilePhotoUrl => throw _privateConstructorUsedError;
+ /// Serializes this ChatUser to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -934,6 +996,8 @@ class _$ChatUserCopyWithImpl<$Res, $Val extends ChatUser>
// ignore: unused_field
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')
@override
$Res call({
@@ -986,6 +1050,8 @@ class __$$ChatUserImplCopyWithImpl<$Res>
_$ChatUserImpl _value, $Res Function(_$ChatUserImpl) _then)
: super(_value, _then);
+ /// Create a copy of ChatUser
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -1058,12 +1124,14 @@ class _$ChatUserImpl implements _ChatUser {
other.profilePhotoUrl == profilePhotoUrl));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
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
@pragma('vm:prefer-inline')
_$$ChatUserImplCopyWith<_$ChatUserImpl> get copyWith =>
@@ -1101,8 +1169,11 @@ abstract class _ChatUser implements ChatUser {
@override
@JsonKey(name: "profile_photo_url")
String get profilePhotoUrl;
+
+ /// Create a copy of ChatUser
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatUserImplCopyWith<_$ChatUserImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/chat/models/chat_room_settings_model.freezed.dart b/lib/features/chat/models/chat_room_settings_model.freezed.dart
index 4f217556..9d12eefa 100644
--- a/lib/features/chat/models/chat_room_settings_model.freezed.dart
+++ b/lib/features/chat/models/chat_room_settings_model.freezed.dart
@@ -30,8 +30,12 @@ mixin _$ChatRoomSettingsModel {
@JsonKey(name: 'updated_at')
String get updatedAt => throw _privateConstructorUsedError;
+ /// Serializes this ChatRoomSettingsModel to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -61,6 +65,8 @@ class _$ChatRoomSettingsModelCopyWithImpl<$Res,
// ignore: unused_field
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')
@override
$Res call({
@@ -121,6 +127,8 @@ class __$$ChatRoomSettingsModelImplCopyWithImpl<$Res>
$Res Function(_$ChatRoomSettingsModelImpl) _then)
: super(_value, _then);
+ /// Create a copy of ChatRoomSettingsModel
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -202,12 +210,14 @@ class _$ChatRoomSettingsModelImpl implements _ChatRoomSettingsModel {
other.updatedAt == updatedAt));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
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
@pragma('vm:prefer-inline')
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl>
@@ -247,8 +257,11 @@ abstract class _ChatRoomSettingsModel implements ChatRoomSettingsModel {
@override
@JsonKey(name: 'updated_at')
String get updatedAt;
+
+ /// Create a copy of ChatRoomSettingsModel
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl>
get copyWith => throw _privateConstructorUsedError;
}
diff --git a/lib/features/chat/models/chat_user_model.freezed.dart b/lib/features/chat/models/chat_user_model.freezed.dart
index 095c09e2..94718168 100644
--- a/lib/features/chat/models/chat_user_model.freezed.dart
+++ b/lib/features/chat/models/chat_user_model.freezed.dart
@@ -27,8 +27,12 @@ mixin _$ChatUserModel {
@JsonKey(name: 'profile_photo_url')
String? get profilePhotoUrl => throw _privateConstructorUsedError;
+ /// Serializes this ChatUserModel to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -56,6 +60,8 @@ class _$ChatUserModelCopyWithImpl<$Res, $Val extends ChatUserModel>
// ignore: unused_field
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')
@override
$Res call({
@@ -108,6 +114,8 @@ class __$$ChatUserModelImplCopyWithImpl<$Res>
_$ChatUserModelImpl _value, $Res Function(_$ChatUserModelImpl) _then)
: super(_value, _then);
+ /// Create a copy of ChatUserModel
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -178,12 +186,14 @@ class _$ChatUserModelImpl implements _ChatUserModel {
other.profilePhotoUrl == profilePhotoUrl));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
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
@pragma('vm:prefer-inline')
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith =>
@@ -218,8 +228,11 @@ abstract class _ChatUserModel implements ChatUserModel {
@override
@JsonKey(name: 'profile_photo_url')
String? get profilePhotoUrl;
+
+ /// Create a copy of ChatUserModel
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/chat/models/websocket_info_model.freezed.dart b/lib/features/chat/models/websocket_info_model.freezed.dart
index cd383a2b..9cddabee 100644
--- a/lib/features/chat/models/websocket_info_model.freezed.dart
+++ b/lib/features/chat/models/websocket_info_model.freezed.dart
@@ -27,8 +27,12 @@ mixin _$WebsocketInfoModel {
@JsonKey(name: 'user_id')
int get userId => throw _privateConstructorUsedError;
+ /// Serializes this WebsocketInfoModel to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -57,6 +61,8 @@ class _$WebsocketInfoModelCopyWithImpl<$Res, $Val extends WebsocketInfoModel>
// ignore: unused_field
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')
@override
$Res call({
@@ -115,6 +121,8 @@ class __$$WebsocketInfoModelImplCopyWithImpl<$Res>
$Res Function(_$WebsocketInfoModelImpl) _then)
: super(_value, _then);
+ /// Create a copy of WebsocketInfoModel
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -191,12 +199,14 @@ class _$WebsocketInfoModelImpl implements _WebsocketInfoModel {
(identical(other.userId, userId) || other.userId == userId));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
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
@pragma('vm:prefer-inline')
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith =>
@@ -234,8 +244,11 @@ abstract class _WebsocketInfoModel implements WebsocketInfoModel {
@override
@JsonKey(name: 'user_id')
int get userId;
+
+ /// Create a copy of WebsocketInfoModel
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/chat/presentation/bloc/chat_room_cubit/chat_room_state.freezed.dart b/lib/features/chat/presentation/bloc/chat_room_cubit/chat_room_state.freezed.dart
index 43bf9df9..4695b4ad 100644
--- a/lib/features/chat/presentation/bloc/chat_room_cubit/chat_room_state.freezed.dart
+++ b/lib/features/chat/presentation/bloc/chat_room_cubit/chat_room_state.freezed.dart
@@ -90,6 +90,9 @@ class _$ChatRoomStateCopyWithImpl<$Res, $Val extends ChatRoomState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
+
+ /// Create a copy of ChatRoomState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -106,6 +109,9 @@ class __$$ChatRoomStateImplCopyWithImpl<$Res>
__$$ChatRoomStateImplCopyWithImpl(
_$ChatRoomStateImpl _value, $Res Function(_$ChatRoomStateImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of ChatRoomState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -226,6 +232,9 @@ class __$$ChatRoomStateLoadingImplCopyWithImpl<$Res>
__$$ChatRoomStateLoadingImplCopyWithImpl(_$ChatRoomStateLoadingImpl _value,
$Res Function(_$ChatRoomStateLoadingImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of ChatRoomState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -356,6 +365,8 @@ class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res>
$Res Function(_$ChatRoomStateLoadedImpl) _then)
: super(_value, _then);
+ /// Create a copy of ChatRoomState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$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
@pragma('vm:prefer-inline')
$ChatRoomModelCopyWith<$Res> get chatRoom {
@@ -442,7 +455,9 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
int get hashCode => Object.hash(runtimeType, chatRoom,
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
@pragma('vm:prefer-inline')
_$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith =>
@@ -541,7 +556,10 @@ abstract class ChatRoomStateLoaded implements ChatRoomState {
List get chatMessages;
bool get isTyping;
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 =>
throw _privateConstructorUsedError;
}
@@ -563,6 +581,8 @@ class __$$ChatRoomStateErrorImplCopyWithImpl<$Res>
$Res Function(_$ChatRoomStateErrorImpl) _then)
: super(_value, _then);
+ /// Create a copy of ChatRoomState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -602,7 +622,9 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
@override
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
@pragma('vm:prefer-inline')
_$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith =>
@@ -695,7 +717,10 @@ abstract class ChatRoomStateError implements ChatRoomState {
_$ChatRoomStateErrorImpl;
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 =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/chat/presentation/bloc/chat_select_cubit/chat_select_state.freezed.dart b/lib/features/chat/presentation/bloc/chat_select_cubit/chat_select_state.freezed.dart
index 9a05918d..99fa9054 100644
--- a/lib/features/chat/presentation/bloc/chat_select_cubit/chat_select_state.freezed.dart
+++ b/lib/features/chat/presentation/bloc/chat_select_cubit/chat_select_state.freezed.dart
@@ -84,6 +84,9 @@ class _$ChatSelectStateCopyWithImpl<$Res, $Val extends ChatSelectState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
+
+ /// Create a copy of ChatSelectState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -100,6 +103,9 @@ class __$$ChatSelectStateImplCopyWithImpl<$Res>
__$$ChatSelectStateImplCopyWithImpl(
_$ChatSelectStateImpl _value, $Res Function(_$ChatSelectStateImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of ChatSelectState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -216,6 +222,9 @@ class __$$ChatSelectStateLoadingImplCopyWithImpl<$Res>
_$ChatSelectStateLoadingImpl _value,
$Res Function(_$ChatSelectStateLoadingImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of ChatSelectState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -334,6 +343,8 @@ class __$$ChatSelectStateErrorImplCopyWithImpl<$Res>
$Res Function(_$ChatSelectStateErrorImpl) _then)
: super(_value, _then);
+ /// Create a copy of ChatSelectState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -373,7 +384,9 @@ class _$ChatSelectStateErrorImpl implements ChatSelectStateError {
@override
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
@pragma('vm:prefer-inline')
_$$ChatSelectStateErrorImplCopyWith<_$ChatSelectStateErrorImpl>
@@ -461,7 +474,10 @@ abstract class ChatSelectStateError implements ChatSelectState {
_$ChatSelectStateErrorImpl;
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>
get copyWith => throw _privateConstructorUsedError;
}
@@ -484,6 +500,8 @@ class __$$ChatSelectStateLoadedImplCopyWithImpl<$Res>
$Res Function(_$ChatSelectStateLoadedImpl) _then)
: super(_value, _then);
+ /// Create a copy of ChatSelectState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -530,7 +548,9 @@ class _$ChatSelectStateLoadedImpl implements ChatSelectStateLoaded {
int get hashCode =>
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
@pragma('vm:prefer-inline')
_$$ChatSelectStateLoadedImplCopyWith<_$ChatSelectStateLoadedImpl>
@@ -617,7 +637,10 @@ abstract class ChatSelectStateLoaded implements ChatSelectState {
{required final List chatRooms}) = _$ChatSelectStateLoadedImpl;
List 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>
get copyWith => throw _privateConstructorUsedError;
}
diff --git a/lib/features/chat/presentation/pages/chat_screen.dart b/lib/features/chat/presentation/pages/chat_screen.dart
index c11a4652..9a1fb838 100644
--- a/lib/features/chat/presentation/pages/chat_screen.dart
+++ b/lib/features/chat/presentation/pages/chat_screen.dart
@@ -1,12 +1,11 @@
import 'dart:io';
-
+import 'package:intl/intl.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_state.dart';
import 'package:eatvio_app/features/chat/presentation/widgets/chat_bubble_widget.dart';
import 'package:eatvio_app/locator_service.dart';
import 'package:file_picker/file_picker.dart';
-import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class ChatScreen extends StatefulWidget {
@@ -60,7 +59,7 @@ class _ChatScreenState extends State {
} else {
return Scaffold(
body: Center(
- child: CupertinoActivityIndicator(),
+ child: CircularProgressIndicator(),
),
);
}
@@ -145,16 +144,25 @@ class _ChatScreenState extends State {
delegate: SliverChildBuilderDelegate(
(context, index) {
if (index < state.chatMessages.length) {
- return 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 ?? [],
+ return Column(
+ children: [
+ if ((index + 1 != state.chatMessages.length &&
+ DateTime.parse(state.chatMessages[index].updatedAt).day !=
+ 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 {
return Padding(
padding: const EdgeInsets.all(8),
- child: Center(child: CupertinoActivityIndicator()),
+ child: Center(child: CircularProgressIndicator()),
);
}
},
@@ -311,4 +319,20 @@ class _ChatScreenState extends State {
),
);
}
+
+ _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,
+ ),
+ ),
+ );
+ }
}
diff --git a/lib/features/chat/presentation/pages/chat_select_screen.dart b/lib/features/chat/presentation/pages/chat_select_screen.dart
index 74925e29..245b9f25 100644
--- a/lib/features/chat/presentation/pages/chat_select_screen.dart
+++ b/lib/features/chat/presentation/pages/chat_select_screen.dart
@@ -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/widgets/chat_entry_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';
class ChatSelectScreen extends StatefulWidget {
@@ -15,58 +15,62 @@ class ChatSelectScreen extends StatefulWidget {
}
class _ChatSelectScreenState extends State {
+ final ChatSelectCubit chatSelectCubit = sl();
final searchController = TextEditingController();
Widget build(BuildContext context) {
- return BlocBuilder(
- builder: (context, state) {
- return Scaffold(
- appBar: AppBar(
- backgroundColor: Colors.white,
- toolbarHeight: 0,
- ),
- body: NestedScrollView(
- headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
- return [
- SliverPadding(
- padding: const EdgeInsets.only(top: 8),
- sliver: SliverAppBar(
- automaticallyImplyLeading: false,
- stretchTriggerOffset: 1,
- scrolledUnderElevation: 0,
- floating: true,
- snap: true,
- title: Padding(
- padding: const EdgeInsets.only(top: 8),
- child: ChatSearchBarWidget(
- onSuffixIconTap: () => context.read().getChatRooms(),
- onChanged: (query) {
- if (query.length > 2) {
- EasyDebounce.debounce(
- 'searchChatRoom',
- Duration(milliseconds: 300),
- () => context.read().getChatRooms(query: query),
- );
- } else {
- context.read().getChatRooms();
- }
- },
- controller: searchController,
- fillColor: Color(0xFFF0F2F5),
- hintText: "Поиск",
- hintStyle: TextStyle(
- color: Color(0xFF7B8794),
+ return BlocProvider(
+ create: (context) => chatSelectCubit..getChatRooms(),
+ child: BlocBuilder(
+ builder: (context, state) {
+ return Scaffold(
+ appBar: AppBar(
+ backgroundColor: Colors.white,
+ toolbarHeight: 0,
+ ),
+ body: NestedScrollView(
+ headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
+ return [
+ SliverPadding(
+ padding: const EdgeInsets.only(top: 8),
+ sliver: SliverAppBar(
+ automaticallyImplyLeading: false,
+ stretchTriggerOffset: 1,
+ scrolledUnderElevation: 0,
+ floating: true,
+ snap: true,
+ title: Padding(
+ padding: const EdgeInsets.only(top: 8),
+ child: ChatSearchBarWidget(
+ onSuffixIconTap: () => context.read().getChatRooms(),
+ onChanged: (query) {
+ if (query.length > 2) {
+ EasyDebounce.debounce(
+ 'searchChatRoom',
+ Duration(milliseconds: 300),
+ () => context.read().getChatRooms(query: query),
+ );
+ } else {
+ context.read().getChatRooms();
+ }
+ },
+ controller: searchController,
+ fillColor: Color(0xFFF0F2F5),
+ hintText: "Поиск",
+ hintStyle: TextStyle(
+ color: Color(0xFF7B8794),
+ ),
),
),
),
),
- ),
- ];
- },
- body: stateBuilder(state),
- ),
- );
- },
+ ];
+ },
+ body: stateBuilder(state),
+ ),
+ );
+ },
+ ),
);
}
@@ -74,7 +78,7 @@ class _ChatSelectScreenState extends State {
if (state is ChatSelectStateLoading) {
return Scaffold(
body: Center(
- child: CupertinoActivityIndicator(),
+ child: CircularProgressIndicator(),
),
);
} else if (state is ChatSelectStateLoaded) {
@@ -87,7 +91,7 @@ class _ChatSelectScreenState extends State {
} else {
return Scaffold(
body: Center(
- child: CupertinoActivityIndicator(),
+ child: CircularProgressIndicator(),
),
);
}
diff --git a/lib/features/diary/models/diary_model.freezed.dart b/lib/features/diary/models/diary_model.freezed.dart
index a02a4621..ceabd5db 100644
--- a/lib/features/diary/models/diary_model.freezed.dart
+++ b/lib/features/diary/models/diary_model.freezed.dart
@@ -29,8 +29,12 @@ mixin _$DiaryModel {
DateTime? get wakeup => throw _privateConstructorUsedError;
DateTime? get retire => throw _privateConstructorUsedError;
+ /// Serializes this DiaryModel to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -64,6 +68,8 @@ class _$DiaryModelCopyWithImpl<$Res, $Val extends DiaryModel>
// ignore: unused_field
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')
@override
$Res call({
@@ -112,6 +118,8 @@ class _$DiaryModelCopyWithImpl<$Res, $Val extends DiaryModel>
) as $Val);
}
+ /// Create a copy of DiaryModel
+ /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$StateCopyWith<$Res> get state {
@@ -151,6 +159,8 @@ class __$$DiaryModelImplCopyWithImpl<$Res>
_$DiaryModelImpl _value, $Res Function(_$DiaryModelImpl) _then)
: super(_value, _then);
+ /// Create a copy of DiaryModel
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -260,7 +270,7 @@ class _$DiaryModelImpl implements _DiaryModel {
(identical(other.retire, retire) || other.retire == retire));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
@@ -273,7 +283,9 @@ class _$DiaryModelImpl implements _DiaryModel {
wakeup,
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
@pragma('vm:prefer-inline')
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith =>
@@ -317,8 +329,11 @@ abstract class _DiaryModel implements DiaryModel {
DateTime? get wakeup;
@override
DateTime? get retire;
+
+ /// Create a copy of DiaryModel
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/diary/models/meal.freezed.dart b/lib/features/diary/models/meal.freezed.dart
index 2c249b06..2bd6c478 100644
--- a/lib/features/diary/models/meal.freezed.dart
+++ b/lib/features/diary/models/meal.freezed.dart
@@ -28,8 +28,12 @@ mixin _$Meal {
List get portions => throw _privateConstructorUsedError;
List get photos => throw _privateConstructorUsedError;
+ /// Serializes this Meal to a JSON map.
Map 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 get copyWith => throw _privateConstructorUsedError;
}
@@ -58,6 +62,8 @@ class _$MealCopyWithImpl<$Res, $Val extends Meal>
// ignore: unused_field
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')
@override
$Res call({
@@ -126,6 +132,8 @@ class __$$MealImplCopyWithImpl<$Res>
__$$MealImplCopyWithImpl(_$MealImpl _value, $Res Function(_$MealImpl) _then)
: super(_value, _then);
+ /// Create a copy of Meal
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -232,7 +240,7 @@ class _$MealImpl implements _Meal {
const DeepCollectionEquality().equals(other._photos, _photos));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
@@ -244,7 +252,9 @@ class _$MealImpl implements _Meal {
const DeepCollectionEquality().hash(_portions),
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
@pragma('vm:prefer-inline')
_$$MealImplCopyWith<_$MealImpl> get copyWith =>
@@ -284,8 +294,11 @@ abstract class _Meal implements Meal {
List get portions;
@override
List get photos;
+
+ /// Create a copy of Meal
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$MealImplCopyWith<_$MealImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/diary/models/photo.freezed.dart b/lib/features/diary/models/photo.freezed.dart
index 2d9c70bd..8f5e0152 100644
--- a/lib/features/diary/models/photo.freezed.dart
+++ b/lib/features/diary/models/photo.freezed.dart
@@ -25,8 +25,12 @@ mixin _$Photo {
String get originalName => throw _privateConstructorUsedError;
String get path => throw _privateConstructorUsedError;
+ /// Serializes this Photo to a JSON map.
Map 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 get copyWith => throw _privateConstructorUsedError;
}
@@ -51,6 +55,8 @@ class _$PhotoCopyWithImpl<$Res, $Val extends Photo>
// ignore: unused_field
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')
@override
$Res call({
@@ -96,6 +102,8 @@ class __$$PhotoImplCopyWithImpl<$Res>
_$PhotoImpl _value, $Res Function(_$PhotoImpl) _then)
: super(_value, _then);
+ /// Create a copy of Photo
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -155,11 +163,13 @@ class _$PhotoImpl implements _Photo {
(identical(other.path, path) || other.path == path));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
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
@pragma('vm:prefer-inline')
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith =>
@@ -188,8 +198,11 @@ abstract class _Photo implements Photo {
String get originalName;
@override
String get path;
+
+ /// Create a copy of Photo
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/diary/models/portion.freezed.dart b/lib/features/diary/models/portion.freezed.dart
index 77627c29..4bef02d4 100644
--- a/lib/features/diary/models/portion.freezed.dart
+++ b/lib/features/diary/models/portion.freezed.dart
@@ -26,8 +26,12 @@ mixin _$Portion {
String get portion => throw _privateConstructorUsedError;
bool get from_diet => throw _privateConstructorUsedError;
+ /// Serializes this Portion to a JSON map.
Map 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 get copyWith => throw _privateConstructorUsedError;
}
@@ -54,6 +58,8 @@ class _$PortionCopyWithImpl<$Res, $Val extends Portion>
// ignore: unused_field
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')
@override
$Res call({
@@ -111,6 +117,8 @@ class __$$PortionImplCopyWithImpl<$Res>
_$PortionImpl _value, $Res Function(_$PortionImpl) _then)
: super(_value, _then);
+ /// Create a copy of Portion
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -189,12 +197,14 @@ class _$PortionImpl implements _Portion {
other.from_diet == from_diet));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
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
@pragma('vm:prefer-inline')
_$$PortionImplCopyWith<_$PortionImpl> get copyWith =>
@@ -228,8 +238,11 @@ abstract class _Portion implements Portion {
String get portion;
@override
bool get from_diet;
+
+ /// Create a copy of Portion
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$PortionImplCopyWith<_$PortionImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/diary/models/product.freezed.dart b/lib/features/diary/models/product.freezed.dart
index d30ada33..610656fb 100644
--- a/lib/features/diary/models/product.freezed.dart
+++ b/lib/features/diary/models/product.freezed.dart
@@ -23,8 +23,12 @@ mixin _$Product {
int get id => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
+ /// Serializes this Product to a JSON map.
Map 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 get copyWith => throw _privateConstructorUsedError;
}
@@ -46,6 +50,8 @@ class _$ProductCopyWithImpl<$Res, $Val extends Product>
// ignore: unused_field
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')
@override
$Res call({
@@ -83,6 +89,8 @@ class __$$ProductImplCopyWithImpl<$Res>
_$ProductImpl _value, $Res Function(_$ProductImpl) _then)
: super(_value, _then);
+ /// Create a copy of Product
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -129,11 +137,13 @@ class _$ProductImpl implements _Product {
(identical(other.name, name) || other.name == name));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
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
@pragma('vm:prefer-inline')
_$$ProductImplCopyWith<_$ProductImpl> get copyWith =>
@@ -157,8 +167,11 @@ abstract class _Product implements Product {
int get id;
@override
String get name;
+
+ /// Create a copy of Product
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$ProductImplCopyWith<_$ProductImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/diary/models/state.freezed.dart b/lib/features/diary/models/state.freezed.dart
index 599ec29f..6b9c50fb 100644
--- a/lib/features/diary/models/state.freezed.dart
+++ b/lib/features/diary/models/state.freezed.dart
@@ -23,8 +23,12 @@ mixin _$State {
bool get has_chosen_diet => throw _privateConstructorUsedError;
bool get has_chosen_plan => throw _privateConstructorUsedError;
+ /// Serializes this State to a JSON map.
Map 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 get copyWith => throw _privateConstructorUsedError;
}
@@ -46,6 +50,8 @@ class _$StateCopyWithImpl<$Res, $Val extends State>
// ignore: unused_field
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')
@override
$Res call({
@@ -83,6 +89,8 @@ class __$$StateImplCopyWithImpl<$Res>
_$StateImpl _value, $Res Function(_$StateImpl) _then)
: super(_value, _then);
+ /// Create a copy of State
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -132,12 +140,14 @@ class _$StateImpl implements _State {
other.has_chosen_plan == has_chosen_plan));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
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
@pragma('vm:prefer-inline')
_$$StateImplCopyWith<_$StateImpl> get copyWith =>
@@ -162,8 +172,11 @@ abstract class _State implements State {
bool get has_chosen_diet;
@override
bool get has_chosen_plan;
+
+ /// Create a copy of State
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$StateImplCopyWith<_$StateImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/diary/presentation/bloc/diary_state.freezed.dart b/lib/features/diary/presentation/bloc/diary_state.freezed.dart
index 5a9bbc12..98d7019f 100644
--- a/lib/features/diary/presentation/bloc/diary_state.freezed.dart
+++ b/lib/features/diary/presentation/bloc/diary_state.freezed.dart
@@ -174,6 +174,9 @@ class _$DiaryStateCopyWithImpl<$Res, $Val extends DiaryState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
+
+ /// Create a copy of DiaryState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -190,6 +193,9 @@ class __$$DiaryStateImplCopyWithImpl<$Res>
__$$DiaryStateImplCopyWithImpl(
_$DiaryStateImpl _value, $Res Function(_$DiaryStateImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of DiaryState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -397,6 +403,8 @@ class __$$DiaryStateLoadingImplCopyWithImpl<$Res>
$Res Function(_$DiaryStateLoadingImpl) _then)
: super(_value, _then);
+ /// Create a copy of DiaryState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -435,7 +443,9 @@ class _$DiaryStateLoadingImpl implements DiaryStateLoading {
@override
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
@pragma('vm:prefer-inline')
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith =>
@@ -611,7 +621,10 @@ abstract class DiaryStateLoading implements DiaryState {
const factory DiaryStateLoading({final int? id}) = _$DiaryStateLoadingImpl;
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 =>
throw _privateConstructorUsedError;
}
@@ -666,6 +679,8 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
$Res Function(_$DiaryStateLoadedImpl) _then)
: super(_value, _then);
+ /// Create a copy of DiaryState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$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
@pragma('vm:prefer-inline')
$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
@pragma('vm:prefer-inline')
$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
@pragma('vm:prefer-inline')
$SelectionPopupModelCopyWith<$Res> get portionController {
@@ -1100,7 +1121,9 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
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
@pragma('vm:prefer-inline')
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith =>
@@ -1420,7 +1443,10 @@ abstract class DiaryStateLoaded implements DiaryState {
bool get isLoading;
bool get isAdded;
List? 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 =>
throw _privateConstructorUsedError;
}
@@ -1442,6 +1468,8 @@ class __$$DiaryStateErrorImplCopyWithImpl<$Res>
_$DiaryStateErrorImpl _value, $Res Function(_$DiaryStateErrorImpl) _then)
: super(_value, _then);
+ /// Create a copy of DiaryState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -1481,7 +1509,9 @@ class _$DiaryStateErrorImpl implements DiaryStateError {
@override
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
@pragma('vm:prefer-inline')
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith =>
@@ -1658,7 +1688,10 @@ abstract class DiaryStateError implements DiaryState {
_$DiaryStateErrorImpl;
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 =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/diary/presentation/pages/diary_recommendations_scree.dart b/lib/features/diary/presentation/pages/diary_recommendations_scree.dart
index 6c9f3a12..3c299e8c 100644
--- a/lib/features/diary/presentation/pages/diary_recommendations_scree.dart
+++ b/lib/features/diary/presentation/pages/diary_recommendations_scree.dart
@@ -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:flutter/material.dart';
-import 'package:flutter/cupertino.dart';
import 'package:flutter_form_builder/flutter_form_builder.dart';
// ignore: must_be_immutable
@@ -29,7 +28,7 @@ class DiaryRecommendationsScreen extends StatelessWidget {
} else if (state is DiaryStateLoading) {
return Scaffold(
body: Center(
- child: CupertinoActivityIndicator(),
+ child: CircularProgressIndicator(),
),
);
} else if (state is DiaryStateError) {
diff --git a/lib/features/diary/presentation/pages/diary_screen.dart b/lib/features/diary/presentation/pages/diary_screen.dart
index d79b4aab..a6c0df8d 100644
--- a/lib/features/diary/presentation/pages/diary_screen.dart
+++ b/lib/features/diary/presentation/pages/diary_screen.dart
@@ -15,7 +15,6 @@ import 'package:eatvio_app/widgets/custom_scale_element.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
-import 'package:flutter/cupertino.dart';
import 'package:flutter_form_builder/flutter_form_builder.dart';
import 'package:image_picker/image_picker.dart';
import 'package:syncfusion_flutter_charts/charts.dart';
@@ -39,7 +38,7 @@ class DiaryScreen extends StatelessWidget {
} else if (state is DiaryStateLoading) {
return Scaffold(
body: Center(
- child: CupertinoActivityIndicator(),
+ child: CircularProgressIndicator(),
),
);
} else if (state is DiaryStateError) {
diff --git a/lib/features/diets/presentation/pages/about_diet_screen.dart b/lib/features/diets/presentation/pages/about_diet_screen.dart
index 627c7a68..9262b194 100644
--- a/lib/features/diets/presentation/pages/about_diet_screen.dart
+++ b/lib/features/diets/presentation/pages/about_diet_screen.dart
@@ -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/widgets/comments_widget.dart';
import 'package:eatvio_app/locator_service.dart';
-import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
@@ -327,7 +326,7 @@ class _AboutDietScreenState extends State {
if (state is CommentsStateLoading)
Padding(
padding: const EdgeInsets.all(32),
- child: CupertinoActivityIndicator(),
+ child: CircularProgressIndicator(),
),
if (state is CommentsStateLoaded)
CommentsWidget(
diff --git a/lib/features/feed/models/comment_model.freezed.dart b/lib/features/feed/models/comment_model.freezed.dart
index d294267f..4e520131 100644
--- a/lib/features/feed/models/comment_model.freezed.dart
+++ b/lib/features/feed/models/comment_model.freezed.dart
@@ -27,8 +27,12 @@ mixin _$CommentModel {
@JsonKey(name: "meta")
Meta get meta => throw _privateConstructorUsedError;
+ /// Serializes this CommentModel to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -58,6 +62,8 @@ class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel>
// ignore: unused_field
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')
@override
$Res call({
@@ -81,6 +87,8 @@ class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel>
) as $Val);
}
+ /// Create a copy of CommentModel
+ /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$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
@pragma('vm:prefer-inline')
$MetaCopyWith<$Res> get meta {
@@ -125,6 +135,8 @@ class __$$CommentModelImplCopyWithImpl<$Res>
_$CommentModelImpl _value, $Res Function(_$CommentModelImpl) _then)
: super(_value, _then);
+ /// Create a copy of CommentModel
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -192,12 +204,14 @@ class _$CommentModelImpl implements _CommentModel {
(identical(other.meta, meta) || other.meta == meta));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
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
@pragma('vm:prefer-inline')
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith =>
@@ -229,8 +243,11 @@ abstract class _CommentModel implements CommentModel {
@override
@JsonKey(name: "meta")
Meta get meta;
+
+ /// Create a copy of CommentModel
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -254,8 +271,12 @@ mixin _$Comment {
@JsonKey(name: "created_at")
DateTime get createdAt => throw _privateConstructorUsedError;
+ /// Serializes this Comment to a JSON map.
Map 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 get copyWith => throw _privateConstructorUsedError;
}
@@ -283,6 +304,8 @@ class _$CommentCopyWithImpl<$Res, $Val extends Comment>
// ignore: unused_field
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')
@override
$Res call({
@@ -346,6 +369,8 @@ class __$$CommentImplCopyWithImpl<$Res>
_$CommentImpl _value, $Res Function(_$CommentImpl) _then)
: super(_value, _then);
+ /// Create a copy of Comment
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -449,7 +474,7 @@ class _$CommentImpl implements _Comment {
other.createdAt == createdAt));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
@@ -460,7 +485,9 @@ class _$CommentImpl implements _Comment {
const DeepCollectionEquality().hash(_childrenComments),
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
@pragma('vm:prefer-inline')
_$$CommentImplCopyWith<_$CommentImpl> get copyWith =>
@@ -506,8 +533,11 @@ abstract class _Comment implements Comment {
@override
@JsonKey(name: "created_at")
DateTime get createdAt;
+
+ /// Create a copy of Comment
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$CommentImplCopyWith<_$CommentImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/feed/models/diets_pagination_model.freezed.dart b/lib/features/feed/models/diets_pagination_model.freezed.dart
index 04835daf..15b651f3 100644
--- a/lib/features/feed/models/diets_pagination_model.freezed.dart
+++ b/lib/features/feed/models/diets_pagination_model.freezed.dart
@@ -27,8 +27,12 @@ mixin _$DietsPagination {
@JsonKey(name: "meta")
Meta get meta => throw _privateConstructorUsedError;
+ /// Serializes this DietsPagination to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -58,6 +62,8 @@ class _$DietsPaginationCopyWithImpl<$Res, $Val extends DietsPagination>
// ignore: unused_field
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')
@override
$Res call({
@@ -81,6 +87,8 @@ class _$DietsPaginationCopyWithImpl<$Res, $Val extends DietsPagination>
) as $Val);
}
+ /// Create a copy of DietsPagination
+ /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$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
@pragma('vm:prefer-inline')
$MetaCopyWith<$Res> get meta {
@@ -125,6 +135,8 @@ class __$$DietsPaginationImplCopyWithImpl<$Res>
_$DietsPaginationImpl _value, $Res Function(_$DietsPaginationImpl) _then)
: super(_value, _then);
+ /// Create a copy of DietsPagination
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -192,12 +204,14 @@ class _$DietsPaginationImpl implements _DietsPagination {
(identical(other.meta, meta) || other.meta == meta));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
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
@pragma('vm:prefer-inline')
_$$DietsPaginationImplCopyWith<_$DietsPaginationImpl> get copyWith =>
@@ -230,8 +244,11 @@ abstract class _DietsPagination implements DietsPagination {
@override
@JsonKey(name: "meta")
Meta get meta;
+
+ /// Create a copy of DietsPagination
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$DietsPaginationImplCopyWith<_$DietsPaginationImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -268,8 +285,12 @@ mixin _$Diet {
@JsonKey(name: "total_comments")
int get totalComments => throw _privateConstructorUsedError;
+ /// Serializes this Diet to a JSON map.
Map 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 get copyWith => throw _privateConstructorUsedError;
}
@@ -307,6 +328,8 @@ class _$DietCopyWithImpl<$Res, $Val extends Diet>
// ignore: unused_field
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')
@override
$Res call({
@@ -375,6 +398,8 @@ class _$DietCopyWithImpl<$Res, $Val extends Diet>
) as $Val);
}
+ /// Create a copy of Diet
+ /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$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
@pragma('vm:prefer-inline')
$AuthorCopyWith<$Res> get author {
@@ -427,6 +454,8 @@ class __$$DietImplCopyWithImpl<$Res>
__$$DietImplCopyWithImpl(_$DietImpl _value, $Res Function(_$DietImpl) _then)
: super(_value, _then);
+ /// Create a copy of Diet
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -590,7 +619,7 @@ class _$DietImpl implements _Diet {
other.totalComments == totalComments));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
@@ -607,7 +636,9 @@ class _$DietImpl implements _Diet {
totalViews,
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
@pragma('vm:prefer-inline')
_$$DietImplCopyWith<_$DietImpl> get copyWith =>
@@ -676,8 +707,11 @@ abstract class _Diet implements Diet {
@override
@JsonKey(name: "total_comments")
int get totalComments;
+
+ /// Create a copy of Diet
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$DietImplCopyWith<_$DietImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -697,8 +731,12 @@ mixin _$Author {
@JsonKey(name: "author_is_me")
bool get authorIsMe => throw _privateConstructorUsedError;
+ /// Serializes this Author to a JSON map.
Map 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 get copyWith => throw _privateConstructorUsedError;
}
@@ -724,6 +762,8 @@ class _$AuthorCopyWithImpl<$Res, $Val extends Author>
// ignore: unused_field
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')
@override
$Res call({
@@ -775,6 +815,8 @@ class __$$AuthorImplCopyWithImpl<$Res>
_$AuthorImpl _value, $Res Function(_$AuthorImpl) _then)
: super(_value, _then);
+ /// Create a copy of Author
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -849,12 +891,14 @@ class _$AuthorImpl implements _Author {
other.authorIsMe == authorIsMe));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
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
@pragma('vm:prefer-inline')
_$$AuthorImplCopyWith<_$AuthorImpl> get copyWith =>
@@ -891,8 +935,11 @@ abstract class _Author implements Author {
@override
@JsonKey(name: "author_is_me")
bool get authorIsMe;
+
+ /// Create a copy of Author
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$AuthorImplCopyWith<_$AuthorImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -912,8 +959,12 @@ mixin _$DailySchedule {
@JsonKey(name: "quantity")
int get quantity => throw _privateConstructorUsedError;
+ /// Serializes this DailySchedule to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -941,6 +992,8 @@ class _$DailyScheduleCopyWithImpl<$Res, $Val extends DailySchedule>
// ignore: unused_field
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')
@override
$Res call({
@@ -993,6 +1046,8 @@ class __$$DailyScheduleImplCopyWithImpl<$Res>
_$DailyScheduleImpl _value, $Res Function(_$DailyScheduleImpl) _then)
: super(_value, _then);
+ /// Create a copy of DailySchedule
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -1064,11 +1119,13 @@ class _$DailyScheduleImpl implements _DailySchedule {
other.quantity == quantity));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
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
@pragma('vm:prefer-inline')
_$$DailyScheduleImplCopyWith<_$DailyScheduleImpl> get copyWith =>
@@ -1105,8 +1162,11 @@ abstract class _DailySchedule implements DailySchedule {
@override
@JsonKey(name: "quantity")
int get quantity;
+
+ /// Create a copy of DailySchedule
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$DailyScheduleImplCopyWith<_$DailyScheduleImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -1126,8 +1186,12 @@ mixin _$DietType {
@JsonKey(name: "meat")
bool? get meat => throw _privateConstructorUsedError;
+ /// Serializes this DietType to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -1154,6 +1218,8 @@ class _$DietTypeCopyWithImpl<$Res, $Val extends DietType>
// ignore: unused_field
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')
@override
$Res call({
@@ -1206,6 +1272,8 @@ class __$$DietTypeImplCopyWithImpl<$Res>
_$DietTypeImpl _value, $Res Function(_$DietTypeImpl) _then)
: super(_value, _then);
+ /// Create a copy of DietType
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -1276,11 +1344,13 @@ class _$DietTypeImpl implements _DietType {
(identical(other.meat, meat) || other.meat == meat));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
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
@pragma('vm:prefer-inline')
_$$DietTypeImplCopyWith<_$DietTypeImpl> get copyWith =>
@@ -1316,8 +1386,11 @@ abstract class _DietType implements DietType {
@override
@JsonKey(name: "meat")
bool? get meat;
+
+ /// Create a copy of DietType
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$DietTypeImplCopyWith<_$DietTypeImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/feed/models/feed_blog_post_model.freezed.dart b/lib/features/feed/models/feed_blog_post_model.freezed.dart
index 08d5527a..89087373 100644
--- a/lib/features/feed/models/feed_blog_post_model.freezed.dart
+++ b/lib/features/feed/models/feed_blog_post_model.freezed.dart
@@ -41,8 +41,12 @@ mixin _$FeedBlogPostModel {
@JsonKey(name: "was_liked_by_me")
bool get wasLikedByMe => throw _privateConstructorUsedError;
+ /// Serializes this FeedBlogPostModel to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -81,6 +85,8 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
// ignore: unused_field
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')
@override
$Res call({
@@ -154,6 +160,8 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
) as $Val);
}
+ /// Create a copy of FeedBlogPostModel
+ /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$AuthorCopyWith<$Res> get author {
@@ -198,6 +206,8 @@ class __$$FeedBlogPostModelImplCopyWithImpl<$Res>
$Res Function(_$FeedBlogPostModelImpl) _then)
: super(_value, _then);
+ /// Create a copy of FeedBlogPostModel
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -360,7 +370,7 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
other.wasLikedByMe == wasLikedByMe));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
@@ -378,7 +388,9 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
totalComments,
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
@pragma('vm:prefer-inline')
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
@@ -446,8 +458,11 @@ abstract class _FeedBlogPostModel implements FeedBlogPostModel {
@override
@JsonKey(name: "was_liked_by_me")
bool get wasLikedByMe;
+
+ /// Create a copy of FeedBlogPostModel
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/feed/models/feed_blog_post_settings_model.freezed.dart b/lib/features/feed/models/feed_blog_post_settings_model.freezed.dart
index c680d82e..9bddceae 100644
--- a/lib/features/feed/models/feed_blog_post_settings_model.freezed.dart
+++ b/lib/features/feed/models/feed_blog_post_settings_model.freezed.dart
@@ -26,8 +26,12 @@ mixin _$FeedBlogPostSettingsModel {
throw _privateConstructorUsedError;
Meta get meta => throw _privateConstructorUsedError;
+ /// Serializes this FeedBlogPostSettingsModel to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -56,6 +60,8 @@ class _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
// ignore: unused_field
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')
@override
$Res call({
@@ -74,6 +80,8 @@ class _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
) as $Val);
}
+ /// Create a copy of FeedBlogPostSettingsModel
+ /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$MetaCopyWith<$Res> get meta {
@@ -110,6 +118,8 @@ class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>
$Res Function(_$FeedBlogPostSettingsModelImpl) _then)
: super(_value, _then);
+ /// Create a copy of FeedBlogPostSettingsModel
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -169,12 +179,14 @@ class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
(identical(other.meta, meta) || other.meta == meta));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,
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
@pragma('vm:prefer-inline')
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
@@ -203,8 +215,11 @@ abstract class _FeedBlogPostSettingsModel implements FeedBlogPostSettingsModel {
List get feedBlogPostList;
@override
Meta get meta;
+
+ /// Create a copy of FeedBlogPostSettingsModel
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
get copyWith => throw _privateConstructorUsedError;
}
diff --git a/lib/features/feed/models/recipes_model.freezed.dart b/lib/features/feed/models/recipes_model.freezed.dart
index 26cd55e3..9dd4f54e 100644
--- a/lib/features/feed/models/recipes_model.freezed.dart
+++ b/lib/features/feed/models/recipes_model.freezed.dart
@@ -45,8 +45,12 @@ mixin _$Recipes {
int get viewsCount => throw _privateConstructorUsedError;
Author get author => throw _privateConstructorUsedError;
+ /// Serializes this Recipes to a JSON map.
Map 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 get copyWith => throw _privateConstructorUsedError;
}
@@ -87,6 +91,8 @@ class _$RecipesCopyWithImpl<$Res, $Val extends Recipes>
// ignore: unused_field
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')
@override
$Res call({
@@ -180,6 +186,8 @@ class _$RecipesCopyWithImpl<$Res, $Val extends Recipes>
) as $Val);
}
+ /// Create a copy of Recipes
+ /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$AuthorCopyWith<$Res> get author {
@@ -227,6 +235,8 @@ class __$$RecipesImplCopyWithImpl<$Res>
_$RecipesImpl _value, $Res Function(_$RecipesImpl) _then)
: super(_value, _then);
+ /// Create a copy of Recipes
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -440,7 +450,7 @@ class _$RecipesImpl implements _Recipes {
(identical(other.author, author) || other.author == author));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
@@ -462,7 +472,9 @@ class _$RecipesImpl implements _Recipes {
viewsCount,
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
@pragma('vm:prefer-inline')
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith =>
@@ -539,8 +551,11 @@ abstract class _Recipes implements Recipes {
int get viewsCount;
@override
Author get author;
+
+ /// Create a copy of Recipes
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -555,8 +570,12 @@ mixin _$Ingredient {
String? get unit => throw _privateConstructorUsedError;
String get portion => throw _privateConstructorUsedError;
+ /// Serializes this Ingredient to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -580,6 +599,8 @@ class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient>
// ignore: unused_field
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')
@override
$Res call({
@@ -623,6 +644,8 @@ class __$$IngredientImplCopyWithImpl<$Res>
_$IngredientImpl _value, $Res Function(_$IngredientImpl) _then)
: super(_value, _then);
+ /// Create a copy of Ingredient
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -678,11 +701,13 @@ class _$IngredientImpl implements _Ingredient {
(identical(other.portion, portion) || other.portion == portion));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
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
@pragma('vm:prefer-inline')
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
@@ -711,8 +736,11 @@ abstract class _Ingredient implements Ingredient {
String? get unit;
@override
String get portion;
+
+ /// Create a copy of Ingredient
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -726,8 +754,12 @@ mixin _$Step {
String get image => throw _privateConstructorUsedError;
String get description => throw _privateConstructorUsedError;
+ /// Serializes this Step to a JSON map.
Map 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 get copyWith => throw _privateConstructorUsedError;
}
@@ -749,6 +781,8 @@ class _$StepCopyWithImpl<$Res, $Val extends Step>
// ignore: unused_field
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')
@override
$Res call({
@@ -785,6 +819,8 @@ class __$$StepImplCopyWithImpl<$Res>
__$$StepImplCopyWithImpl(_$StepImpl _value, $Res Function(_$StepImpl) _then)
: super(_value, _then);
+ /// Create a copy of Step
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -832,11 +868,13 @@ class _$StepImpl implements _Step {
other.description == description));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
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
@pragma('vm:prefer-inline')
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
@@ -861,8 +899,11 @@ abstract class _Step implements Step {
String get image;
@override
String get description;
+
+ /// Create a copy of Step
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/feed/models/recipes_pagination_model.freezed.dart b/lib/features/feed/models/recipes_pagination_model.freezed.dart
index 2f0d43fb..ca8e9f92 100644
--- a/lib/features/feed/models/recipes_pagination_model.freezed.dart
+++ b/lib/features/feed/models/recipes_pagination_model.freezed.dart
@@ -23,8 +23,12 @@ mixin _$RecipesPagination {
@JsonKey(name: 'data')
List get recipesList => throw _privateConstructorUsedError;
+ /// Serializes this RecipesPagination to a JSON map.
Map 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 get copyWith =>
throw _privateConstructorUsedError;
}
@@ -48,6 +52,8 @@ class _$RecipesPaginationCopyWithImpl<$Res, $Val extends RecipesPagination>
// ignore: unused_field
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')
@override
$Res call({
@@ -81,6 +87,8 @@ class __$$RecipesPaginationImplCopyWithImpl<$Res>
$Res Function(_$RecipesPaginationImpl) _then)
: super(_value, _then);
+ /// Create a copy of RecipesPagination
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -128,12 +136,14 @@ class _$RecipesPaginationImpl implements _RecipesPagination {
.equals(other._recipesList, _recipesList));
}
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
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
@pragma('vm:prefer-inline')
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith =>
@@ -159,8 +169,11 @@ abstract class _RecipesPagination implements RecipesPagination {
@override
@JsonKey(name: 'data')
List get recipesList;
+
+ /// Create a copy of RecipesPagination
+ /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(ignore: true)
+ @JsonKey(includeFromJson: false, includeToJson: false)
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/feed/presentation/bloc/comments_cubit/comments_state.freezed.dart b/lib/features/feed/presentation/bloc/comments_cubit/comments_state.freezed.dart
index 58463106..c3b582ce 100644
--- a/lib/features/feed/presentation/bloc/comments_cubit/comments_state.freezed.dart
+++ b/lib/features/feed/presentation/bloc/comments_cubit/comments_state.freezed.dart
@@ -84,6 +84,9 @@ class _$CommentsStateCopyWithImpl<$Res, $Val extends CommentsState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
+
+ /// Create a copy of CommentsState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -100,6 +103,9 @@ class __$$CommentsStateImplCopyWithImpl<$Res>
__$$CommentsStateImplCopyWithImpl(
_$CommentsStateImpl _value, $Res Function(_$CommentsStateImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of CommentsState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -214,6 +220,9 @@ class __$$CommentsStateLoadingImplCopyWithImpl<$Res>
__$$CommentsStateLoadingImplCopyWithImpl(_$CommentsStateLoadingImpl _value,
$Res Function(_$CommentsStateLoadingImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of CommentsState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -334,6 +343,8 @@ class __$$CommentsStateLoadedImplCopyWithImpl<$Res>
$Res Function(_$CommentsStateLoadedImpl) _then)
: super(_value, _then);
+ /// Create a copy of CommentsState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$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
@pragma('vm:prefer-inline')
$CommentModelCopyWith<$Res> get comment {
@@ -388,7 +401,9 @@ class _$CommentsStateLoadedImpl implements CommentsStateLoaded {
@override
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
@pragma('vm:prefer-inline')
_$$CommentsStateLoadedImplCopyWith<_$CommentsStateLoadedImpl> get copyWith =>
@@ -477,7 +492,10 @@ abstract class CommentsStateLoaded implements CommentsState {
CommentModel get comment;
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 =>
throw _privateConstructorUsedError;
}
@@ -499,6 +517,8 @@ class __$$CommentsStateErrorImplCopyWithImpl<$Res>
$Res Function(_$CommentsStateErrorImpl) _then)
: super(_value, _then);
+ /// Create a copy of CommentsState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -538,7 +558,9 @@ class _$CommentsStateErrorImpl implements CommentsStateError {
@override
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
@pragma('vm:prefer-inline')
_$$CommentsStateErrorImplCopyWith<_$CommentsStateErrorImpl> get copyWith =>
@@ -625,7 +647,10 @@ abstract class CommentsStateError implements CommentsState {
_$CommentsStateErrorImpl;
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 =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/feed/presentation/bloc/diets_cubit/diets_state.freezed.dart b/lib/features/feed/presentation/bloc/diets_cubit/diets_state.freezed.dart
index adff30f5..dd30f73d 100644
--- a/lib/features/feed/presentation/bloc/diets_cubit/diets_state.freezed.dart
+++ b/lib/features/feed/presentation/bloc/diets_cubit/diets_state.freezed.dart
@@ -84,6 +84,9 @@ class _$DietsStateCopyWithImpl<$Res, $Val extends DietsState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
+
+ /// Create a copy of DietsState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -100,6 +103,9 @@ class __$$DietsStateImplCopyWithImpl<$Res>
__$$DietsStateImplCopyWithImpl(
_$DietsStateImpl _value, $Res Function(_$DietsStateImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of DietsState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -214,6 +220,9 @@ class __$$DietsStateLoadingImplCopyWithImpl<$Res>
__$$DietsStateLoadingImplCopyWithImpl(_$DietsStateLoadingImpl _value,
$Res Function(_$DietsStateLoadingImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of DietsState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -333,6 +342,8 @@ class __$$DietsStateLoadedImplCopyWithImpl<$Res>
$Res Function(_$DietsStateLoadedImpl) _then)
: super(_value, _then);
+ /// Create a copy of DietsState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$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
@pragma('vm:prefer-inline')
$DietsPaginationCopyWith<$Res> get diets {
@@ -379,7 +392,9 @@ class _$DietsStateLoadedImpl implements DietsStateLoaded {
@override
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
@pragma('vm:prefer-inline')
_$$DietsStateLoadedImplCopyWith<_$DietsStateLoadedImpl> get copyWith =>
@@ -466,7 +481,10 @@ abstract class DietsStateLoaded implements DietsState {
_$DietsStateLoadedImpl;
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 =>
throw _privateConstructorUsedError;
}
@@ -488,6 +506,8 @@ class __$$DietsStateErrorImplCopyWithImpl<$Res>
_$DietsStateErrorImpl _value, $Res Function(_$DietsStateErrorImpl) _then)
: super(_value, _then);
+ /// Create a copy of DietsState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -527,7 +547,9 @@ class _$DietsStateErrorImpl implements DietsStateError {
@override
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
@pragma('vm:prefer-inline')
_$$DietsStateErrorImplCopyWith<_$DietsStateErrorImpl> get copyWith =>
@@ -614,7 +636,10 @@ abstract class DietsStateError implements DietsState {
_$DietsStateErrorImpl;
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 =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/feed/presentation/bloc/feed_cubit/feed_state.freezed.dart b/lib/features/feed/presentation/bloc/feed_cubit/feed_state.freezed.dart
index 779dcdb5..70cb30d4 100644
--- a/lib/features/feed/presentation/bloc/feed_cubit/feed_state.freezed.dart
+++ b/lib/features/feed/presentation/bloc/feed_cubit/feed_state.freezed.dart
@@ -87,6 +87,9 @@ class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
+
+ /// Create a copy of FeedState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -103,6 +106,9 @@ class __$$FeedStateImplCopyWithImpl<$Res>
__$$FeedStateImplCopyWithImpl(
_$FeedStateImpl _value, $Res Function(_$FeedStateImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of FeedState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -221,6 +227,9 @@ class __$$FeedStateLoadingImplCopyWithImpl<$Res>
__$$FeedStateLoadingImplCopyWithImpl(_$FeedStateLoadingImpl _value,
$Res Function(_$FeedStateLoadingImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of FeedState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -342,6 +351,8 @@ class __$$FeedStateLoadedImplCopyWithImpl<$Res>
_$FeedStateLoadedImpl _value, $Res Function(_$FeedStateLoadedImpl) _then)
: super(_value, _then);
+ /// Create a copy of FeedState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -401,7 +412,9 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
int get hashCode => Object.hash(runtimeType,
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
@pragma('vm:prefer-inline')
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith =>
@@ -494,7 +507,10 @@ abstract class FeedStateLoaded implements FeedState {
List get feedBlogPostList;
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 =>
throw _privateConstructorUsedError;
}
@@ -516,6 +532,8 @@ class __$$FeedStateErrorImplCopyWithImpl<$Res>
_$FeedStateErrorImpl _value, $Res Function(_$FeedStateErrorImpl) _then)
: super(_value, _then);
+ /// Create a copy of FeedState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -555,7 +573,9 @@ class _$FeedStateErrorImpl implements FeedStateError {
@override
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
@pragma('vm:prefer-inline')
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith =>
@@ -646,7 +666,10 @@ abstract class FeedStateError implements FeedState {
_$FeedStateErrorImpl;
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 =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/feed/presentation/bloc/recipes_cubit/recipes_cubit.dart b/lib/features/feed/presentation/bloc/recipes_cubit/recipes_cubit.dart
index 75eb5b07..93bcf399 100644
--- a/lib/features/feed/presentation/bloc/recipes_cubit/recipes_cubit.dart
+++ b/lib/features/feed/presentation/bloc/recipes_cubit/recipes_cubit.dart
@@ -8,6 +8,10 @@ class RecipesCubit extends Cubit {
final FeedRepository feedRepository;
final RecipeRepository recipeRepository;
Set _selectedTags = {};
+ int currentPage = 1;
+ late int lastPage;
+ bool isLoading = false;
+ String? _query;
RecipesCubit({
required this.feedRepository,
@@ -18,6 +22,7 @@ class RecipesCubit extends Cubit {
String? query,
}) async {
try {
+ _query = query;
final recipesList = await feedRepository.getRecipes(
tags: _selectedTags.toList(),
query: query,
@@ -28,12 +33,42 @@ class RecipesCubit extends Cubit {
recipesTags: recipesTags,
selectedTags: _selectedTags,
selectedTagsCounter: _selectedTags.length,
+ isLoading: isLoading,
));
} catch (e) {
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) {
_selectedTags.contains(tag.id) ? _selectedTags.remove(tag.id) : _selectedTags.add(tag.id);
emit((state as RecipesStateLoaded).copyWith(
diff --git a/lib/features/feed/presentation/bloc/recipes_cubit/recipes_state.dart b/lib/features/feed/presentation/bloc/recipes_cubit/recipes_state.dart
index 1c2e7f23..dc6dcb66 100644
--- a/lib/features/feed/presentation/bloc/recipes_cubit/recipes_state.dart
+++ b/lib/features/feed/presentation/bloc/recipes_cubit/recipes_state.dart
@@ -15,6 +15,7 @@ abstract class RecipesState with _$RecipesState {
required List recipesTags,
required Set selectedTags,
required int selectedTagsCounter,
+ required bool isLoading,
}) = RecipesStateLoaded;
const factory RecipesState.error({
diff --git a/lib/features/feed/presentation/bloc/recipes_cubit/recipes_state.freezed.dart b/lib/features/feed/presentation/bloc/recipes_cubit/recipes_state.freezed.dart
index fc7fe0c6..34100adb 100644
--- a/lib/features/feed/presentation/bloc/recipes_cubit/recipes_state.freezed.dart
+++ b/lib/features/feed/presentation/bloc/recipes_cubit/recipes_state.freezed.dart
@@ -24,7 +24,8 @@ mixin _$RecipesState {
List recipesList,
List recipesTags,
Set selectedTags,
- int selectedTagsCounter)
+ int selectedTagsCounter,
+ bool isLoading)
loaded,
required TResult Function(String errorMessage) error,
}) =>
@@ -34,7 +35,7 @@ mixin _$RecipesState {
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(List recipesList, List recipesTags,
- Set selectedTags, int selectedTagsCounter)?
+ Set selectedTags, int selectedTagsCounter, bool isLoading)?
loaded,
TResult? Function(String errorMessage)? error,
}) =>
@@ -44,7 +45,7 @@ mixin _$RecipesState {
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(List recipesList, List recipesTags,
- Set selectedTags, int selectedTagsCounter)?
+ Set selectedTags, int selectedTagsCounter, bool isLoading)?
loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
@@ -93,6 +94,9 @@ class _$RecipesStateCopyWithImpl<$Res, $Val extends RecipesState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
+
+ /// Create a copy of RecipesState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -109,6 +113,9 @@ class __$$RecipesStateImplCopyWithImpl<$Res>
__$$RecipesStateImplCopyWithImpl(
_$RecipesStateImpl _value, $Res Function(_$RecipesStateImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of RecipesState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -139,7 +146,8 @@ class _$RecipesStateImpl implements _RecipesState {
List recipesList,
List recipesTags,
Set selectedTags,
- int selectedTagsCounter)
+ int selectedTagsCounter,
+ bool isLoading)
loaded,
required TResult Function(String errorMessage) error,
}) {
@@ -152,7 +160,7 @@ class _$RecipesStateImpl implements _RecipesState {
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(List recipesList, List recipesTags,
- Set selectedTags, int selectedTagsCounter)?
+ Set selectedTags, int selectedTagsCounter, bool isLoading)?
loaded,
TResult? Function(String errorMessage)? error,
}) {
@@ -165,7 +173,7 @@ class _$RecipesStateImpl implements _RecipesState {
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(List recipesList, List recipesTags,
- Set selectedTags, int selectedTagsCounter)?
+ Set selectedTags, int selectedTagsCounter, bool isLoading)?
loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
@@ -232,6 +240,9 @@ class __$$RecipesStateLoadingImplCopyWithImpl<$Res>
__$$RecipesStateLoadingImplCopyWithImpl(_$RecipesStateLoadingImpl _value,
$Res Function(_$RecipesStateLoadingImpl) _then)
: super(_value, _then);
+
+ /// Create a copy of RecipesState
+ /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -263,7 +274,8 @@ class _$RecipesStateLoadingImpl implements RecipesStateLoading {
List recipesList,
List recipesTags,
Set selectedTags,
- int selectedTagsCounter)
+ int selectedTagsCounter,
+ bool isLoading)
loaded,
required TResult Function(String errorMessage) error,
}) {
@@ -276,7 +288,7 @@ class _$RecipesStateLoadingImpl implements RecipesStateLoading {
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(List recipesList, List recipesTags,
- Set selectedTags, int selectedTagsCounter)?
+ Set selectedTags, int selectedTagsCounter, bool isLoading)?
loaded,
TResult? Function(String errorMessage)? error,
}) {
@@ -289,7 +301,7 @@ class _$RecipesStateLoadingImpl implements RecipesStateLoading {
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(List recipesList, List recipesTags,
- Set selectedTags, int selectedTagsCounter)?
+ Set selectedTags, int selectedTagsCounter, bool isLoading)?
loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
@@ -352,7 +364,8 @@ abstract class _$$RecipesStateLoadedImplCopyWith<$Res> {
{List recipesList,
List recipesTags,
Set selectedTags,
- int selectedTagsCounter});
+ int selectedTagsCounter,
+ bool isLoading});
}
/// @nodoc
@@ -363,6 +376,8 @@ class __$$RecipesStateLoadedImplCopyWithImpl<$Res>
$Res Function(_$RecipesStateLoadedImpl) _then)
: super(_value, _then);
+ /// Create a copy of RecipesState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -370,6 +385,7 @@ class __$$RecipesStateLoadedImplCopyWithImpl<$Res>
Object? recipesTags = null,
Object? selectedTags = null,
Object? selectedTagsCounter = null,
+ Object? isLoading = null,
}) {
return _then(_$RecipesStateLoadedImpl(
recipesList: null == recipesList
@@ -388,6 +404,10 @@ class __$$RecipesStateLoadedImplCopyWithImpl<$Res>
? _value.selectedTagsCounter
: selectedTagsCounter // ignore: cast_nullable_to_non_nullable
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 recipesList,
required final List recipesTags,
required final Set selectedTags,
- required this.selectedTagsCounter})
+ required this.selectedTagsCounter,
+ required this.isLoading})
: _recipesList = recipesList,
_recipesTags = recipesTags,
_selectedTags = selectedTags;
@@ -430,10 +451,12 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
@override
final int selectedTagsCounter;
+ @override
+ final bool isLoading;
@override
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
@@ -448,7 +471,9 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
const DeepCollectionEquality()
.equals(other._selectedTags, _selectedTags) &&
(identical(other.selectedTagsCounter, selectedTagsCounter) ||
- other.selectedTagsCounter == selectedTagsCounter));
+ other.selectedTagsCounter == selectedTagsCounter) &&
+ (identical(other.isLoading, isLoading) ||
+ other.isLoading == isLoading));
}
@override
@@ -457,9 +482,12 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
const DeepCollectionEquality().hash(_recipesList),
const DeepCollectionEquality().hash(_recipesTags),
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
@pragma('vm:prefer-inline')
_$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith =>
@@ -475,11 +503,13 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
List recipesList,
List recipesTags,
Set selectedTags,
- int selectedTagsCounter)
+ int selectedTagsCounter,
+ bool isLoading)
loaded,
required TResult Function(String errorMessage) error,
}) {
- return loaded(recipesList, recipesTags, selectedTags, selectedTagsCounter);
+ return loaded(
+ recipesList, recipesTags, selectedTags, selectedTagsCounter, isLoading);
}
@override
@@ -488,12 +518,12 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(List recipesList, List recipesTags,
- Set selectedTags, int selectedTagsCounter)?
+ Set selectedTags, int selectedTagsCounter, bool isLoading)?
loaded,
TResult? Function(String errorMessage)? error,
}) {
return loaded?.call(
- recipesList, recipesTags, selectedTags, selectedTagsCounter);
+ recipesList, recipesTags, selectedTags, selectedTagsCounter, isLoading);
}
@override
@@ -502,14 +532,14 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(List recipesList, List recipesTags,
- Set selectedTags, int selectedTagsCounter)?
+ Set selectedTags, int selectedTagsCounter, bool isLoading)?
loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
if (loaded != null) {
- return loaded(
- recipesList, recipesTags, selectedTags, selectedTagsCounter);
+ return loaded(recipesList, recipesTags, selectedTags, selectedTagsCounter,
+ isLoading);
}
return orElse();
}
@@ -557,13 +587,18 @@ abstract class RecipesStateLoaded implements RecipesState {
{required final List recipesList,
required final List recipesTags,
required final Set selectedTags,
- required final int selectedTagsCounter}) = _$RecipesStateLoadedImpl;
+ required final int selectedTagsCounter,
+ required final bool isLoading}) = _$RecipesStateLoadedImpl;
List get recipesList;
List get recipesTags;
Set get selectedTags;
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 =>
throw _privateConstructorUsedError;
}
@@ -585,6 +620,8 @@ class __$$RecipesStateErrorImplCopyWithImpl<$Res>
$Res Function(_$RecipesStateErrorImpl) _then)
: super(_value, _then);
+ /// Create a copy of RecipesState
+ /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -624,7 +661,9 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
@override
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
@pragma('vm:prefer-inline')
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith =>
@@ -640,7 +679,8 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
List recipesList,
List recipesTags,
Set selectedTags,
- int selectedTagsCounter)
+ int selectedTagsCounter,
+ bool isLoading)
loaded,
required TResult Function(String errorMessage) error,
}) {
@@ -653,7 +693,7 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(List recipesList, List recipesTags,
- Set selectedTags, int selectedTagsCounter)?
+ Set selectedTags, int selectedTagsCounter, bool isLoading)?
loaded,
TResult? Function(String errorMessage)? error,
}) {
@@ -666,7 +706,7 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(List recipesList, List recipesTags,
- Set selectedTags, int selectedTagsCounter)?
+ Set selectedTags, int selectedTagsCounter, bool isLoading)?
loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
@@ -720,7 +760,10 @@ abstract class RecipesStateError implements RecipesState {
_$RecipesStateErrorImpl;
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 =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/feed/presentation/pages/feed_screen.dart b/lib/features/feed/presentation/pages/feed_screen.dart
index 2200a6e6..e5f1afa6 100644
--- a/lib/features/feed/presentation/pages/feed_screen.dart
+++ b/lib/features/feed/presentation/pages/feed_screen.dart
@@ -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/tags_modal_widget.dart';
import 'package:eatvio_app/theme/theme_helper.dart';
-import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';
+final bucket = PageStorageBucket();
+
class FeedScreen extends StatefulWidget {
const FeedScreen({super.key});
@@ -32,11 +33,25 @@ class _FeedScreenState extends State {
@override
void initState() {
- blogPostsScrollController.addListener(_onScroll);
+ blogPostsScrollController.addListener(_onScrollBlogPosts);
+ recipesScrollController.addListener(_onScrollBlogRecipes);
+ dietsScrollController.addListener(_onScrollBlogDiets);
super.initState();
}
- _onScroll() {
+ _onScrollBlogPosts() {
+ if (blogPostsScrollController.offset >= blogPostsScrollController.position.maxScrollExtent && !blogPostsScrollController.position.outOfRange) {
+ context.read().loadNextPage();
+ }
+ }
+
+ _onScrollBlogRecipes() {
+ if (blogPostsScrollController.offset >= blogPostsScrollController.position.maxScrollExtent && !blogPostsScrollController.position.outOfRange) {
+ context.read().loadNextPage();
+ }
+ }
+
+ _onScrollBlogDiets() {
if (blogPostsScrollController.offset >= blogPostsScrollController.position.maxScrollExtent && !blogPostsScrollController.position.outOfRange) {
context.read().loadNextPage();
}
@@ -45,6 +60,8 @@ class _FeedScreenState extends State {
@override
void dispose() {
blogPostsScrollController.dispose();
+ recipesScrollController.dispose();
+ dietsScrollController.dispose();
super.dispose();
}
@@ -89,7 +106,11 @@ class _FeedScreenState extends State {
),
backgroundColor: Colors.grey.shade200,
body: NestedScrollView(
- controller: blogPostsScrollController,
+ controller: _selectedChipIndex == 0
+ ? blogPostsScrollController
+ : _selectedChipIndex == 1
+ ? recipesScrollController
+ : dietsScrollController,
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
return [
SliverAppBar(
@@ -139,10 +160,10 @@ class _FeedScreenState extends State {
return ListView.separated(
padding: EdgeInsets.symmetric(vertical: 8),
shrinkWrap: true,
- physics: NeverScrollableScrollPhysics(),
+ physics: BouncingScrollPhysics(),
itemBuilder: (context, index) {
if (index == state.feedBlogPostList.length) {
- return CupertinoActivityIndicator();
+ return CircularProgressIndicator();
}
return BlogPostWidget(feedBlogPostModel: state.feedBlogPostList[index]);
},
@@ -165,7 +186,7 @@ class _FeedScreenState extends State {
return Scaffold(
backgroundColor: Colors.grey.shade200,
body: Center(
- child: CupertinoActivityIndicator(),
+ child: CircularProgressIndicator(),
),
);
}
@@ -206,7 +227,7 @@ class _FeedScreenState extends State {
return Scaffold(
backgroundColor: Colors.grey.shade200,
body: Center(
- child: CupertinoActivityIndicator(),
+ child: CircularProgressIndicator(),
),
);
}
@@ -247,7 +268,7 @@ class _FeedScreenState extends State {
return Scaffold(
backgroundColor: Colors.grey.shade200,
body: Center(
- child: CupertinoActivityIndicator(),
+ child: CircularProgressIndicator(),
),
);
}
@@ -319,6 +340,7 @@ class _FeedScreenState extends State {
switch (_selectedChipIndex) {
case 1:
context.read().loadRecipesList(query: query);
+ break;
}
},
);
diff --git a/lib/features/feed/repositories/feed_repository.dart b/lib/features/feed/repositories/feed_repository.dart
index 1696d948..e90f2680 100644
--- a/lib/features/feed/repositories/feed_repository.dart
+++ b/lib/features/feed/repositories/feed_repository.dart
@@ -11,7 +11,7 @@ class FeedRepository {
Future getFeedBlogPosts({int page = 1}) async {
try {
- return (await feedService.getBlocPostList(page: page));
+ return (await feedService.getBlogPostList(page: page));
} catch (e) {
rethrow;
}
@@ -20,11 +20,13 @@ class FeedRepository {
Future> getRecipes({
String? query,
List? tags,
+ int page = 1
}) async {
try {
return (await feedService.getRecipes(
query: query,
tags: tags,
+ page: page,
))
.recipesList;
} catch (e) {
@@ -32,9 +34,9 @@ class FeedRepository {
}
}
- Future getDiets() async {
+ Future getDiets({int page = 1}) async {
try {
- return (await feedService.getDiets());
+ return (await feedService.getDiets(page: page));
} catch (e) {
rethrow;
}
diff --git a/lib/features/feed/services/feed_service.dart b/lib/features/feed/services/feed_service.dart
index 8a75d44f..db211b26 100644
--- a/lib/features/feed/services/feed_service.dart
+++ b/lib/features/feed/services/feed_service.dart
@@ -12,18 +12,21 @@ abstract class FeedService {
factory FeedService(Dio dio, {String baseUrl}) = _FeedService;
@GET('/api/blogPosts/index?page={page}')
- Future getBlocPostList({
+ Future getBlogPostList({
@Path() required int page,
});
@GET('/api/recipes/index')
Future getRecipes({
+ @Path() required int page,
@Query('filters[tags][tags.id][\$in][]') required List? tags,
@Query('filters[title][\$contains]') required String? query,
});
@GET('/api/diets/index')
- Future getDiets();
+ Future getDiets({
+ @Path() required int page,
+ });
@GET('/api/blogPosts/{id}/comments/show')
Future getBlogPostComments({
diff --git a/lib/features/feed/services/feed_service.g.dart b/lib/features/feed/services/feed_service.g.dart
index bc3f08f1..3f513034 100644
--- a/lib/features/feed/services/feed_service.g.dart
+++ b/lib/features/feed/services/feed_service.g.dart
@@ -22,7 +22,7 @@ class _FeedService implements FeedService {
final ParseErrorLogger? errorLogger;
@override
- Future getBlocPostList({required int page}) async {
+ Future getBlogPostList({required int page}) async {
final _extra = {};
final queryParameters = {};
final _headers = {};
@@ -56,6 +56,7 @@ class _FeedService implements FeedService {
@override
Future getRecipes({
+ required int page,
List? tags,
String? query,
}) async {
@@ -95,7 +96,7 @@ class _FeedService implements FeedService {
}
@override
- Future getDiets() async {
+ Future getDiets({required int page}) async {
final _extra = {};
final queryParameters = {};
final _headers = {};
diff --git a/lib/features/profile/models/profile_model.dart b/lib/features/profile/models/profile_model.dart
index b6e47d6a..d209e6d7 100644
--- a/lib/features/profile/models/profile_model.dart
+++ b/lib/features/profile/models/profile_model.dart
@@ -1,110 +1,57 @@
import 'package:freezed_annotation/freezed_annotation.dart';
+
part 'profile_model.freezed.dart';
+
part 'profile_model.g.dart';
@freezed
class ProfileModel with _$ProfileModel {
const factory ProfileModel({
- @JsonKey(name: "user") required User user,
- @JsonKey(name: "chartPoints") required List chartPoints,
- @JsonKey(name: "userDetails") required UserDetails userDetails,
- @JsonKey(name: "circumferences") required List circumferences,
- @JsonKey(name: "finishedPlans") required List finishedPlans,
- @JsonKey(name: "rejectedPlans") required List rejectedPlans,
- @JsonKey(name: "startedPlan") required List startedPlan,
- @JsonKey(name: "paidPlan") required List paidPlan,
- @JsonKey(name: "requestedPlan") required List requestedPlan,
- @JsonKey(name: "initedPlan") required List initedPlan,
+ @JsonKey(name: "id") required int id,
+ @JsonKey(name: "name") required String name,
+ @JsonKey(name: "email") required String email,
+ @JsonKey(name: "email_verified_at") DateTime? emailVerifiedAt,
+ @JsonKey(name: "created_at") DateTime? createdAt,
+ @JsonKey(name: "updated_at") DateTime? updatedAt,
+ @JsonKey(name: "is_public_profile") required bool isPublicProfile,
+ @JsonKey(name: "slug") required String slug,
+ @JsonKey(name: "profile_photo_url") required String profilePhotoUrl,
}) = _ProfileModel;
factory ProfileModel.fromJson(Map json) => _$ProfileModelFromJson(json);
}
@freezed
-class Circumference with _$Circumference {
- const factory Circumference({
- @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 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 json) => _$UserFromJson(json);
-}
-
-@freezed
-class UserDetails with _$UserDetails {
- const factory UserDetails({
- @JsonKey(name: "id") required int id,
- @JsonKey(name: "user_id") required int userId,
+class ProfileDetailsModel with _$ProfileDetailsModel {
+ const factory ProfileDetailsModel({
@JsonKey(name: "first_name") required String firstName,
@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: "country") required String country,
@JsonKey(name: "city") required String city,
@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: "chest_circumference") required int chestCircumference,
@JsonKey(name: "waist_circumference") required int waistCircumference,
@JsonKey(name: "hip_circumference") required int hipCircumference,
@JsonKey(name: "blood_pressure_up") required int bloodPressureUp,
@JsonKey(name: "blood_pressure_down") required int bloodPressureDown,
- @JsonKey(name: "has_hypo") required int hasHypo,
- @JsonKey(name: "has_hyper") required int hasHyper,
+ @JsonKey(name: "has_hypo") required bool hasHypo,
+ @JsonKey(name: "has_hyper") required bool hasHyper,
@JsonKey(name: "about_alergy") required String aboutAlergy,
@JsonKey(name: "about_taking_pils") required String aboutTakingPils,
@JsonKey(name: "about_sport_hobbies") required String aboutSportHobbies,
@JsonKey(name: "favorite_foods") required String favoriteFoods,
@JsonKey(name: "unfavorite_foods") required String unfavoriteFoods,
@JsonKey(name: "additional_info") required String additionalInfo,
- @JsonKey(name: "created_at") required DateTime createdAt,
- @JsonKey(name: "updated_at") required DateTime updatedAt,
- @JsonKey(name: "is_mood_fillable") required int isMoodFillable,
- @JsonKey(name: "is_bedtime_fillable") required int isBedtimeFillable,
+ @JsonKey(name: "created_at") DateTime? createdAt,
+ @JsonKey(name: "updated_at") DateTime? updatedAt,
+ @JsonKey(name: "is_mood_fillable") required bool isMoodFillable,
+ @JsonKey(name: "is_bedtime_fillable") required bool isBedtimeFillable,
@JsonKey(name: "activity_coefficient") required double activityCoefficient,
- }) = _UserDetails;
+ }) = _ProfileDetailsModel;
- factory UserDetails.fromJson(Map json) => _$UserDetailsFromJson(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 json) => _$ChartPointModelFromJson(json);
+ factory ProfileDetailsModel.fromJson(Map json) => _$ProfileDetailsModelFromJson(json);
}
diff --git a/lib/features/profile/models/profile_model.freezed.dart b/lib/features/profile/models/profile_model.freezed.dart
index da499a03..94b860a3 100644
--- a/lib/features/profile/models/profile_model.freezed.dart
+++ b/lib/features/profile/models/profile_model.freezed.dart
@@ -20,29 +20,31 @@ ProfileModel _$ProfileModelFromJson(Map json) {
/// @nodoc
mixin _$ProfileModel {
- @JsonKey(name: "user")
- User get user => throw _privateConstructorUsedError;
- @JsonKey(name: "chartPoints")
- List get chartPoints => throw _privateConstructorUsedError;
- @JsonKey(name: "userDetails")
- UserDetails get userDetails => throw _privateConstructorUsedError;
- @JsonKey(name: "circumferences")
- List get circumferences => throw _privateConstructorUsedError;
- @JsonKey(name: "finishedPlans")
- List get finishedPlans => throw _privateConstructorUsedError;
- @JsonKey(name: "rejectedPlans")
- List get rejectedPlans => throw _privateConstructorUsedError;
- @JsonKey(name: "startedPlan")
- List get startedPlan => throw _privateConstructorUsedError;
- @JsonKey(name: "paidPlan")
- List get paidPlan => throw _privateConstructorUsedError;
- @JsonKey(name: "requestedPlan")
- List get requestedPlan => throw _privateConstructorUsedError;
- @JsonKey(name: "initedPlan")
- List get initedPlan => throw _privateConstructorUsedError;
+ @JsonKey(name: "id")
+ int get id => throw _privateConstructorUsedError;
+ @JsonKey(name: "name")
+ String get name => throw _privateConstructorUsedError;
+ @JsonKey(name: "email")
+ String get email => throw _privateConstructorUsedError;
+ @JsonKey(name: "email_verified_at")
+ DateTime? get emailVerifiedAt => throw _privateConstructorUsedError;
+ @JsonKey(name: "created_at")
+ DateTime? get createdAt => throw _privateConstructorUsedError;
+ @JsonKey(name: "updated_at")
+ DateTime? get updatedAt => throw _privateConstructorUsedError;
+ @JsonKey(name: "is_public_profile")
+ bool get isPublicProfile => throw _privateConstructorUsedError;
+ @JsonKey(name: "slug")
+ String get slug => throw _privateConstructorUsedError;
+ @JsonKey(name: "profile_photo_url")
+ String get profilePhotoUrl => throw _privateConstructorUsedError;
+ /// Serializes this ProfileModel to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
- @JsonKey(ignore: true)
+
+ /// Create a copy of ProfileModel
+ /// with the given fields replaced by the non-null parameter values.
+ @JsonKey(includeFromJson: false, includeToJson: false)
$ProfileModelCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -54,19 +56,15 @@ abstract class $ProfileModelCopyWith<$Res> {
_$ProfileModelCopyWithImpl<$Res, ProfileModel>;
@useResult
$Res call(
- {@JsonKey(name: "user") User user,
- @JsonKey(name: "chartPoints") List