forked from eatvio/eatvio_app
feat(feed): add comments to recipes and diets
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import UIKit
|
||||
import Flutter
|
||||
|
||||
@UIApplicationMain
|
||||
@main
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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<SelectionPopupModel> 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;
|
||||
}
|
||||
|
||||
@@ -68,8 +68,12 @@ mixin _$UserRegistrationSheet {
|
||||
@JsonKey(name: 'activity_coefficient')
|
||||
double get activityCoefficient => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this UserRegistrationSheet to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of UserRegistrationSheet
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$UserRegistrationSheetCopyWith<UserRegistrationSheet> get copyWith =>
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -84,6 +84,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
|
||||
@@ -100,6 +103,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
|
||||
@@ -217,6 +223,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
|
||||
@@ -338,6 +347,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({
|
||||
@@ -377,7 +388,9 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, 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>
|
||||
@@ -464,7 +477,10 @@ abstract class NotificationsStateLoaded implements NotificationsState {
|
||||
{required final int notificationsCount}) = _$NotificationsStateLoadedImpl;
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -489,6 +505,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({
|
||||
@@ -528,7 +546,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>
|
||||
@@ -615,7 +635,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;
|
||||
}
|
||||
|
||||
@@ -25,8 +25,12 @@ mixin _$CalendarModel {
|
||||
throw _privateConstructorUsedError;
|
||||
Object? get diary => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this CalendarModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of CalendarModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$CalendarModelCopyWith<CalendarModel> get copyWith =>
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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<CalendarModel> get calendarList;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of CalendarState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$CalendarStateLoadedImplCopyWith<_$CalendarStateLoadedImpl> get copyWith =>
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -29,8 +29,12 @@ mixin _$ChatMessageModel {
|
||||
@JsonKey(name: 'updated_at')
|
||||
String get updatedAt => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ChatMessageModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of ChatMessageModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatMessageModelCopyWith<ChatMessageModel> get copyWith =>
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -24,8 +24,12 @@ mixin _$ChatMessagesModel {
|
||||
List<ChatMessageModel> get messagesList => throw _privateConstructorUsedError;
|
||||
ChatMetaModel get meta => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ChatMessagesModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of ChatMessagesModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatMessagesModelCopyWith<ChatMessagesModel> get copyWith =>
|
||||
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<ChatMessageModel> 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;
|
||||
}
|
||||
|
||||
@@ -23,8 +23,12 @@ mixin _$ChatMetaModel {
|
||||
@JsonKey(name: "last_page")
|
||||
int get lastPage => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ChatMetaModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of ChatMetaModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatMetaModelCopyWith<ChatMetaModel> get copyWith =>
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -26,8 +26,12 @@ mixin _$ChatRoomModel {
|
||||
throw _privateConstructorUsedError;
|
||||
Map<String, ChatUserModel> get users => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ChatRoomModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of ChatRoomModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatRoomModelCopyWith<ChatRoomModel> get copyWith =>
|
||||
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<String, ChatUserModel> 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;
|
||||
}
|
||||
|
||||
@@ -23,8 +23,12 @@ mixin _$ChatRoomPreviewModel {
|
||||
@JsonKey(name: "chatRooms")
|
||||
List<ChatRoom> get chatRooms => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ChatRoomPreviewModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of ChatRoomPreviewModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatRoomPreviewModelCopyWith<ChatRoomPreviewModel> get copyWith =>
|
||||
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<ChatRoom> 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<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of ChatRoom
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatRoomCopyWith<ChatRoom> get copyWith =>
|
||||
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<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of LastMessageClass
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$LastMessageClassCopyWith<LastMessageClass> get copyWith =>
|
||||
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<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Users
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$UsersCopyWith<Users> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -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<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of ChatUser
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatUserCopyWith<ChatUser> get copyWith =>
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -30,8 +30,12 @@ mixin _$ChatRoomSettingsModel {
|
||||
@JsonKey(name: 'updated_at')
|
||||
String get updatedAt => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ChatRoomSettingsModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of ChatRoomSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatRoomSettingsModelCopyWith<ChatRoomSettingsModel> get copyWith =>
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -27,8 +27,12 @@ mixin _$ChatUserModel {
|
||||
@JsonKey(name: 'profile_photo_url')
|
||||
String? get profilePhotoUrl => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ChatUserModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of ChatUserModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatUserModelCopyWith<ChatUserModel> get copyWith =>
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -27,8 +27,12 @@ mixin _$WebsocketInfoModel {
|
||||
@JsonKey(name: 'user_id')
|
||||
int get userId => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this WebsocketInfoModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of WebsocketInfoModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$WebsocketInfoModelCopyWith<WebsocketInfoModel> get copyWith =>
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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<ChatMessageModel> 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;
|
||||
}
|
||||
|
||||
@@ -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<ChatRoom> chatRooms}) = _$ChatSelectStateLoadedImpl;
|
||||
|
||||
List<ChatRoom> get chatRooms;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of ChatSelectState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ChatSelectStateLoadedImplCopyWith<_$ChatSelectStateLoadedImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -29,8 +29,12 @@ mixin _$DiaryModel {
|
||||
DateTime? get wakeup => throw _privateConstructorUsedError;
|
||||
DateTime? get retire => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this DiaryModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of DiaryModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$DiaryModelCopyWith<DiaryModel> get copyWith =>
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -28,8 +28,12 @@ mixin _$Meal {
|
||||
List<Portion> get portions => throw _privateConstructorUsedError;
|
||||
List<Photo> get photos => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Meal to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Meal
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$MealCopyWith<Meal> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -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<Portion> get portions;
|
||||
@override
|
||||
List<Photo> 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;
|
||||
}
|
||||
|
||||
@@ -25,8 +25,12 @@ mixin _$Photo {
|
||||
String get originalName => throw _privateConstructorUsedError;
|
||||
String get path => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Photo to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Photo
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$PhotoCopyWith<Photo> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Portion
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$PortionCopyWith<Portion> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -23,8 +23,12 @@ mixin _$Product {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Product to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Product
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ProductCopyWith<Product> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of State
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$StateCopyWith<State> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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<NutritionData>? get chartDataCounted;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith =>
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -18,9 +18,8 @@ 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';
|
||||
// import 'package:syncfusion_flutter_charts/charts.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class DiaryScreen extends StatelessWidget {
|
||||
final String? diaryID;
|
||||
|
||||
@@ -137,29 +136,30 @@ class DiaryScreen extends StatelessWidget {
|
||||
Text(
|
||||
"от дневной суточной нормы",
|
||||
),
|
||||
Transform.rotate(
|
||||
angle: -1.5708,
|
||||
child: ClipRect(
|
||||
child: Align(
|
||||
alignment: Alignment.centerRight,
|
||||
widthFactor: 0.5,
|
||||
child: SfCircularChart(
|
||||
series: <CircularSeries>[
|
||||
RadialBarSeries<NutritionData, String>(
|
||||
dataSource: state.chartDataCounted,
|
||||
xValueMapper: (NutritionData data, _) => data.category,
|
||||
yValueMapper: (NutritionData data, _) => data.nutrition,
|
||||
pointColorMapper: (NutritionData data, _) => data.color,
|
||||
trackColor: Color.fromRGBO(59, 130, 246, 1),
|
||||
trackOpacity: 0.1,
|
||||
gap: "8%",
|
||||
radius: "110%",
|
||||
innerRadius: '20%', // Измените значение по вашему усмотрению
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
)),
|
||||
// Transform.rotate(
|
||||
// angle: -1.5708,
|
||||
// child: ClipRect(
|
||||
// child: Align(
|
||||
// alignment: Alignment.centerRight,
|
||||
// widthFactor: 0.5,
|
||||
// child: SfCircularChart(
|
||||
// series: <CircularSeries>[
|
||||
// RadialBarSeries<NutritionData, String>(
|
||||
// dataSource: state.chartDataCounted,
|
||||
// xValueMapper: (NutritionData data, _) => data.category,
|
||||
// yValueMapper: (NutritionData data, _) => data.nutrition,
|
||||
// pointColorMapper: (NutritionData data, _) => data.color,
|
||||
// trackColor: Color.fromRGBO(59, 130, 246, 1),
|
||||
// trackOpacity: 0.1,
|
||||
// gap: "8%",
|
||||
// radius: "110%",
|
||||
// innerRadius: '20%', // Измените значение по вашему усмотрению
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/core/constants/constants.dart';
|
||||
import 'package:eatvio_app/features/feed/models/diets_pagination_model.dart';
|
||||
import 'package:eatvio_app/features/feed/models/comment_model.dart';
|
||||
import 'package:eatvio_app/features/feed/models/diets_pagination_model.dart' as Diets;
|
||||
import 'package:eatvio_app/features/feed/presentation/bloc/comments_cubit/comments_cubit.dart';
|
||||
import 'package:eatvio_app/features/feed/presentation/bloc/comments_cubit/comments_state.dart';
|
||||
import 'package:eatvio_app/locator_service.dart';
|
||||
import 'package:eatvio_app/theme/theme_helper.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
class AboutDietScreen extends StatefulWidget {
|
||||
final Datum datum;
|
||||
final Diets.Datum datum;
|
||||
late final List<int> selectedIndexes;
|
||||
|
||||
AboutDietScreen({super.key, required this.datum}) {
|
||||
@@ -18,140 +26,322 @@ class AboutDietScreen extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _AboutDietScreenState extends State<AboutDietScreen> {
|
||||
final CommentsCubit commentsCubit = sl<CommentsCubit>();
|
||||
int? replyId;
|
||||
final textEditingController = TextEditingController();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
commentsCubit.getDietsComments(widget.datum.id);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
|
||||
floatingActionButton: SizedBox(
|
||||
width: MediaQuery.of(context).size.width - 32,
|
||||
child: FloatingActionButton.extended(
|
||||
heroTag: 'nextButtonRegistration',
|
||||
highlightElevation: 0,
|
||||
elevation: 0,
|
||||
focusElevation: 0,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
backgroundColor: appTheme.greenA700,
|
||||
onPressed: () {},
|
||||
label: Text(
|
||||
'Начать диету',
|
||||
style: theme.textTheme.titleSmall,
|
||||
),
|
||||
),
|
||||
),
|
||||
appBar: AppBar(
|
||||
actions: [
|
||||
InkWell(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
onTap: () => GoRouter.of(context).pushNamed('profileScreen', extra: widget.datum.author),
|
||||
child: Ink(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
return BlocProvider<CommentsCubit>(
|
||||
create: (BuildContext context) => commentsCubit,
|
||||
child: BlocBuilder<CommentsCubit, CommentsState>(
|
||||
builder: (BuildContext context, CommentsState state) {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: true,
|
||||
bottomSheet: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 12) + (Platform.isIOS ? const EdgeInsets.only(bottom: 16) : EdgeInsets.zero),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
color: Colors.black.withOpacity(0.1),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
maxRadius: 16,
|
||||
minRadius: 16,
|
||||
backgroundImage: NetworkImage(widget.datum.author.authorProfileIcon),
|
||||
),
|
||||
SizedBox(height: 4),
|
||||
Text(
|
||||
widget.datum.author.authorName,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1,
|
||||
SizedBox(
|
||||
width: MediaQuery.of(context).size.width - 24,
|
||||
child: FloatingActionButton.extended(
|
||||
heroTag: 'nextButtonRegistration',
|
||||
highlightElevation: 0,
|
||||
elevation: 0,
|
||||
focusElevation: 0,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
backgroundColor: appTheme.greenA700,
|
||||
onPressed: () {},
|
||||
label: Text(
|
||||
'Начать диету',
|
||||
style: theme.textTheme.titleSmall,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
if (replyId != null)
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
replyId = null;
|
||||
textEditingController.clear();
|
||||
});
|
||||
FocusManager.instance.primaryFocus?.unfocus();
|
||||
},
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.blueA400,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
height: 32,
|
||||
width: 32,
|
||||
child: Icon(
|
||||
Icons.close_rounded,
|
||||
size: 18,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (replyId != null) SizedBox(width: 8),
|
||||
SizedBox(
|
||||
width: MediaQuery.of(context).size.width - (replyId == null ? 64 : 104),
|
||||
child: TextFormField(
|
||||
onChanged: (_) {
|
||||
setState(() {});
|
||||
},
|
||||
controller: textEditingController,
|
||||
maxLines: 5,
|
||||
minLines: 1,
|
||||
keyboardType: TextInputType.multiline,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Colors.black,
|
||||
height: 1,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
contentPadding: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
hintText: 'Комментарий',
|
||||
hintStyle: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1,
|
||||
color: Color(0xFFAEAEB2),
|
||||
),
|
||||
filled: true,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
borderSide: BorderSide(
|
||||
color: Color(0xFFD1D1D6),
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
borderSide: BorderSide(
|
||||
color: Color(0xFFD1D1D6),
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
borderSide: BorderSide(
|
||||
color: Color(0xFFD1D1D6),
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
if (textEditingController.text.length > 2) {
|
||||
commentsCubit.sendDietsComment(
|
||||
id: widget.datum.id,
|
||||
commentText: textEditingController.text,
|
||||
parentCommentId: replyId,
|
||||
);
|
||||
setState(() {
|
||||
textEditingController.clear();
|
||||
replyId = null;
|
||||
});
|
||||
FocusManager.instance.primaryFocus?.unfocus();
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: textEditingController.text.length > 2 ? appTheme.blueA400 : Colors.grey,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
height: 32,
|
||||
width: 32,
|
||||
child: Icon(
|
||||
Icons.send_rounded,
|
||||
size: 18,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
padding: EdgeInsets.only(bottom: 80),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
widget.datum.name,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.w500,
|
||||
height: 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(Icons.timer_outlined),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
widget.datum.duration.toString() + ' дней',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1,
|
||||
// floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
|
||||
// floatingActionButton: SizedBox(
|
||||
// width: MediaQuery.of(context).size.width - 32,
|
||||
// child: FloatingActionButton.extended(
|
||||
// heroTag: 'nextButtonRegistration',
|
||||
// highlightElevation: 0,
|
||||
// elevation: 0,
|
||||
// focusElevation: 0,
|
||||
// shape: RoundedRectangleBorder(
|
||||
// borderRadius: BorderRadius.circular(16),
|
||||
// ),
|
||||
// backgroundColor: appTheme.greenA700,
|
||||
// onPressed: () {},
|
||||
// label: Text(
|
||||
// 'Начать диету',
|
||||
// style: theme.textTheme.titleSmall,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
appBar: AppBar(
|
||||
actions: [
|
||||
InkWell(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
onTap: () => GoRouter.of(context).pushNamed('profileScreen', extra: widget.datum.author),
|
||||
child: Ink(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
maxRadius: 16,
|
||||
minRadius: 16,
|
||||
backgroundImage: NetworkImage(widget.datum.author.authorProfileIcon),
|
||||
),
|
||||
SizedBox(height: 4),
|
||||
Text(
|
||||
widget.datum.author.authorName,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
padding: EdgeInsets.only(bottom: 160),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
widget.datum.name,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.w500,
|
||||
height: 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(Icons.timer_outlined),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
widget.datum.duration.toString() + ' дней',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
widget.datum.details,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1.2,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
CachedNetworkImage(
|
||||
imageUrl: baseUrl + '/storage/' + widget.datum.image,
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
ListView.separated(
|
||||
padding: EdgeInsets.all(16),
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context, index) {
|
||||
return _dayOfPlan(widget.datum.dailySchedule[index], index);
|
||||
},
|
||||
separatorBuilder: (context, index) => Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
child: Container(
|
||||
height: 0.4,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
),
|
||||
),
|
||||
itemCount: widget.datum.dailySchedule.length,
|
||||
),
|
||||
SizedBox(height: 32),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
widget.datum.totalComments.toString() + ' КОММЕНТАРИЕВ',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: appTheme.gray500,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
if (state is CommentsStateLoading)
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(32),
|
||||
child: CupertinoActivityIndicator(),
|
||||
),
|
||||
if (state is CommentsStateLoaded) _buildComments(state.comment),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
widget.datum.details,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1.2,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
CachedNetworkImage(
|
||||
imageUrl: baseUrl + '/storage/' + widget.datum.image,
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
ListView.separated(
|
||||
padding: EdgeInsets.all(16),
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context, index) {
|
||||
return _dayOfPlan(widget.datum.dailySchedule[index], index);
|
||||
},
|
||||
separatorBuilder: (context, index) => Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
child: Container(
|
||||
height: 0.4,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
),
|
||||
),
|
||||
itemCount: widget.datum.dailySchedule.length,
|
||||
),
|
||||
SizedBox(height: 32),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
_dayOfPlan(List<List<DailySchedule>> day, int dayNumber) {
|
||||
_dayOfPlan(List<List<Diets.DailySchedule>> day, int dayNumber) {
|
||||
_choiceChipWidget(int index) {
|
||||
return ChoiceChip(
|
||||
selectedColor: appTheme.blueA400,
|
||||
@@ -222,7 +412,7 @@ class _AboutDietScreenState extends State<AboutDietScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
_daily(DailySchedule daily) {
|
||||
_daily(Diets.DailySchedule daily) {
|
||||
return Row(
|
||||
children: [
|
||||
Text(
|
||||
@@ -247,4 +437,101 @@ class _AboutDietScreenState extends State<AboutDietScreen> {
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
_buildComments(Comment comment) {
|
||||
return Column(
|
||||
children: [
|
||||
for (int i = 0; i < comment.data.length; i++) ...[
|
||||
_comment(comment.data[i]),
|
||||
if (comment.data[i].childrenComments.isNotEmpty)
|
||||
for (int j = 0; j < comment.data[i].childrenComments.length; j++)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 40),
|
||||
child: _comment(
|
||||
comment.data[i].childrenComments[j],
|
||||
12,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
],
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
_comment(Datum datum, [double radius = 16]) {
|
||||
return Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
decoration: BoxDecoration(
|
||||
color: replyId == datum.id ? appTheme.blueA400.withOpacity(0.1) : Colors.white,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
foregroundImage: NetworkImage(datum.authorProfileIcon),
|
||||
radius: radius,
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
datum.authorName,
|
||||
style: TextStyle(
|
||||
height: 1,
|
||||
color: Colors.grey.shade600,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
datum.body,
|
||||
style: TextStyle(
|
||||
height: 1,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 4),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
'99 августа',
|
||||
// datum.createdAt.format('dd MMMM', 'ru'),
|
||||
style: TextStyle(
|
||||
color: Colors.grey.shade600,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 16),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
replyId = datum.id;
|
||||
});
|
||||
},
|
||||
child: Text(
|
||||
'Ответить',
|
||||
style: TextStyle(
|
||||
height: 1,
|
||||
fontSize: 12,
|
||||
color: Colors.grey.shade800,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,8 +27,12 @@ mixin _$Comment {
|
||||
@JsonKey(name: "meta")
|
||||
Meta get meta => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Comment to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Comment
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$CommentCopyWith<Comment> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -56,6 +60,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({
|
||||
@@ -79,6 +85,8 @@ class _$CommentCopyWithImpl<$Res, $Val extends Comment>
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
/// Create a copy of Comment
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$LinksCopyWith<$Res> get links {
|
||||
@@ -87,6 +95,8 @@ class _$CommentCopyWithImpl<$Res, $Val extends Comment>
|
||||
});
|
||||
}
|
||||
|
||||
/// Create a copy of Comment
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$MetaCopyWith<$Res> get meta {
|
||||
@@ -122,6 +132,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({
|
||||
@@ -189,12 +201,14 @@ class _$CommentImpl implements _Comment {
|
||||
(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 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 =>
|
||||
@@ -225,8 +239,11 @@ abstract class _Comment implements Comment {
|
||||
@override
|
||||
@JsonKey(name: "meta")
|
||||
Meta get meta;
|
||||
|
||||
/// 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;
|
||||
}
|
||||
@@ -248,8 +265,12 @@ mixin _$Datum {
|
||||
@JsonKey(name: "children_comments")
|
||||
List<Datum> get childrenComments => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Datum to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Datum
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$DatumCopyWith<Datum> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -276,6 +297,8 @@ class _$DatumCopyWithImpl<$Res, $Val extends Datum>
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of Datum
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -333,6 +356,8 @@ class __$$DatumImplCopyWithImpl<$Res>
|
||||
_$DatumImpl _value, $Res Function(_$DatumImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Datum
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -424,7 +449,7 @@ class _$DatumImpl implements _Datum {
|
||||
.equals(other._childrenComments, _childrenComments));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
@@ -434,7 +459,9 @@ class _$DatumImpl implements _Datum {
|
||||
body,
|
||||
const DeepCollectionEquality().hash(_childrenComments));
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of Datum
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DatumImplCopyWith<_$DatumImpl> get copyWith =>
|
||||
@@ -475,8 +502,11 @@ abstract class _Datum implements Datum {
|
||||
@override
|
||||
@JsonKey(name: "children_comments")
|
||||
List<Datum> get childrenComments;
|
||||
|
||||
/// Create a copy of Datum
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DatumImplCopyWith<_$DatumImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -496,8 +526,12 @@ mixin _$Links {
|
||||
@JsonKey(name: "next")
|
||||
dynamic get next => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Links to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Links
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$LinksCopyWith<Links> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -523,6 +557,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({
|
||||
@@ -574,6 +610,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({
|
||||
@@ -644,7 +682,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,
|
||||
@@ -653,7 +691,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 =>
|
||||
@@ -688,8 +728,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;
|
||||
}
|
||||
@@ -717,8 +760,12 @@ mixin _$Meta {
|
||||
@JsonKey(name: "total")
|
||||
int get total => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Meta to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Meta
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$MetaCopyWith<Meta> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -748,6 +795,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({
|
||||
@@ -822,6 +871,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({
|
||||
@@ -941,12 +992,14 @@ 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, currentPage, from, lastPage,
|
||||
const DeepCollectionEquality().hash(_links), path, perPage, 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 =>
|
||||
@@ -997,8 +1050,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;
|
||||
}
|
||||
@@ -1016,8 +1072,12 @@ mixin _$Link {
|
||||
@JsonKey(name: "active")
|
||||
bool get active => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Link to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Link
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$LinkCopyWith<Link> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -1042,6 +1102,8 @@ 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({
|
||||
@@ -1086,6 +1148,8 @@ 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({
|
||||
@@ -1146,11 +1210,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 =>
|
||||
@@ -1181,8 +1247,11 @@ abstract class _Link implements Link {
|
||||
@override
|
||||
@JsonKey(name: "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;
|
||||
}
|
||||
|
||||
@@ -27,8 +27,12 @@ mixin _$DietsPagination {
|
||||
@JsonKey(name: "meta")
|
||||
Meta get meta => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this DietsPagination to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of DietsPagination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$DietsPaginationCopyWith<DietsPagination> get copyWith =>
|
||||
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 _$Datum {
|
||||
@JsonKey(name: "total_comments")
|
||||
int get totalComments => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Datum to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Datum
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$DatumCopyWith<Datum> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -307,6 +328,8 @@ class _$DatumCopyWithImpl<$Res, $Val extends Datum>
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of Datum
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -375,6 +398,8 @@ class _$DatumCopyWithImpl<$Res, $Val extends Datum>
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
/// Create a copy of Datum
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$TypeCopyWith<$Res> get type {
|
||||
@@ -383,6 +408,8 @@ class _$DatumCopyWithImpl<$Res, $Val extends Datum>
|
||||
});
|
||||
}
|
||||
|
||||
/// Create a copy of Datum
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$AuthorCopyWith<$Res> get author {
|
||||
@@ -428,6 +455,8 @@ class __$$DatumImplCopyWithImpl<$Res>
|
||||
_$DatumImpl _value, $Res Function(_$DatumImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Datum
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -591,7 +620,7 @@ class _$DatumImpl implements _Datum {
|
||||
other.totalComments == totalComments));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
@@ -608,7 +637,9 @@ class _$DatumImpl implements _Datum {
|
||||
totalViews,
|
||||
totalComments);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of Datum
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DatumImplCopyWith<_$DatumImpl> get copyWith =>
|
||||
@@ -677,8 +708,11 @@ abstract class _Datum implements Datum {
|
||||
@override
|
||||
@JsonKey(name: "total_comments")
|
||||
int get totalComments;
|
||||
|
||||
/// Create a copy of Datum
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DatumImplCopyWith<_$DatumImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -698,8 +732,12 @@ mixin _$Author {
|
||||
@JsonKey(name: "author_is_me")
|
||||
bool get authorIsMe => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Author to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Author
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$AuthorCopyWith<Author> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -725,6 +763,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({
|
||||
@@ -776,6 +816,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({
|
||||
@@ -850,12 +892,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 =>
|
||||
@@ -892,8 +936,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;
|
||||
}
|
||||
@@ -913,8 +960,12 @@ mixin _$DailySchedule {
|
||||
@JsonKey(name: "quantity")
|
||||
int get quantity => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this DailySchedule to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of DailySchedule
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$DailyScheduleCopyWith<DailySchedule> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -942,6 +993,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({
|
||||
@@ -994,6 +1047,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({
|
||||
@@ -1065,11 +1120,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 =>
|
||||
@@ -1106,8 +1163,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;
|
||||
}
|
||||
@@ -1127,8 +1187,12 @@ mixin _$Type {
|
||||
@JsonKey(name: "meat")
|
||||
bool? get meat => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Type to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Type
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$TypeCopyWith<Type> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -1154,6 +1218,8 @@ class _$TypeCopyWithImpl<$Res, $Val extends Type>
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of Type
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -1204,6 +1270,8 @@ class __$$TypeImplCopyWithImpl<$Res>
|
||||
__$$TypeImplCopyWithImpl(_$TypeImpl _value, $Res Function(_$TypeImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Type
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -1274,11 +1342,13 @@ class _$TypeImpl implements _Type {
|
||||
(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 Type
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$TypeImplCopyWith<_$TypeImpl> get copyWith =>
|
||||
@@ -1313,8 +1383,11 @@ abstract class _Type implements Type {
|
||||
@override
|
||||
@JsonKey(name: "meat")
|
||||
bool? get meat;
|
||||
|
||||
/// Create a copy of Type
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$TypeImplCopyWith<_$TypeImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -1334,8 +1407,12 @@ mixin _$Links {
|
||||
@JsonKey(name: "next")
|
||||
dynamic get next => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Links to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Links
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$LinksCopyWith<Links> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -1361,6 +1438,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({
|
||||
@@ -1412,6 +1491,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({
|
||||
@@ -1482,7 +1563,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,
|
||||
@@ -1491,7 +1572,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 =>
|
||||
@@ -1526,8 +1609,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;
|
||||
}
|
||||
@@ -1555,8 +1641,12 @@ mixin _$Meta {
|
||||
@JsonKey(name: "total")
|
||||
int get total => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Meta to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Meta
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$MetaCopyWith<Meta> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -1586,6 +1676,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({
|
||||
@@ -1660,6 +1752,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({
|
||||
@@ -1779,12 +1873,14 @@ 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, currentPage, from, lastPage,
|
||||
const DeepCollectionEquality().hash(_links), path, perPage, 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 =>
|
||||
@@ -1835,8 +1931,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;
|
||||
}
|
||||
@@ -1854,8 +1953,12 @@ mixin _$Link {
|
||||
@JsonKey(name: "active")
|
||||
bool get active => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Link to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Link
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$LinkCopyWith<Link> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -1880,6 +1983,8 @@ 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({
|
||||
@@ -1924,6 +2029,8 @@ 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({
|
||||
@@ -1984,11 +2091,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 =>
|
||||
@@ -2019,8 +2128,11 @@ abstract class _Link implements Link {
|
||||
@override
|
||||
@JsonKey(name: "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;
|
||||
}
|
||||
|
||||
@@ -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<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of FeedBlogPostModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$FeedBlogPostModelCopyWith<FeedBlogPostModel> get copyWith =>
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -26,8 +26,12 @@ mixin _$FeedBlogPostSettingsModel {
|
||||
throw _privateConstructorUsedError;
|
||||
Meta get meta => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this FeedBlogPostSettingsModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of FeedBlogPostSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$FeedBlogPostSettingsModelCopyWith<FeedBlogPostSettingsModel> get copyWith =>
|
||||
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<FeedBlogPostModel> 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;
|
||||
}
|
||||
|
||||
@@ -45,8 +45,12 @@ mixin _$Recipes {
|
||||
int get viewsCount => throw _privateConstructorUsedError;
|
||||
Author get author => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Recipes to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Recipes
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$RecipesCopyWith<Recipes> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -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<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Ingredient
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$IngredientCopyWith<Ingredient> get copyWith =>
|
||||
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<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Step
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$StepCopyWith<Step> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -23,8 +23,12 @@ mixin _$RecipesPagination {
|
||||
@JsonKey(name: 'data')
|
||||
List<Recipes> get recipesList => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this RecipesPagination to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of RecipesPagination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$RecipesPaginationCopyWith<RecipesPagination> get copyWith =>
|
||||
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<Recipes> 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;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,24 @@ class CommentsCubit extends Cubit<CommentsState> {
|
||||
}
|
||||
}
|
||||
|
||||
getRecipesComments(String id) async {
|
||||
emit(CommentsState.loading());
|
||||
try {
|
||||
emit(CommentsState.loaded(comment: await feedRepository.getRecipesComments(id)));
|
||||
} catch (e) {
|
||||
emit(CommentsState.error(errorMessage: e.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
getDietsComments(int id) async {
|
||||
emit(CommentsState.loading());
|
||||
try {
|
||||
emit(CommentsState.loaded(comment: await feedRepository.getDietsComments(id)));
|
||||
} catch (e) {
|
||||
emit(CommentsState.error(errorMessage: e.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
sendBlogPostComment({
|
||||
required int id,
|
||||
required String commentText,
|
||||
@@ -34,4 +52,38 @@ class CommentsCubit extends Cubit<CommentsState> {
|
||||
emit(CommentsState.error(errorMessage: e.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
sendRecipesComment({
|
||||
required String id,
|
||||
required String commentText,
|
||||
int? parentCommentId,
|
||||
}) async {
|
||||
try {
|
||||
await feedRepository.sendRecipesComment(
|
||||
id: id,
|
||||
commentText: commentText,
|
||||
parentCommentId: parentCommentId,
|
||||
);
|
||||
emit(CommentsState.loaded(comment: await feedRepository.getRecipesComments(id)));
|
||||
} catch (e) {
|
||||
emit(CommentsState.error(errorMessage: e.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
sendDietsComment({
|
||||
required int id,
|
||||
required String commentText,
|
||||
int? parentCommentId,
|
||||
}) async {
|
||||
try {
|
||||
await feedRepository.sendDietsComment(
|
||||
id: id,
|
||||
commentText: commentText,
|
||||
parentCommentId: parentCommentId,
|
||||
);
|
||||
emit(CommentsState.loaded(comment: await feedRepository.getDietsComments(id)));
|
||||
} catch (e) {
|
||||
emit(CommentsState.error(errorMessage: e.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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({
|
||||
@@ -347,6 +358,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')
|
||||
$CommentCopyWith<$Res> get comment {
|
||||
@@ -380,7 +393,9 @@ class _$CommentsStateLoadedImpl implements CommentsStateLoaded {
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, comment);
|
||||
|
||||
@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 =>
|
||||
@@ -467,7 +482,10 @@ abstract class CommentsStateLoaded implements CommentsState {
|
||||
_$CommentsStateLoadedImpl;
|
||||
|
||||
Comment get comment;
|
||||
@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;
|
||||
}
|
||||
@@ -489,6 +507,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({
|
||||
@@ -528,7 +548,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 =>
|
||||
@@ -615,7 +637,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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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<FeedBlogPostModel> 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;
|
||||
}
|
||||
|
||||
@@ -84,6 +84,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
|
||||
@@ -100,6 +103,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
|
||||
@@ -214,6 +220,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
|
||||
@@ -332,6 +341,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({
|
||||
@@ -378,7 +389,9 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_recipesList));
|
||||
|
||||
@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 =>
|
||||
@@ -465,7 +478,10 @@ abstract class RecipesStateLoaded implements RecipesState {
|
||||
_$RecipesStateLoadedImpl;
|
||||
|
||||
List<Recipes> get recipesList;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// 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;
|
||||
}
|
||||
@@ -487,6 +503,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({
|
||||
@@ -526,7 +544,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 =>
|
||||
@@ -613,7 +633,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;
|
||||
}
|
||||
|
||||
@@ -57,6 +57,54 @@ class FeedRepository {
|
||||
}
|
||||
}
|
||||
|
||||
Future<Comment> getDietsComments(int id) async {
|
||||
try {
|
||||
return (await feedService.getDietsComments(id: id));
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> sendDietsComment({
|
||||
required int id,
|
||||
required String commentText,
|
||||
int? parentCommentId,
|
||||
}) async {
|
||||
try {
|
||||
await feedService.sendDietsComment(
|
||||
id: id,
|
||||
body: commentText,
|
||||
parentCommentId: parentCommentId,
|
||||
);
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Future<Comment> getRecipesComments(String id) async {
|
||||
try {
|
||||
return (await feedService.getRecipesComments(id: id));
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> sendRecipesComment({
|
||||
required String id,
|
||||
required String commentText,
|
||||
int? parentCommentId,
|
||||
}) async {
|
||||
try {
|
||||
await feedService.sendRecipesComment(
|
||||
id: id,
|
||||
body: commentText,
|
||||
parentCommentId: parentCommentId,
|
||||
);
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> likeBlogPost(int id) async {
|
||||
try {
|
||||
await feedService.likeBlogPost(id: id);
|
||||
|
||||
@@ -34,6 +34,30 @@ abstract class FeedService {
|
||||
@Part() int? parentCommentId,
|
||||
});
|
||||
|
||||
@GET('/api/diets/{id}/comments/show')
|
||||
Future<Comment> getDietsComments({
|
||||
@Path() required int id,
|
||||
});
|
||||
|
||||
@POST('/api/diets/{id}/comment/create')
|
||||
Future<void> sendDietsComment({
|
||||
@Path() required int id,
|
||||
@Part() required String body,
|
||||
@Part() int? parentCommentId,
|
||||
});
|
||||
|
||||
@GET('/api/recipes/{id}/comments/show')
|
||||
Future<Comment> getRecipesComments({
|
||||
@Path() required String id,
|
||||
});
|
||||
|
||||
@POST('/api/recipes/{id}/comment/create')
|
||||
Future<void> sendRecipesComment({
|
||||
@Path() required String id,
|
||||
@Part() required String body,
|
||||
@Part() int? parentCommentId,
|
||||
});
|
||||
|
||||
@POST('/api/blogPosts/{id}/like')
|
||||
Future<void> likeBlogPost({
|
||||
@Path() required int id,
|
||||
|
||||
@@ -193,6 +193,152 @@ class _FeedService implements FeedService {
|
||||
await _dio.fetch<void>(_options);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Comment> getDietsComments({required int id}) async {
|
||||
final _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
const Map<String, dynamic>? _data = null;
|
||||
final _options = _setStreamType<Comment>(Options(
|
||||
method: 'GET',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/diets/${id}/comments/show',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
)));
|
||||
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
|
||||
late Comment _value;
|
||||
try {
|
||||
_value = Comment.fromJson(_result.data!);
|
||||
} on Object catch (e, s) {
|
||||
errorLogger?.logError(e, s, _options);
|
||||
rethrow;
|
||||
}
|
||||
return _value;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> sendDietsComment({
|
||||
required int id,
|
||||
required String body,
|
||||
int? parentCommentId,
|
||||
}) async {
|
||||
final _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
queryParameters.removeWhere((k, v) => v == null);
|
||||
final _headers = <String, dynamic>{};
|
||||
final _data = FormData();
|
||||
_data.fields.add(MapEntry(
|
||||
'body',
|
||||
body,
|
||||
));
|
||||
if (parentCommentId != null) {
|
||||
_data.fields.add(MapEntry(
|
||||
'parentCommentId',
|
||||
parentCommentId.toString(),
|
||||
));
|
||||
}
|
||||
final _options = _setStreamType<void>(Options(
|
||||
method: 'POST',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/diets/${id}/comment/create',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
)));
|
||||
await _dio.fetch<void>(_options);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Comment> getRecipesComments({required String id}) async {
|
||||
final _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
const Map<String, dynamic>? _data = null;
|
||||
final _options = _setStreamType<Comment>(Options(
|
||||
method: 'GET',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/recipes/${id}/comments/show',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
)));
|
||||
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
|
||||
late Comment _value;
|
||||
try {
|
||||
_value = Comment.fromJson(_result.data!);
|
||||
} on Object catch (e, s) {
|
||||
errorLogger?.logError(e, s, _options);
|
||||
rethrow;
|
||||
}
|
||||
return _value;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> sendRecipesComment({
|
||||
required String id,
|
||||
required String body,
|
||||
int? parentCommentId,
|
||||
}) async {
|
||||
final _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
queryParameters.removeWhere((k, v) => v == null);
|
||||
final _headers = <String, dynamic>{};
|
||||
final _data = FormData();
|
||||
_data.fields.add(MapEntry(
|
||||
'body',
|
||||
body,
|
||||
));
|
||||
if (parentCommentId != null) {
|
||||
_data.fields.add(MapEntry(
|
||||
'parentCommentId',
|
||||
parentCommentId.toString(),
|
||||
));
|
||||
}
|
||||
final _options = _setStreamType<void>(Options(
|
||||
method: 'POST',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/recipes/${id}/comment/create',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
)));
|
||||
await _dio.fetch<void>(_options);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> likeBlogPost({required int id}) async {
|
||||
final _extra = <String, dynamic>{};
|
||||
@@ -244,9 +390,7 @@ class _FeedService implements FeedService {
|
||||
}
|
||||
|
||||
RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
|
||||
if (T != dynamic &&
|
||||
!(requestOptions.responseType == ResponseType.bytes ||
|
||||
requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T != dynamic && !(requestOptions.responseType == ResponseType.bytes || requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T == String) {
|
||||
requestOptions.responseType = ResponseType.plain;
|
||||
} else {
|
||||
|
||||
@@ -41,8 +41,12 @@ mixin _$Profile {
|
||||
@JsonKey(name: "initedPlan")
|
||||
List<dynamic> get initedPlan => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Profile to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Profile
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ProfileCopyWith<Profile> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -77,6 +81,8 @@ class _$ProfileCopyWithImpl<$Res, $Val extends Profile>
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of Profile
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -135,6 +141,8 @@ class _$ProfileCopyWithImpl<$Res, $Val extends Profile>
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
/// Create a copy of Profile
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$UserCopyWith<$Res> get user {
|
||||
@@ -143,6 +151,8 @@ class _$ProfileCopyWithImpl<$Res, $Val extends Profile>
|
||||
});
|
||||
}
|
||||
|
||||
/// Create a copy of Profile
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$UserDetailsCopyWith<$Res> get userDetails {
|
||||
@@ -185,6 +195,8 @@ class __$$ProfileImplCopyWithImpl<$Res>
|
||||
_$ProfileImpl _value, $Res Function(_$ProfileImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Profile
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -382,7 +394,7 @@ class _$ProfileImpl implements _Profile {
|
||||
.equals(other._initedPlan, _initedPlan));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
@@ -397,7 +409,9 @@ class _$ProfileImpl implements _Profile {
|
||||
const DeepCollectionEquality().hash(_requestedPlan),
|
||||
const DeepCollectionEquality().hash(_initedPlan));
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of Profile
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ProfileImplCopyWith<_$ProfileImpl> get copyWith =>
|
||||
@@ -461,8 +475,11 @@ abstract class _Profile implements Profile {
|
||||
@override
|
||||
@JsonKey(name: "initedPlan")
|
||||
List<dynamic> get initedPlan;
|
||||
|
||||
/// Create a copy of Profile
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ProfileImplCopyWith<_$ProfileImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -504,8 +521,12 @@ mixin _$User {
|
||||
@JsonKey(name: "detailz")
|
||||
UserDetails get detailz => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this User to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of User
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$UserCopyWith<User> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -544,6 +565,8 @@ class _$UserCopyWithImpl<$Res, $Val extends User>
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of User
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -627,6 +650,8 @@ class _$UserCopyWithImpl<$Res, $Val extends User>
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
/// Create a copy of User
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$UserDetailsCopyWith<$Res> get detailz {
|
||||
@@ -671,6 +696,8 @@ class __$$UserImplCopyWithImpl<$Res>
|
||||
__$$UserImplCopyWithImpl(_$UserImpl _value, $Res Function(_$UserImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of User
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -862,7 +889,7 @@ class _$UserImpl implements _User {
|
||||
(identical(other.detailz, detailz) || other.detailz == detailz));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
@@ -882,7 +909,9 @@ class _$UserImpl implements _User {
|
||||
profilePhotoUrl,
|
||||
detailz);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of User
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$UserImplCopyWith<_$UserImpl> get copyWith =>
|
||||
@@ -965,8 +994,11 @@ abstract class _User implements User {
|
||||
@override
|
||||
@JsonKey(name: "detailz")
|
||||
UserDetails get detailz;
|
||||
|
||||
/// Create a copy of User
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$UserImplCopyWith<_$UserImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -1036,8 +1068,12 @@ mixin _$UserDetails {
|
||||
@JsonKey(name: "activity_coefficient")
|
||||
double get activityCoefficient => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this UserDetails to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of UserDetails
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$UserDetailsCopyWith<UserDetails> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -1090,6 +1126,8 @@ class _$UserDetailsCopyWithImpl<$Res, $Val extends UserDetails>
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of UserDetails
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -1292,6 +1330,8 @@ class __$$UserDetailsImplCopyWithImpl<$Res>
|
||||
_$UserDetailsImpl _value, $Res Function(_$UserDetailsImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of UserDetails
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -1633,7 +1673,7 @@ class _$UserDetailsImpl implements _UserDetails {
|
||||
other.activityCoefficient == activityCoefficient));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hashAll([
|
||||
runtimeType,
|
||||
@@ -1668,7 +1708,9 @@ class _$UserDetailsImpl implements _UserDetails {
|
||||
activityCoefficient
|
||||
]);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of UserDetails
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$UserDetailsImplCopyWith<_$UserDetailsImpl> get copyWith =>
|
||||
@@ -1810,8 +1852,11 @@ abstract class _UserDetails implements UserDetails {
|
||||
@override
|
||||
@JsonKey(name: "activity_coefficient")
|
||||
double get activityCoefficient;
|
||||
|
||||
/// Create a copy of UserDetails
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$UserDetailsImplCopyWith<_$UserDetailsImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -84,6 +84,9 @@ class _$ProfileStateCopyWithImpl<$Res, $Val extends ProfileState>
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of ProfileState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -100,6 +103,9 @@ class __$$ProfileStateImplCopyWithImpl<$Res>
|
||||
__$$ProfileStateImplCopyWithImpl(
|
||||
_$ProfileStateImpl _value, $Res Function(_$ProfileStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ProfileState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -214,6 +220,9 @@ class __$$ProfileStateLoadingImplCopyWithImpl<$Res>
|
||||
__$$ProfileStateLoadingImplCopyWithImpl(_$ProfileStateLoadingImpl _value,
|
||||
$Res Function(_$ProfileStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ProfileState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -334,6 +343,8 @@ class __$$ProfileStateLoadedImplCopyWithImpl<$Res>
|
||||
$Res Function(_$ProfileStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ProfileState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -347,6 +358,8 @@ class __$$ProfileStateLoadedImplCopyWithImpl<$Res>
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of ProfileState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$ProfileCopyWith<$Res> get profile {
|
||||
@@ -380,7 +393,9 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, profile);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of ProfileState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ProfileStateLoadedImplCopyWith<_$ProfileStateLoadedImpl> get copyWith =>
|
||||
@@ -467,7 +482,10 @@ abstract class ProfileStateLoaded implements ProfileState {
|
||||
_$ProfileStateLoadedImpl;
|
||||
|
||||
Profile get profile;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of ProfileState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ProfileStateLoadedImplCopyWith<_$ProfileStateLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -489,6 +507,8 @@ class __$$ProfileStateErrorImplCopyWithImpl<$Res>
|
||||
$Res Function(_$ProfileStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ProfileState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -528,7 +548,9 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, errorMessage);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of ProfileState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ProfileStateErrorImplCopyWith<_$ProfileStateErrorImpl> get copyWith =>
|
||||
@@ -615,7 +637,10 @@ abstract class ProfileStateError implements ProfileState {
|
||||
_$ProfileStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of ProfileState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ProfileStateErrorImplCopyWith<_$ProfileStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -24,8 +24,12 @@ mixin _$Ingredient {
|
||||
String get unit => throw _privateConstructorUsedError;
|
||||
String get portion => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Ingredient to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Ingredient
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$IngredientCopyWith<Ingredient> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -49,6 +53,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({
|
||||
@@ -92,6 +98,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({
|
||||
@@ -147,11 +155,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 =>
|
||||
@@ -180,8 +190,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;
|
||||
}
|
||||
|
||||
@@ -30,8 +30,12 @@ mixin _$RecipeModel {
|
||||
String? get image => throw _privateConstructorUsedError;
|
||||
int? get cooking_time => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this RecipeModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of RecipeModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$RecipeModelCopyWith<RecipeModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -64,6 +68,8 @@ class _$RecipeModelCopyWithImpl<$Res, $Val extends RecipeModel>
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of RecipeModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -146,6 +152,8 @@ class __$$RecipeModelImplCopyWithImpl<$Res>
|
||||
_$RecipeModelImpl _value, $Res Function(_$RecipeModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of RecipeModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -279,7 +287,7 @@ class _$RecipeModelImpl implements _RecipeModel {
|
||||
other.cooking_time == cooking_time));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
@@ -293,7 +301,9 @@ class _$RecipeModelImpl implements _RecipeModel {
|
||||
image,
|
||||
cooking_time);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of RecipeModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipeModelImplCopyWith<_$RecipeModelImpl> get copyWith =>
|
||||
@@ -340,8 +350,11 @@ abstract class _RecipeModel implements RecipeModel {
|
||||
String? get image;
|
||||
@override
|
||||
int? get cooking_time;
|
||||
|
||||
/// Create a copy of RecipeModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipeModelImplCopyWith<_$RecipeModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -23,8 +23,12 @@ mixin _$Step {
|
||||
String? get image => throw _privateConstructorUsedError;
|
||||
String? get description => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Step to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Step
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$StepCopyWith<Step> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -46,6 +50,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({
|
||||
@@ -82,6 +88,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({
|
||||
@@ -129,11 +137,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 =>
|
||||
@@ -157,8 +167,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;
|
||||
}
|
||||
|
||||
@@ -147,6 +147,9 @@ class _$RecipeCreateStateCopyWithImpl<$Res, $Val extends RecipeCreateState>
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of RecipeCreateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -163,6 +166,9 @@ class __$$RecipeCreateStateImplCopyWithImpl<$Res>
|
||||
__$$RecipeCreateStateImplCopyWithImpl(_$RecipeCreateStateImpl _value,
|
||||
$Res Function(_$RecipeCreateStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of RecipeCreateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -343,6 +349,9 @@ class __$$RecipeCreateStateLoadingImplCopyWithImpl<$Res>
|
||||
_$RecipeCreateStateLoadingImpl _value,
|
||||
$Res Function(_$RecipeCreateStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of RecipeCreateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -551,6 +560,8 @@ class __$$RecipeCreateStateLoadedImplCopyWithImpl<$Res>
|
||||
$Res Function(_$RecipeCreateStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of RecipeCreateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -659,6 +670,8 @@ class __$$RecipeCreateStateLoadedImplCopyWithImpl<$Res>
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of RecipeCreateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$RecipeModelCopyWith<$Res>? get recipe {
|
||||
@@ -671,6 +684,8 @@ class __$$RecipeCreateStateLoadedImplCopyWithImpl<$Res>
|
||||
});
|
||||
}
|
||||
|
||||
/// Create a copy of RecipeCreateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SelectionPopupModelCopyWith<$Res> get selectedType {
|
||||
@@ -679,6 +694,8 @@ class __$$RecipeCreateStateLoadedImplCopyWithImpl<$Res>
|
||||
});
|
||||
}
|
||||
|
||||
/// Create a copy of RecipeCreateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SelectionPopupModelCopyWith<$Res> get selectedCookingTime {
|
||||
@@ -688,6 +705,8 @@ class __$$RecipeCreateStateLoadedImplCopyWithImpl<$Res>
|
||||
});
|
||||
}
|
||||
|
||||
/// Create a copy of RecipeCreateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SelectionPopupModelCopyWith<$Res> get selectedStatus {
|
||||
@@ -887,7 +906,9 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded {
|
||||
selectedStatus
|
||||
]);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of RecipeCreateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipeCreateStateLoadedImplCopyWith<_$RecipeCreateStateLoadedImpl>
|
||||
@@ -1136,7 +1157,10 @@ abstract class RecipeCreateStateLoaded implements RecipeCreateState {
|
||||
SelectionPopupModel get selectedType;
|
||||
SelectionPopupModel get selectedCookingTime;
|
||||
SelectionPopupModel get selectedStatus;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of RecipeCreateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipeCreateStateLoadedImplCopyWith<_$RecipeCreateStateLoadedImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -1160,6 +1184,8 @@ class __$$RecipeCreateStateErrorImplCopyWithImpl<$Res>
|
||||
$Res Function(_$RecipeCreateStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of RecipeCreateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -1199,7 +1225,9 @@ class _$RecipeCreateStateErrorImpl implements RecipeCreateStateError {
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, errorMessage);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of RecipeCreateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipeCreateStateErrorImplCopyWith<_$RecipeCreateStateErrorImpl>
|
||||
@@ -1349,7 +1377,10 @@ abstract class RecipeCreateStateError implements RecipeCreateState {
|
||||
_$RecipeCreateStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of RecipeCreateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipeCreateStateErrorImplCopyWith<_$RecipeCreateStateErrorImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -1,167 +1,341 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/features/feed/models/comment_model.dart';
|
||||
import 'package:eatvio_app/features/feed/models/recipes_model.dart' as step;
|
||||
import 'package:eatvio_app/features/feed/models/recipes_model.dart';
|
||||
import 'package:eatvio_app/features/feed/presentation/bloc/comments_cubit/comments_cubit.dart';
|
||||
import 'package:eatvio_app/features/feed/presentation/bloc/comments_cubit/comments_state.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';
|
||||
|
||||
class AboutRecipesScreen extends StatelessWidget {
|
||||
class AboutRecipesScreen extends StatefulWidget {
|
||||
final Recipes recipes;
|
||||
|
||||
const AboutRecipesScreen({super.key, required this.recipes});
|
||||
|
||||
@override
|
||||
State<AboutRecipesScreen> createState() => _AboutRecipesScreenState();
|
||||
}
|
||||
|
||||
class _AboutRecipesScreenState extends State<AboutRecipesScreen> {
|
||||
final CommentsCubit commentsCubit = sl<CommentsCubit>();
|
||||
final textEditingController = TextEditingController();
|
||||
int? replyId;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
commentsCubit.getRecipesComments(widget.recipes.slug);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
actions: [
|
||||
InkWell(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
onTap: () => GoRouter.of(context).pushNamed('profileScreen', extra: recipes.author),
|
||||
child: Ink(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Column(
|
||||
return BlocProvider<CommentsCubit>(
|
||||
create: (BuildContext context) => commentsCubit,
|
||||
child: BlocBuilder<CommentsCubit, CommentsState>(
|
||||
builder: (BuildContext context, CommentsState state) {
|
||||
if (state is CommentsStateError) {
|
||||
print(state.errorMessage);
|
||||
}
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: true,
|
||||
bottomSheet: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 12) + (Platform.isIOS ? const EdgeInsets.only(bottom: 16) : EdgeInsets.zero),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
color: Colors.black.withOpacity(0.1),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
maxRadius: 16,
|
||||
minRadius: 16,
|
||||
backgroundImage: NetworkImage(recipes.author.authorProfileIcon),
|
||||
if (replyId != null)
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
replyId = null;
|
||||
textEditingController.clear();
|
||||
});
|
||||
FocusManager.instance.primaryFocus?.unfocus();
|
||||
},
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.blueA400,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
height: 32,
|
||||
width: 32,
|
||||
child: Icon(
|
||||
Icons.close_rounded,
|
||||
size: 18,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (replyId != null) SizedBox(width: 8),
|
||||
SizedBox(
|
||||
width: mediaQueryData.size.width - (replyId == null ? 64 : 104),
|
||||
child: TextFormField(
|
||||
onChanged: (_) {
|
||||
setState(() {});
|
||||
},
|
||||
controller: textEditingController,
|
||||
maxLines: 5,
|
||||
minLines: 1,
|
||||
keyboardType: TextInputType.multiline,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Colors.black,
|
||||
height: 1,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
contentPadding: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
hintText: 'Комментарий',
|
||||
hintStyle: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1,
|
||||
color: Color(0xFFAEAEB2),
|
||||
),
|
||||
filled: true,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
borderSide: BorderSide(
|
||||
color: Color(0xFFD1D1D6),
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
borderSide: BorderSide(
|
||||
color: Color(0xFFD1D1D6),
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
borderSide: BorderSide(
|
||||
color: Color(0xFFD1D1D6),
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 4),
|
||||
Text(
|
||||
recipes.author.authorName,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1,
|
||||
SizedBox(width: 8),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
if (textEditingController.text.length > 2) {
|
||||
commentsCubit.sendRecipesComment(
|
||||
id: widget.recipes.slug,
|
||||
commentText: textEditingController.text,
|
||||
parentCommentId: replyId,
|
||||
);
|
||||
setState(() {
|
||||
textEditingController.clear();
|
||||
replyId = null;
|
||||
});
|
||||
FocusManager.instance.primaryFocus?.unfocus();
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: textEditingController.text.length > 2 ? appTheme.blueA400 : Colors.grey,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
height: 32,
|
||||
width: 32,
|
||||
child: Icon(
|
||||
Icons.send_rounded,
|
||||
size: 18,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
recipes.title,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.w500,
|
||||
height: 1,
|
||||
appBar: AppBar(
|
||||
actions: [
|
||||
InkWell(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
onTap: () => GoRouter.of(context).pushNamed('profileScreen', extra: widget.recipes.author),
|
||||
child: Ink(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
maxRadius: 16,
|
||||
minRadius: 16,
|
||||
backgroundImage: NetworkImage(widget.recipes.author.authorProfileIcon),
|
||||
),
|
||||
SizedBox(height: 4),
|
||||
Text(
|
||||
widget.recipes.author.authorName,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Row(
|
||||
body: SingleChildScrollView(
|
||||
padding: EdgeInsets.only(bottom: 80),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Icon(Icons.timer_outlined),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
recipes.cookingTime.toString() + ' минут',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1,
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
widget.recipes.title,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.w500,
|
||||
height: 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 16),
|
||||
Icon(Icons.fast_forward_outlined),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
recipes.steps.length.toString() + ' этапов',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1,
|
||||
SizedBox(height: 12),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(Icons.timer_outlined),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
widget.recipes.cookingTime.toString() + ' минут',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 16),
|
||||
Icon(Icons.fast_forward_outlined),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
widget.recipes.steps.length.toString() + ' этапов',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
widget.recipes.description,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1.2,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
CachedNetworkImage(
|
||||
imageUrl: baseUrl + '/storage/' + widget.recipes.image,
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
'Ингредиенты',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
height: 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
ListView.separated(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
shrinkWrap: true,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
itemBuilder: (context, index) => _ingredient(widget.recipes.ingredients[index]),
|
||||
separatorBuilder: (context, index) => SizedBox(height: 4),
|
||||
itemCount: widget.recipes.ingredients.length,
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
'Пошаговый рецепт',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
height: 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
ListView.separated(
|
||||
shrinkWrap: true,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
itemBuilder: (context, index) => _step(widget.recipes.steps[index], index + 1),
|
||||
separatorBuilder: (context, index) => Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Container(
|
||||
height: 0.4,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
),
|
||||
),
|
||||
itemCount: widget.recipes.steps.length,
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
widget.recipes.commentsCount.toString() + ' КОММЕНТАРИЕВ',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: appTheme.gray500,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
if (state is CommentsStateLoading)
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(32),
|
||||
child: CupertinoActivityIndicator(),
|
||||
),
|
||||
if (state is CommentsStateLoaded) _buildComments(state.comment),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
recipes.description,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1.2,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
CachedNetworkImage(
|
||||
imageUrl: baseUrl + '/storage/' + recipes.image,
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
'Ингредиенты',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
height: 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
ListView.separated(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
shrinkWrap: true,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
itemBuilder: (context, index) => _ingredient(recipes.ingredients[index]),
|
||||
separatorBuilder: (context, index) => SizedBox(height: 4),
|
||||
itemCount: recipes.ingredients.length,
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
'Пошаговый рецепт',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
height: 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
ListView.separated(
|
||||
shrinkWrap: true,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
itemBuilder: (context, index) => _step(recipes.steps[index], index + 1),
|
||||
separatorBuilder: (context, index) => Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Container(
|
||||
height: 0.4,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
),
|
||||
),
|
||||
itemCount: recipes.steps.length,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -215,8 +389,104 @@ class AboutRecipesScreen extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
child: CachedNetworkImage(imageUrl: baseUrl + '/storage/' + step.image),
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
_buildComments(Comment comment) {
|
||||
return Column(
|
||||
children: [
|
||||
for (int i = 0; i < comment.data.length; i++) ...[
|
||||
_comment(comment.data[i]),
|
||||
if (comment.data[i].childrenComments.isNotEmpty)
|
||||
for (int j = 0; j < comment.data[i].childrenComments.length; j++)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 40),
|
||||
child: _comment(
|
||||
comment.data[i].childrenComments[j],
|
||||
12,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
],
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
_comment(Datum datum, [double radius = 16]) {
|
||||
return Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
decoration: BoxDecoration(
|
||||
color: replyId == datum.id ? appTheme.blueA400.withOpacity(0.1) : Colors.white,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
foregroundImage: NetworkImage(datum.authorProfileIcon),
|
||||
radius: radius,
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
datum.authorName,
|
||||
style: TextStyle(
|
||||
height: 1,
|
||||
color: Colors.grey.shade600,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
datum.body,
|
||||
style: TextStyle(
|
||||
height: 1,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 4),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
widget.recipes.createdAt.format('dd MMMM', 'ru'),
|
||||
style: TextStyle(
|
||||
color: Colors.grey.shade600,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 16),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
replyId = datum.id;
|
||||
});
|
||||
},
|
||||
child: Text(
|
||||
'Ответить',
|
||||
style: TextStyle(
|
||||
height: 1,
|
||||
fontSize: 12,
|
||||
color: Colors.grey.shade800,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,8 +24,12 @@ mixin _$LocationModel {
|
||||
@JsonKey(name: 'response_body')
|
||||
String get responseBody => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this LocationModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of LocationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$LocationModelCopyWith<LocationModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -51,6 +55,8 @@ class _$LocationModelCopyWithImpl<$Res, $Val extends LocationModel>
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of LocationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -91,6 +97,8 @@ class __$$LocationModelImplCopyWithImpl<$Res>
|
||||
_$LocationModelImpl _value, $Res Function(_$LocationModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of LocationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -149,12 +157,14 @@ class _$LocationModelImpl implements _LocationModel {
|
||||
other.responseBody == responseBody));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,
|
||||
const DeepCollectionEquality().hash(_locations), responseBody);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of LocationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$LocationModelImplCopyWith<_$LocationModelImpl> get copyWith =>
|
||||
@@ -182,8 +192,11 @@ abstract class _LocationModel implements LocationModel {
|
||||
@override
|
||||
@JsonKey(name: 'response_body')
|
||||
String get responseBody;
|
||||
|
||||
/// Create a copy of LocationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$LocationModelImplCopyWith<_$LocationModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,9 @@ final _privateConstructorUsedError = UnsupportedError(
|
||||
mixin _$RegistrationState {
|
||||
UserRegistrationSheet get sheet => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of RegistrationState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$RegistrationStateCopyWith<RegistrationState> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -44,6 +46,8 @@ class _$RegistrationStateCopyWithImpl<$Res, $Val extends RegistrationState>
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of RegistrationState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -57,6 +61,8 @@ class _$RegistrationStateCopyWithImpl<$Res, $Val extends RegistrationState>
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
/// Create a copy of RegistrationState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$UserRegistrationSheetCopyWith<$Res> get sheet {
|
||||
@@ -88,6 +94,8 @@ class __$$RegistrationStateImplCopyWithImpl<$Res>
|
||||
$Res Function(_$RegistrationStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of RegistrationState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -126,7 +134,9 @@ class _$RegistrationStateImpl implements _RegistrationState {
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, sheet);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of RegistrationState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RegistrationStateImplCopyWith<_$RegistrationStateImpl> get copyWith =>
|
||||
@@ -140,8 +150,11 @@ abstract class _RegistrationState implements RegistrationState {
|
||||
|
||||
@override
|
||||
UserRegistrationSheet get sheet;
|
||||
|
||||
/// Create a copy of RegistrationState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RegistrationStateImplCopyWith<_$RegistrationStateImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ dependencies:
|
||||
flutter_form_builder: ^9.3.0
|
||||
image_picker: ^1.1.2
|
||||
flutter_typeahead: ^5.2.0
|
||||
go_router: ^14.2.3
|
||||
go_router: ^14.2.6
|
||||
keyboard_dismisser: ^3.0.0
|
||||
retrofit: ^4.2.0
|
||||
get_it: ^7.7.0
|
||||
@@ -45,7 +45,7 @@ dependencies:
|
||||
badges: ^3.1.2
|
||||
google_fonts: ^6.2.1
|
||||
location: ^6.0.2
|
||||
syncfusion_flutter_charts: ^26.2.9
|
||||
# syncfusion_flutter_charts: ^26.2.9
|
||||
table_calendar: ^3.1.2
|
||||
flutter_keyboard_visibility: ^6.0.0
|
||||
share_plus: ^10.0.0
|
||||
@@ -65,4 +65,4 @@ flutter:
|
||||
uses-material-design: true
|
||||
assets:
|
||||
- assets/
|
||||
- assets/images/
|
||||
- assets/images/
|
||||
|
||||
Reference in New Issue
Block a user