Merge pull request 'feat(feed): add diets api and create blog post screen, fix status bar' (#95) from feature/feed into main

Reviewed-on: maxxkim/eatvio_app#95
This commit is contained in:
mso7nueh
2024-08-08 07:41:23 +00:00
67 changed files with 4253 additions and 1617 deletions

View File

@@ -24,7 +24,6 @@ mixin _$InitializationState {
required TResult Function(String errorMessage) error, required TResult Function(String errorMessage) error,
}) => }) =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
@optionalTypeArgs @optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>( TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, { TResult? Function()? $default, {
@@ -71,31 +70,36 @@ mixin _$InitializationState {
/// @nodoc /// @nodoc
abstract class $InitializationStateCopyWith<$Res> { abstract class $InitializationStateCopyWith<$Res> {
factory $InitializationStateCopyWith(InitializationState value, $Res Function(InitializationState) then) = factory $InitializationStateCopyWith(
InitializationState value, $Res Function(InitializationState) then) =
_$InitializationStateCopyWithImpl<$Res, InitializationState>; _$InitializationStateCopyWithImpl<$Res, InitializationState>;
} }
/// @nodoc /// @nodoc
class _$InitializationStateCopyWithImpl<$Res, $Val extends InitializationState> implements $InitializationStateCopyWith<$Res> { class _$InitializationStateCopyWithImpl<$Res, $Val extends InitializationState>
implements $InitializationStateCopyWith<$Res> {
_$InitializationStateCopyWithImpl(this._value, this._then); _$InitializationStateCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
} }
/// @nodoc /// @nodoc
abstract class _$$InitializationStateImplCopyWith<$Res> { abstract class _$$InitializationStateImplCopyWith<$Res> {
factory _$$InitializationStateImplCopyWith(_$InitializationStateImpl value, $Res Function(_$InitializationStateImpl) then) = factory _$$InitializationStateImplCopyWith(_$InitializationStateImpl value,
$Res Function(_$InitializationStateImpl) then) =
__$$InitializationStateImplCopyWithImpl<$Res>; __$$InitializationStateImplCopyWithImpl<$Res>;
} }
/// @nodoc /// @nodoc
class __$$InitializationStateImplCopyWithImpl<$Res> extends _$InitializationStateCopyWithImpl<$Res, _$InitializationStateImpl> class __$$InitializationStateImplCopyWithImpl<$Res>
extends _$InitializationStateCopyWithImpl<$Res, _$InitializationStateImpl>
implements _$$InitializationStateImplCopyWith<$Res> { implements _$$InitializationStateImplCopyWith<$Res> {
__$$InitializationStateImplCopyWithImpl(_$InitializationStateImpl _value, $Res Function(_$InitializationStateImpl) _then) : super(_value, _then); __$$InitializationStateImplCopyWithImpl(_$InitializationStateImpl _value,
$Res Function(_$InitializationStateImpl) _then)
: super(_value, _then);
} }
/// @nodoc /// @nodoc
@@ -110,7 +114,9 @@ class _$InitializationStateImpl implements _InitializationState {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType && other is _$InitializationStateImpl); return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$InitializationStateImpl);
} }
@override @override
@@ -197,14 +203,20 @@ abstract class _InitializationState implements InitializationState {
/// @nodoc /// @nodoc
abstract class _$$InitializationStateLoadingImplCopyWith<$Res> { abstract class _$$InitializationStateLoadingImplCopyWith<$Res> {
factory _$$InitializationStateLoadingImplCopyWith(_$InitializationStateLoadingImpl value, $Res Function(_$InitializationStateLoadingImpl) then) = factory _$$InitializationStateLoadingImplCopyWith(
_$InitializationStateLoadingImpl value,
$Res Function(_$InitializationStateLoadingImpl) then) =
__$$InitializationStateLoadingImplCopyWithImpl<$Res>; __$$InitializationStateLoadingImplCopyWithImpl<$Res>;
} }
/// @nodoc /// @nodoc
class __$$InitializationStateLoadingImplCopyWithImpl<$Res> extends _$InitializationStateCopyWithImpl<$Res, _$InitializationStateLoadingImpl> class __$$InitializationStateLoadingImplCopyWithImpl<$Res>
extends _$InitializationStateCopyWithImpl<$Res,
_$InitializationStateLoadingImpl>
implements _$$InitializationStateLoadingImplCopyWith<$Res> { implements _$$InitializationStateLoadingImplCopyWith<$Res> {
__$$InitializationStateLoadingImplCopyWithImpl(_$InitializationStateLoadingImpl _value, $Res Function(_$InitializationStateLoadingImpl) _then) __$$InitializationStateLoadingImplCopyWithImpl(
_$InitializationStateLoadingImpl _value,
$Res Function(_$InitializationStateLoadingImpl) _then)
: super(_value, _then); : super(_value, _then);
} }
@@ -220,7 +232,9 @@ class _$InitializationStateLoadingImpl implements InitializationStateLoading {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType && other is _$InitializationStateLoadingImpl); return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$InitializationStateLoadingImpl);
} }
@override @override
@@ -307,17 +321,22 @@ abstract class InitializationStateLoading implements InitializationState {
/// @nodoc /// @nodoc
abstract class _$$InitializationStateSuccessImplCopyWith<$Res> { abstract class _$$InitializationStateSuccessImplCopyWith<$Res> {
factory _$$InitializationStateSuccessImplCopyWith(_$InitializationStateSuccessImpl value, $Res Function(_$InitializationStateSuccessImpl) then) = factory _$$InitializationStateSuccessImplCopyWith(
_$InitializationStateSuccessImpl value,
$Res Function(_$InitializationStateSuccessImpl) then) =
__$$InitializationStateSuccessImplCopyWithImpl<$Res>; __$$InitializationStateSuccessImplCopyWithImpl<$Res>;
@useResult @useResult
$Res call({PusherChannelsClient client}); $Res call({PusherChannelsClient client});
} }
/// @nodoc /// @nodoc
class __$$InitializationStateSuccessImplCopyWithImpl<$Res> extends _$InitializationStateCopyWithImpl<$Res, _$InitializationStateSuccessImpl> class __$$InitializationStateSuccessImplCopyWithImpl<$Res>
extends _$InitializationStateCopyWithImpl<$Res,
_$InitializationStateSuccessImpl>
implements _$$InitializationStateSuccessImplCopyWith<$Res> { implements _$$InitializationStateSuccessImplCopyWith<$Res> {
__$$InitializationStateSuccessImplCopyWithImpl(_$InitializationStateSuccessImpl _value, $Res Function(_$InitializationStateSuccessImpl) _then) __$$InitializationStateSuccessImplCopyWithImpl(
_$InitializationStateSuccessImpl _value,
$Res Function(_$InitializationStateSuccessImpl) _then)
: super(_value, _then); : super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@@ -350,7 +369,9 @@ class _$InitializationStateSuccessImpl implements InitializationStateSuccess {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$InitializationStateSuccessImpl && (identical(other.client, client) || other.client == client)); (other.runtimeType == runtimeType &&
other is _$InitializationStateSuccessImpl &&
(identical(other.client, client) || other.client == client));
} }
@override @override
@@ -359,8 +380,9 @@ class _$InitializationStateSuccessImpl implements InitializationStateSuccess {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl> get copyWith => _$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl>
__$$InitializationStateSuccessImplCopyWithImpl<_$InitializationStateSuccessImpl>(this, _$identity); get copyWith => __$$InitializationStateSuccessImplCopyWithImpl<
_$InitializationStateSuccessImpl>(this, _$identity);
@override @override
@optionalTypeArgs @optionalTypeArgs
@@ -438,27 +460,34 @@ class _$InitializationStateSuccessImpl implements InitializationStateSuccess {
} }
abstract class InitializationStateSuccess implements InitializationState { abstract class InitializationStateSuccess implements InitializationState {
const factory InitializationStateSuccess({required final PusherChannelsClient client}) = _$InitializationStateSuccessImpl; const factory InitializationStateSuccess(
{required final PusherChannelsClient client}) =
_$InitializationStateSuccessImpl;
PusherChannelsClient get client; PusherChannelsClient get client;
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl> get copyWith => throw _privateConstructorUsedError; _$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl>
get copyWith => throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class _$$InitializationStateErrorImplCopyWith<$Res> { abstract class _$$InitializationStateErrorImplCopyWith<$Res> {
factory _$$InitializationStateErrorImplCopyWith(_$InitializationStateErrorImpl value, $Res Function(_$InitializationStateErrorImpl) then) = factory _$$InitializationStateErrorImplCopyWith(
_$InitializationStateErrorImpl value,
$Res Function(_$InitializationStateErrorImpl) then) =
__$$InitializationStateErrorImplCopyWithImpl<$Res>; __$$InitializationStateErrorImplCopyWithImpl<$Res>;
@useResult @useResult
$Res call({String errorMessage}); $Res call({String errorMessage});
} }
/// @nodoc /// @nodoc
class __$$InitializationStateErrorImplCopyWithImpl<$Res> extends _$InitializationStateCopyWithImpl<$Res, _$InitializationStateErrorImpl> class __$$InitializationStateErrorImplCopyWithImpl<$Res>
extends _$InitializationStateCopyWithImpl<$Res,
_$InitializationStateErrorImpl>
implements _$$InitializationStateErrorImplCopyWith<$Res> { implements _$$InitializationStateErrorImplCopyWith<$Res> {
__$$InitializationStateErrorImplCopyWithImpl(_$InitializationStateErrorImpl _value, $Res Function(_$InitializationStateErrorImpl) _then) __$$InitializationStateErrorImplCopyWithImpl(
_$InitializationStateErrorImpl _value,
$Res Function(_$InitializationStateErrorImpl) _then)
: super(_value, _then); : super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@@ -493,7 +522,8 @@ class _$InitializationStateErrorImpl implements InitializationStateError {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$InitializationStateErrorImpl && other is _$InitializationStateErrorImpl &&
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)); (identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
} }
@override @override
@@ -502,8 +532,9 @@ class _$InitializationStateErrorImpl implements InitializationStateError {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl> get copyWith => _$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl>
__$$InitializationStateErrorImplCopyWithImpl<_$InitializationStateErrorImpl>(this, _$identity); get copyWith => __$$InitializationStateErrorImplCopyWithImpl<
_$InitializationStateErrorImpl>(this, _$identity);
@override @override
@optionalTypeArgs @optionalTypeArgs
@@ -581,10 +612,11 @@ class _$InitializationStateErrorImpl implements InitializationStateError {
} }
abstract class InitializationStateError implements InitializationState { abstract class InitializationStateError implements InitializationState {
const factory InitializationStateError({required final String errorMessage}) = _$InitializationStateErrorImpl; const factory InitializationStateError({required final String errorMessage}) =
_$InitializationStateErrorImpl;
String get errorMessage; String get errorMessage;
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl> get copyWith => throw _privateConstructorUsedError; _$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl>
get copyWith => throw _privateConstructorUsedError;
} }

View File

@@ -17,33 +17,31 @@ final _privateConstructorUsedError = UnsupportedError(
/// @nodoc /// @nodoc
mixin _$SelectionPopupModel { mixin _$SelectionPopupModel {
int? get id => throw _privateConstructorUsedError; int? get id => throw _privateConstructorUsedError;
String get title => throw _privateConstructorUsedError; String get title => throw _privateConstructorUsedError;
dynamic get value => throw _privateConstructorUsedError; dynamic get value => throw _privateConstructorUsedError;
bool get isSelected => throw _privateConstructorUsedError; bool get isSelected => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$SelectionPopupModelCopyWith<SelectionPopupModel> get copyWith => throw _privateConstructorUsedError; $SelectionPopupModelCopyWith<SelectionPopupModel> get copyWith =>
throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class $SelectionPopupModelCopyWith<$Res> { abstract class $SelectionPopupModelCopyWith<$Res> {
factory $SelectionPopupModelCopyWith(SelectionPopupModel value, $Res Function(SelectionPopupModel) then) = factory $SelectionPopupModelCopyWith(
SelectionPopupModel value, $Res Function(SelectionPopupModel) then) =
_$SelectionPopupModelCopyWithImpl<$Res, SelectionPopupModel>; _$SelectionPopupModelCopyWithImpl<$Res, SelectionPopupModel>;
@useResult @useResult
$Res call({int? id, String title, dynamic value, bool isSelected}); $Res call({int? id, String title, dynamic value, bool isSelected});
} }
/// @nodoc /// @nodoc
class _$SelectionPopupModelCopyWithImpl<$Res, $Val extends SelectionPopupModel> implements $SelectionPopupModelCopyWith<$Res> { class _$SelectionPopupModelCopyWithImpl<$Res, $Val extends SelectionPopupModel>
implements $SelectionPopupModelCopyWith<$Res> {
_$SelectionPopupModelCopyWithImpl(this._value, this._then); _$SelectionPopupModelCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -77,19 +75,23 @@ class _$SelectionPopupModelCopyWithImpl<$Res, $Val extends SelectionPopupModel>
} }
/// @nodoc /// @nodoc
abstract class _$$SelectionPopupModelImplCopyWith<$Res> implements $SelectionPopupModelCopyWith<$Res> { abstract class _$$SelectionPopupModelImplCopyWith<$Res>
factory _$$SelectionPopupModelImplCopyWith(_$SelectionPopupModelImpl value, $Res Function(_$SelectionPopupModelImpl) then) = implements $SelectionPopupModelCopyWith<$Res> {
factory _$$SelectionPopupModelImplCopyWith(_$SelectionPopupModelImpl value,
$Res Function(_$SelectionPopupModelImpl) then) =
__$$SelectionPopupModelImplCopyWithImpl<$Res>; __$$SelectionPopupModelImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call({int? id, String title, dynamic value, bool isSelected}); $Res call({int? id, String title, dynamic value, bool isSelected});
} }
/// @nodoc /// @nodoc
class __$$SelectionPopupModelImplCopyWithImpl<$Res> extends _$SelectionPopupModelCopyWithImpl<$Res, _$SelectionPopupModelImpl> class __$$SelectionPopupModelImplCopyWithImpl<$Res>
extends _$SelectionPopupModelCopyWithImpl<$Res, _$SelectionPopupModelImpl>
implements _$$SelectionPopupModelImplCopyWith<$Res> { implements _$$SelectionPopupModelImplCopyWith<$Res> {
__$$SelectionPopupModelImplCopyWithImpl(_$SelectionPopupModelImpl _value, $Res Function(_$SelectionPopupModelImpl) _then) : super(_value, _then); __$$SelectionPopupModelImplCopyWithImpl(_$SelectionPopupModelImpl _value,
$Res Function(_$SelectionPopupModelImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -123,7 +125,8 @@ class __$$SelectionPopupModelImplCopyWithImpl<$Res> extends _$SelectionPopupMode
/// @nodoc /// @nodoc
class _$SelectionPopupModelImpl implements _SelectionPopupModel { class _$SelectionPopupModelImpl implements _SelectionPopupModel {
const _$SelectionPopupModelImpl({this.id, required this.title, this.value, this.isSelected = false}); const _$SelectionPopupModelImpl(
{this.id, required this.title, this.value, this.isSelected = false});
@override @override
final int? id; final int? id;
@@ -148,35 +151,39 @@ class _$SelectionPopupModelImpl implements _SelectionPopupModel {
(identical(other.id, id) || other.id == id) && (identical(other.id, id) || other.id == id) &&
(identical(other.title, title) || other.title == title) && (identical(other.title, title) || other.title == title) &&
const DeepCollectionEquality().equals(other.value, value) && const DeepCollectionEquality().equals(other.value, value) &&
(identical(other.isSelected, isSelected) || other.isSelected == isSelected)); (identical(other.isSelected, isSelected) ||
other.isSelected == isSelected));
} }
@override @override
int get hashCode => Object.hash(runtimeType, id, title, const DeepCollectionEquality().hash(value), isSelected); int get hashCode => Object.hash(runtimeType, id, title,
const DeepCollectionEquality().hash(value), isSelected);
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith => _$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith =>
__$$SelectionPopupModelImplCopyWithImpl<_$SelectionPopupModelImpl>(this, _$identity); __$$SelectionPopupModelImplCopyWithImpl<_$SelectionPopupModelImpl>(
this, _$identity);
} }
abstract class _SelectionPopupModel implements SelectionPopupModel { abstract class _SelectionPopupModel implements SelectionPopupModel {
const factory _SelectionPopupModel({final int? id, required final String title, final dynamic value, final bool isSelected}) = _$SelectionPopupModelImpl; const factory _SelectionPopupModel(
{final int? id,
required final String title,
final dynamic value,
final bool isSelected}) = _$SelectionPopupModelImpl;
@override @override
int? get id; int? get id;
@override @override
String get title; String get title;
@override @override
dynamic get value; dynamic get value;
@override @override
bool get isSelected; bool get isSelected;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith => throw _privateConstructorUsedError; _$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith =>
throw _privateConstructorUsedError;
} }

View File

@@ -14,7 +14,8 @@ T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError( final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
UserRegistrationSheet _$UserRegistrationSheetFromJson(Map<String, dynamic> json) { UserRegistrationSheet _$UserRegistrationSheetFromJson(
Map<String, dynamic> json) {
return _UserRegistrationSheet.fromJson(json); return _UserRegistrationSheet.fromJson(json);
} }
@@ -22,88 +23,62 @@ UserRegistrationSheet _$UserRegistrationSheetFromJson(Map<String, dynamic> json)
mixin _$UserRegistrationSheet { mixin _$UserRegistrationSheet {
@JsonKey(name: 'first_name') @JsonKey(name: 'first_name')
String get firstName => throw _privateConstructorUsedError; String get firstName => throw _privateConstructorUsedError;
@JsonKey(name: 'last_name') @JsonKey(name: 'last_name')
String get lastName => throw _privateConstructorUsedError; String get lastName => throw _privateConstructorUsedError;
String get email => throw _privateConstructorUsedError; String get email => throw _privateConstructorUsedError;
String get password => throw _privateConstructorUsedError; String get password => throw _privateConstructorUsedError;
@JsonKey(name: 'password_confirmation') @JsonKey(name: 'password_confirmation')
String get passwordConfirmation => throw _privateConstructorUsedError; String get passwordConfirmation => throw _privateConstructorUsedError;
@JsonKey(name: 'terms') @JsonKey(name: 'terms')
String get termsAccepted => throw _privateConstructorUsedError; String get termsAccepted => throw _privateConstructorUsedError;
String get birthdate => throw _privateConstructorUsedError; String get birthdate => throw _privateConstructorUsedError;
String get gender => throw _privateConstructorUsedError; String get gender => throw _privateConstructorUsedError;
String get location => throw _privateConstructorUsedError; String get location => throw _privateConstructorUsedError;
@JsonKey(name: 'response_body') @JsonKey(name: 'response_body')
String get responseBody => throw _privateConstructorUsedError; String get responseBody => throw _privateConstructorUsedError;
String get lang => throw _privateConstructorUsedError; String get lang => throw _privateConstructorUsedError;
int get weight => throw _privateConstructorUsedError; int get weight => throw _privateConstructorUsedError;
int get height => throw _privateConstructorUsedError; int get height => throw _privateConstructorUsedError;
@JsonKey(name: 'chest_circumference') @JsonKey(name: 'chest_circumference')
int get chestCircumference => throw _privateConstructorUsedError; int get chestCircumference => throw _privateConstructorUsedError;
@JsonKey(name: 'waist_circumference') @JsonKey(name: 'waist_circumference')
int get waistCircumference => throw _privateConstructorUsedError; int get waistCircumference => throw _privateConstructorUsedError;
@JsonKey(name: 'hip_circumference') @JsonKey(name: 'hip_circumference')
int get hipCircumference => throw _privateConstructorUsedError; int get hipCircumference => throw _privateConstructorUsedError;
@JsonKey(name: 'blood_pressure_up') @JsonKey(name: 'blood_pressure_up')
int get bloodPressureUp => throw _privateConstructorUsedError; int get bloodPressureUp => throw _privateConstructorUsedError;
@JsonKey(name: 'blood_pressure_down') @JsonKey(name: 'blood_pressure_down')
int get bloodPressureDown => throw _privateConstructorUsedError; int get bloodPressureDown => throw _privateConstructorUsedError;
@JsonKey(name: 'has_hypo') @JsonKey(name: 'has_hypo')
int get hasHypo => throw _privateConstructorUsedError; int get hasHypo => throw _privateConstructorUsedError;
@JsonKey(name: 'has_hyper') @JsonKey(name: 'has_hyper')
int get hasHyper => throw _privateConstructorUsedError; int get hasHyper => throw _privateConstructorUsedError;
@JsonKey(name: 'about_alergy') @JsonKey(name: 'about_alergy')
String get aboutAllergy => throw _privateConstructorUsedError; String get aboutAllergy => throw _privateConstructorUsedError;
@JsonKey(name: 'about_taking_pils') @JsonKey(name: 'about_taking_pils')
String get aboutTakingPils => throw _privateConstructorUsedError; String get aboutTakingPils => throw _privateConstructorUsedError;
@JsonKey(name: 'about_sport_hobbies') @JsonKey(name: 'about_sport_hobbies')
String get aboutSportHobbies => throw _privateConstructorUsedError; String get aboutSportHobbies => throw _privateConstructorUsedError;
@JsonKey(name: 'favorite_foods') @JsonKey(name: 'favorite_foods')
String get favoriteFoods => throw _privateConstructorUsedError; String get favoriteFoods => throw _privateConstructorUsedError;
@JsonKey(name: 'unfavorite_foods') @JsonKey(name: 'unfavorite_foods')
String get unfavoriteFoods => throw _privateConstructorUsedError; String get unfavoriteFoods => throw _privateConstructorUsedError;
@JsonKey(name: 'additional_info') @JsonKey(name: 'additional_info')
String get additionalInfo => throw _privateConstructorUsedError; String get additionalInfo => throw _privateConstructorUsedError;
@JsonKey(name: 'activity_coefficient') @JsonKey(name: 'activity_coefficient')
double get activityCoefficient => throw _privateConstructorUsedError; double get activityCoefficient => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$UserRegistrationSheetCopyWith<UserRegistrationSheet> get copyWith => throw _privateConstructorUsedError; $UserRegistrationSheetCopyWith<UserRegistrationSheet> get copyWith =>
throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class $UserRegistrationSheetCopyWith<$Res> { abstract class $UserRegistrationSheetCopyWith<$Res> {
factory $UserRegistrationSheetCopyWith(UserRegistrationSheet value, $Res Function(UserRegistrationSheet) then) = factory $UserRegistrationSheetCopyWith(UserRegistrationSheet value,
$Res Function(UserRegistrationSheet) then) =
_$UserRegistrationSheetCopyWithImpl<$Res, UserRegistrationSheet>; _$UserRegistrationSheetCopyWithImpl<$Res, UserRegistrationSheet>;
@useResult @useResult
$Res call( $Res call(
{@JsonKey(name: 'first_name') String firstName, {@JsonKey(name: 'first_name') String firstName,
@@ -136,12 +111,13 @@ abstract class $UserRegistrationSheetCopyWith<$Res> {
} }
/// @nodoc /// @nodoc
class _$UserRegistrationSheetCopyWithImpl<$Res, $Val extends UserRegistrationSheet> implements $UserRegistrationSheetCopyWith<$Res> { class _$UserRegistrationSheetCopyWithImpl<$Res,
$Val extends UserRegistrationSheet>
implements $UserRegistrationSheetCopyWith<$Res> {
_$UserRegistrationSheetCopyWithImpl(this._value, this._then); _$UserRegistrationSheetCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -290,10 +266,12 @@ class _$UserRegistrationSheetCopyWithImpl<$Res, $Val extends UserRegistrationShe
} }
/// @nodoc /// @nodoc
abstract class _$$UserRegistrationSheetImplCopyWith<$Res> implements $UserRegistrationSheetCopyWith<$Res> { abstract class _$$UserRegistrationSheetImplCopyWith<$Res>
factory _$$UserRegistrationSheetImplCopyWith(_$UserRegistrationSheetImpl value, $Res Function(_$UserRegistrationSheetImpl) then) = implements $UserRegistrationSheetCopyWith<$Res> {
factory _$$UserRegistrationSheetImplCopyWith(
_$UserRegistrationSheetImpl value,
$Res Function(_$UserRegistrationSheetImpl) then) =
__$$UserRegistrationSheetImplCopyWithImpl<$Res>; __$$UserRegistrationSheetImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call( $Res call(
@@ -327,9 +305,13 @@ abstract class _$$UserRegistrationSheetImplCopyWith<$Res> implements $UserRegist
} }
/// @nodoc /// @nodoc
class __$$UserRegistrationSheetImplCopyWithImpl<$Res> extends _$UserRegistrationSheetCopyWithImpl<$Res, _$UserRegistrationSheetImpl> class __$$UserRegistrationSheetImplCopyWithImpl<$Res>
extends _$UserRegistrationSheetCopyWithImpl<$Res,
_$UserRegistrationSheetImpl>
implements _$$UserRegistrationSheetImplCopyWith<$Res> { implements _$$UserRegistrationSheetImplCopyWith<$Res> {
__$$UserRegistrationSheetImplCopyWithImpl(_$UserRegistrationSheetImpl _value, $Res Function(_$UserRegistrationSheetImpl) _then) : super(_value, _then); __$$UserRegistrationSheetImplCopyWithImpl(_$UserRegistrationSheetImpl _value,
$Res Function(_$UserRegistrationSheetImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -483,7 +465,8 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
@JsonKey(name: 'last_name') required this.lastName, @JsonKey(name: 'last_name') required this.lastName,
required this.email, required this.email,
required this.password, required this.password,
@JsonKey(name: 'password_confirmation') required this.passwordConfirmation, @JsonKey(name: 'password_confirmation')
required this.passwordConfirmation,
@JsonKey(name: 'terms') this.termsAccepted = 'accepted', @JsonKey(name: 'terms') this.termsAccepted = 'accepted',
required this.birthdate, required this.birthdate,
required this.gender, required this.gender,
@@ -507,7 +490,8 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
@JsonKey(name: 'additional_info') required this.additionalInfo, @JsonKey(name: 'additional_info') required this.additionalInfo,
@JsonKey(name: 'activity_coefficient') this.activityCoefficient = 1.2}); @JsonKey(name: 'activity_coefficient') this.activityCoefficient = 1.2});
factory _$UserRegistrationSheetImpl.fromJson(Map<String, dynamic> json) => _$$UserRegistrationSheetImplFromJson(json); factory _$UserRegistrationSheetImpl.fromJson(Map<String, dynamic> json) =>
_$$UserRegistrationSheetImplFromJson(json);
@override @override
@JsonKey(name: 'first_name') @JsonKey(name: 'first_name')
@@ -593,33 +577,54 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$UserRegistrationSheetImpl && other is _$UserRegistrationSheetImpl &&
(identical(other.firstName, firstName) || other.firstName == firstName) && (identical(other.firstName, firstName) ||
(identical(other.lastName, lastName) || other.lastName == lastName) && other.firstName == firstName) &&
(identical(other.lastName, lastName) ||
other.lastName == lastName) &&
(identical(other.email, email) || other.email == email) && (identical(other.email, email) || other.email == email) &&
(identical(other.password, password) || other.password == password) && (identical(other.password, password) ||
(identical(other.passwordConfirmation, passwordConfirmation) || other.passwordConfirmation == passwordConfirmation) && other.password == password) &&
(identical(other.termsAccepted, termsAccepted) || other.termsAccepted == termsAccepted) && (identical(other.passwordConfirmation, passwordConfirmation) ||
(identical(other.birthdate, birthdate) || other.birthdate == birthdate) && other.passwordConfirmation == passwordConfirmation) &&
(identical(other.termsAccepted, termsAccepted) ||
other.termsAccepted == termsAccepted) &&
(identical(other.birthdate, birthdate) ||
other.birthdate == birthdate) &&
(identical(other.gender, gender) || other.gender == gender) && (identical(other.gender, gender) || other.gender == gender) &&
(identical(other.location, location) || other.location == location) && (identical(other.location, location) ||
(identical(other.responseBody, responseBody) || other.responseBody == responseBody) && other.location == location) &&
(identical(other.responseBody, responseBody) ||
other.responseBody == responseBody) &&
(identical(other.lang, lang) || other.lang == lang) && (identical(other.lang, lang) || other.lang == lang) &&
(identical(other.weight, weight) || other.weight == weight) && (identical(other.weight, weight) || other.weight == weight) &&
(identical(other.height, height) || other.height == height) && (identical(other.height, height) || other.height == height) &&
(identical(other.chestCircumference, chestCircumference) || other.chestCircumference == chestCircumference) && (identical(other.chestCircumference, chestCircumference) ||
(identical(other.waistCircumference, waistCircumference) || other.waistCircumference == waistCircumference) && other.chestCircumference == chestCircumference) &&
(identical(other.hipCircumference, hipCircumference) || other.hipCircumference == hipCircumference) && (identical(other.waistCircumference, waistCircumference) ||
(identical(other.bloodPressureUp, bloodPressureUp) || other.bloodPressureUp == bloodPressureUp) && other.waistCircumference == waistCircumference) &&
(identical(other.bloodPressureDown, bloodPressureDown) || other.bloodPressureDown == bloodPressureDown) && (identical(other.hipCircumference, hipCircumference) ||
other.hipCircumference == hipCircumference) &&
(identical(other.bloodPressureUp, bloodPressureUp) ||
other.bloodPressureUp == bloodPressureUp) &&
(identical(other.bloodPressureDown, bloodPressureDown) ||
other.bloodPressureDown == bloodPressureDown) &&
(identical(other.hasHypo, hasHypo) || other.hasHypo == hasHypo) && (identical(other.hasHypo, hasHypo) || other.hasHypo == hasHypo) &&
(identical(other.hasHyper, hasHyper) || other.hasHyper == hasHyper) && (identical(other.hasHyper, hasHyper) ||
(identical(other.aboutAllergy, aboutAllergy) || other.aboutAllergy == aboutAllergy) && other.hasHyper == hasHyper) &&
(identical(other.aboutTakingPils, aboutTakingPils) || other.aboutTakingPils == aboutTakingPils) && (identical(other.aboutAllergy, aboutAllergy) ||
(identical(other.aboutSportHobbies, aboutSportHobbies) || other.aboutSportHobbies == aboutSportHobbies) && other.aboutAllergy == aboutAllergy) &&
(identical(other.favoriteFoods, favoriteFoods) || other.favoriteFoods == favoriteFoods) && (identical(other.aboutTakingPils, aboutTakingPils) ||
(identical(other.unfavoriteFoods, unfavoriteFoods) || other.unfavoriteFoods == unfavoriteFoods) && other.aboutTakingPils == aboutTakingPils) &&
(identical(other.additionalInfo, additionalInfo) || other.additionalInfo == additionalInfo) && (identical(other.aboutSportHobbies, aboutSportHobbies) ||
(identical(other.activityCoefficient, activityCoefficient) || other.activityCoefficient == activityCoefficient)); other.aboutSportHobbies == aboutSportHobbies) &&
(identical(other.favoriteFoods, favoriteFoods) ||
other.favoriteFoods == favoriteFoods) &&
(identical(other.unfavoriteFoods, unfavoriteFoods) ||
other.unfavoriteFoods == unfavoriteFoods) &&
(identical(other.additionalInfo, additionalInfo) ||
other.additionalInfo == additionalInfo) &&
(identical(other.activityCoefficient, activityCoefficient) ||
other.activityCoefficient == activityCoefficient));
} }
@JsonKey(ignore: true) @JsonKey(ignore: true)
@@ -658,8 +663,9 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl> get copyWith => _$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl>
__$$UserRegistrationSheetImplCopyWithImpl<_$UserRegistrationSheetImpl>(this, _$identity); get copyWith => __$$UserRegistrationSheetImplCopyWithImpl<
_$UserRegistrationSheetImpl>(this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -675,7 +681,8 @@ abstract class _UserRegistrationSheet implements UserRegistrationSheet {
@JsonKey(name: 'last_name') required final String lastName, @JsonKey(name: 'last_name') required final String lastName,
required final String email, required final String email,
required final String password, required final String password,
@JsonKey(name: 'password_confirmation') required final String passwordConfirmation, @JsonKey(name: 'password_confirmation')
required final String passwordConfirmation,
@JsonKey(name: 'terms') final String termsAccepted, @JsonKey(name: 'terms') final String termsAccepted,
required final String birthdate, required final String birthdate,
required final String gender, required final String gender,
@@ -684,124 +691,104 @@ abstract class _UserRegistrationSheet implements UserRegistrationSheet {
required final String lang, required final String lang,
required final int weight, required final int weight,
required final int height, required final int height,
@JsonKey(name: 'chest_circumference') required final int chestCircumference, @JsonKey(name: 'chest_circumference')
@JsonKey(name: 'waist_circumference') required final int waistCircumference, required final int chestCircumference,
@JsonKey(name: 'waist_circumference')
required final int waistCircumference,
@JsonKey(name: 'hip_circumference') required final int hipCircumference, @JsonKey(name: 'hip_circumference') required final int hipCircumference,
@JsonKey(name: 'blood_pressure_up') required final int bloodPressureUp, @JsonKey(name: 'blood_pressure_up') required final int bloodPressureUp,
@JsonKey(name: 'blood_pressure_down') required final int bloodPressureDown, @JsonKey(name: 'blood_pressure_down')
required final int bloodPressureDown,
@JsonKey(name: 'has_hypo') required final int hasHypo, @JsonKey(name: 'has_hypo') required final int hasHypo,
@JsonKey(name: 'has_hyper') required final int hasHyper, @JsonKey(name: 'has_hyper') required final int hasHyper,
@JsonKey(name: 'about_alergy') required final String aboutAllergy, @JsonKey(name: 'about_alergy') required final String aboutAllergy,
@JsonKey(name: 'about_taking_pils') required final String aboutTakingPils, @JsonKey(name: 'about_taking_pils') required final String aboutTakingPils,
@JsonKey(name: 'about_sport_hobbies') required final String aboutSportHobbies, @JsonKey(name: 'about_sport_hobbies')
required final String aboutSportHobbies,
@JsonKey(name: 'favorite_foods') required final String favoriteFoods, @JsonKey(name: 'favorite_foods') required final String favoriteFoods,
@JsonKey(name: 'unfavorite_foods') required final String unfavoriteFoods, @JsonKey(name: 'unfavorite_foods') required final String unfavoriteFoods,
@JsonKey(name: 'additional_info') required final String additionalInfo, @JsonKey(name: 'additional_info') required final String additionalInfo,
@JsonKey(name: 'activity_coefficient') final double activityCoefficient}) = _$UserRegistrationSheetImpl; @JsonKey(name: 'activity_coefficient')
final double activityCoefficient}) = _$UserRegistrationSheetImpl;
factory _UserRegistrationSheet.fromJson(Map<String, dynamic> json) = _$UserRegistrationSheetImpl.fromJson; factory _UserRegistrationSheet.fromJson(Map<String, dynamic> json) =
_$UserRegistrationSheetImpl.fromJson;
@override @override
@JsonKey(name: 'first_name') @JsonKey(name: 'first_name')
String get firstName; String get firstName;
@override @override
@JsonKey(name: 'last_name') @JsonKey(name: 'last_name')
String get lastName; String get lastName;
@override @override
String get email; String get email;
@override @override
String get password; String get password;
@override @override
@JsonKey(name: 'password_confirmation') @JsonKey(name: 'password_confirmation')
String get passwordConfirmation; String get passwordConfirmation;
@override @override
@JsonKey(name: 'terms') @JsonKey(name: 'terms')
String get termsAccepted; String get termsAccepted;
@override @override
String get birthdate; String get birthdate;
@override @override
String get gender; String get gender;
@override @override
String get location; String get location;
@override @override
@JsonKey(name: 'response_body') @JsonKey(name: 'response_body')
String get responseBody; String get responseBody;
@override @override
String get lang; String get lang;
@override @override
int get weight; int get weight;
@override @override
int get height; int get height;
@override @override
@JsonKey(name: 'chest_circumference') @JsonKey(name: 'chest_circumference')
int get chestCircumference; int get chestCircumference;
@override @override
@JsonKey(name: 'waist_circumference') @JsonKey(name: 'waist_circumference')
int get waistCircumference; int get waistCircumference;
@override @override
@JsonKey(name: 'hip_circumference') @JsonKey(name: 'hip_circumference')
int get hipCircumference; int get hipCircumference;
@override @override
@JsonKey(name: 'blood_pressure_up') @JsonKey(name: 'blood_pressure_up')
int get bloodPressureUp; int get bloodPressureUp;
@override @override
@JsonKey(name: 'blood_pressure_down') @JsonKey(name: 'blood_pressure_down')
int get bloodPressureDown; int get bloodPressureDown;
@override @override
@JsonKey(name: 'has_hypo') @JsonKey(name: 'has_hypo')
int get hasHypo; int get hasHypo;
@override @override
@JsonKey(name: 'has_hyper') @JsonKey(name: 'has_hyper')
int get hasHyper; int get hasHyper;
@override @override
@JsonKey(name: 'about_alergy') @JsonKey(name: 'about_alergy')
String get aboutAllergy; String get aboutAllergy;
@override @override
@JsonKey(name: 'about_taking_pils') @JsonKey(name: 'about_taking_pils')
String get aboutTakingPils; String get aboutTakingPils;
@override @override
@JsonKey(name: 'about_sport_hobbies') @JsonKey(name: 'about_sport_hobbies')
String get aboutSportHobbies; String get aboutSportHobbies;
@override @override
@JsonKey(name: 'favorite_foods') @JsonKey(name: 'favorite_foods')
String get favoriteFoods; String get favoriteFoods;
@override @override
@JsonKey(name: 'unfavorite_foods') @JsonKey(name: 'unfavorite_foods')
String get unfavoriteFoods; String get unfavoriteFoods;
@override @override
@JsonKey(name: 'additional_info') @JsonKey(name: 'additional_info')
String get additionalInfo; String get additionalInfo;
@override @override
@JsonKey(name: 'activity_coefficient') @JsonKey(name: 'activity_coefficient')
double get activityCoefficient; double get activityCoefficient;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl> get copyWith => throw _privateConstructorUsedError; _$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl>
get copyWith => throw _privateConstructorUsedError;
} }

View File

@@ -6,7 +6,9 @@ part of 'user_registration_model.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$UserRegistrationSheetImpl _$$UserRegistrationSheetImplFromJson(Map<String, dynamic> json) => _$UserRegistrationSheetImpl( _$UserRegistrationSheetImpl _$$UserRegistrationSheetImplFromJson(
Map<String, dynamic> json) =>
_$UserRegistrationSheetImpl(
firstName: json['first_name'] as String, firstName: json['first_name'] as String,
lastName: json['last_name'] as String, lastName: json['last_name'] as String,
email: json['email'] as String, email: json['email'] as String,
@@ -33,10 +35,13 @@ _$UserRegistrationSheetImpl _$$UserRegistrationSheetImplFromJson(Map<String, dyn
favoriteFoods: json['favorite_foods'] as String, favoriteFoods: json['favorite_foods'] as String,
unfavoriteFoods: json['unfavorite_foods'] as String, unfavoriteFoods: json['unfavorite_foods'] as String,
additionalInfo: json['additional_info'] as String, additionalInfo: json['additional_info'] as String,
activityCoefficient: (json['activity_coefficient'] as num?)?.toDouble() ?? 1.2, activityCoefficient:
(json['activity_coefficient'] as num?)?.toDouble() ?? 1.2,
); );
Map<String, dynamic> _$$UserRegistrationSheetImplToJson(_$UserRegistrationSheetImpl instance) => <String, dynamic>{ Map<String, dynamic> _$$UserRegistrationSheetImplToJson(
_$UserRegistrationSheetImpl instance) =>
<String, dynamic>{
'first_name': instance.firstName, 'first_name': instance.firstName,
'last_name': instance.lastName, 'last_name': instance.lastName,
'email': instance.email, 'email': instance.email,

View File

@@ -21,38 +21,30 @@ BlogPostModel _$BlogPostModelFromJson(Map<String, dynamic> json) {
/// @nodoc /// @nodoc
mixin _$BlogPostModel { mixin _$BlogPostModel {
int get id => throw _privateConstructorUsedError; int get id => throw _privateConstructorUsedError;
String get state => throw _privateConstructorUsedError; String get state => throw _privateConstructorUsedError;
String? get image => throw _privateConstructorUsedError; String? get image => throw _privateConstructorUsedError;
String get description => throw _privateConstructorUsedError; String get description => throw _privateConstructorUsedError;
String? get author_name => throw _privateConstructorUsedError; String? get author_name => throw _privateConstructorUsedError;
String? get author_avatar_path => throw _privateConstructorUsedError; String? get author_avatar_path => throw _privateConstructorUsedError;
@JsonKey(name: "youtube_url") @JsonKey(name: "youtube_url")
String get youtubeUrl => throw _privateConstructorUsedError; String get youtubeUrl => throw _privateConstructorUsedError;
@JsonKey(name: "created_at") @JsonKey(name: "created_at")
DateTime get createdAt => throw _privateConstructorUsedError; DateTime get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: "updated_at") @JsonKey(name: "updated_at")
DateTime get updatedAt => throw _privateConstructorUsedError; DateTime get updatedAt => throw _privateConstructorUsedError;
String get title => throw _privateConstructorUsedError; String get title => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$BlogPostModelCopyWith<BlogPostModel> get copyWith => throw _privateConstructorUsedError; $BlogPostModelCopyWith<BlogPostModel> get copyWith =>
throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class $BlogPostModelCopyWith<$Res> { abstract class $BlogPostModelCopyWith<$Res> {
factory $BlogPostModelCopyWith(BlogPostModel value, $Res Function(BlogPostModel) then) = _$BlogPostModelCopyWithImpl<$Res, BlogPostModel>; factory $BlogPostModelCopyWith(
BlogPostModel value, $Res Function(BlogPostModel) then) =
_$BlogPostModelCopyWithImpl<$Res, BlogPostModel>;
@useResult @useResult
$Res call( $Res call(
{int id, {int id,
@@ -68,12 +60,12 @@ abstract class $BlogPostModelCopyWith<$Res> {
} }
/// @nodoc /// @nodoc
class _$BlogPostModelCopyWithImpl<$Res, $Val extends BlogPostModel> implements $BlogPostModelCopyWith<$Res> { class _$BlogPostModelCopyWithImpl<$Res, $Val extends BlogPostModel>
implements $BlogPostModelCopyWith<$Res> {
_$BlogPostModelCopyWithImpl(this._value, this._then); _$BlogPostModelCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -137,9 +129,11 @@ class _$BlogPostModelCopyWithImpl<$Res, $Val extends BlogPostModel> implements $
} }
/// @nodoc /// @nodoc
abstract class _$$BlogPostModelImplCopyWith<$Res> implements $BlogPostModelCopyWith<$Res> { abstract class _$$BlogPostModelImplCopyWith<$Res>
factory _$$BlogPostModelImplCopyWith(_$BlogPostModelImpl value, $Res Function(_$BlogPostModelImpl) then) = __$$BlogPostModelImplCopyWithImpl<$Res>; implements $BlogPostModelCopyWith<$Res> {
factory _$$BlogPostModelImplCopyWith(
_$BlogPostModelImpl value, $Res Function(_$BlogPostModelImpl) then) =
__$$BlogPostModelImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call( $Res call(
@@ -156,8 +150,12 @@ abstract class _$$BlogPostModelImplCopyWith<$Res> implements $BlogPostModelCopyW
} }
/// @nodoc /// @nodoc
class __$$BlogPostModelImplCopyWithImpl<$Res> extends _$BlogPostModelCopyWithImpl<$Res, _$BlogPostModelImpl> implements _$$BlogPostModelImplCopyWith<$Res> { class __$$BlogPostModelImplCopyWithImpl<$Res>
__$$BlogPostModelImplCopyWithImpl(_$BlogPostModelImpl _value, $Res Function(_$BlogPostModelImpl) _then) : super(_value, _then); extends _$BlogPostModelCopyWithImpl<$Res, _$BlogPostModelImpl>
implements _$$BlogPostModelImplCopyWith<$Res> {
__$$BlogPostModelImplCopyWithImpl(
_$BlogPostModelImpl _value, $Res Function(_$BlogPostModelImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -233,7 +231,8 @@ class _$BlogPostModelImpl implements _BlogPostModel {
@JsonKey(name: "updated_at") required this.updatedAt, @JsonKey(name: "updated_at") required this.updatedAt,
required this.title}); required this.title});
factory _$BlogPostModelImpl.fromJson(Map<String, dynamic> json) => _$$BlogPostModelImplFromJson(json); factory _$BlogPostModelImpl.fromJson(Map<String, dynamic> json) =>
_$$BlogPostModelImplFromJson(json);
@override @override
final int id; final int id;
@@ -272,23 +271,31 @@ class _$BlogPostModelImpl implements _BlogPostModel {
(identical(other.id, id) || other.id == id) && (identical(other.id, id) || other.id == id) &&
(identical(other.state, state) || other.state == state) && (identical(other.state, state) || other.state == state) &&
(identical(other.image, image) || other.image == image) && (identical(other.image, image) || other.image == image) &&
(identical(other.description, description) || other.description == description) && (identical(other.description, description) ||
(identical(other.author_name, author_name) || other.author_name == author_name) && other.description == description) &&
(identical(other.author_avatar_path, author_avatar_path) || other.author_avatar_path == author_avatar_path) && (identical(other.author_name, author_name) ||
(identical(other.youtubeUrl, youtubeUrl) || other.youtubeUrl == youtubeUrl) && other.author_name == author_name) &&
(identical(other.createdAt, createdAt) || other.createdAt == createdAt) && (identical(other.author_avatar_path, author_avatar_path) ||
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) && other.author_avatar_path == author_avatar_path) &&
(identical(other.youtubeUrl, youtubeUrl) ||
other.youtubeUrl == youtubeUrl) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.title, title) || other.title == title)); (identical(other.title, title) || other.title == title));
} }
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
int get hashCode => Object.hash(runtimeType, id, state, image, description, author_name, author_avatar_path, youtubeUrl, createdAt, updatedAt, title); int get hashCode => Object.hash(runtimeType, id, state, image, description,
author_name, author_avatar_path, youtubeUrl, createdAt, updatedAt, title);
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$BlogPostModelImplCopyWith<_$BlogPostModelImpl> get copyWith => __$$BlogPostModelImplCopyWithImpl<_$BlogPostModelImpl>(this, _$identity); _$$BlogPostModelImplCopyWith<_$BlogPostModelImpl> get copyWith =>
__$$BlogPostModelImplCopyWithImpl<_$BlogPostModelImpl>(this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -311,42 +318,34 @@ abstract class _BlogPostModel implements BlogPostModel {
@JsonKey(name: "updated_at") required final DateTime updatedAt, @JsonKey(name: "updated_at") required final DateTime updatedAt,
required final String title}) = _$BlogPostModelImpl; required final String title}) = _$BlogPostModelImpl;
factory _BlogPostModel.fromJson(Map<String, dynamic> json) = _$BlogPostModelImpl.fromJson; factory _BlogPostModel.fromJson(Map<String, dynamic> json) =
_$BlogPostModelImpl.fromJson;
@override @override
int get id; int get id;
@override @override
String get state; String get state;
@override @override
String? get image; String? get image;
@override @override
String get description; String get description;
@override @override
String? get author_name; String? get author_name;
@override @override
String? get author_avatar_path; String? get author_avatar_path;
@override @override
@JsonKey(name: "youtube_url") @JsonKey(name: "youtube_url")
String get youtubeUrl; String get youtubeUrl;
@override @override
@JsonKey(name: "created_at") @JsonKey(name: "created_at")
DateTime get createdAt; DateTime get createdAt;
@override @override
@JsonKey(name: "updated_at") @JsonKey(name: "updated_at")
DateTime get updatedAt; DateTime get updatedAt;
@override @override
String get title; String get title;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$BlogPostModelImplCopyWith<_$BlogPostModelImpl> get copyWith => throw _privateConstructorUsedError; _$$BlogPostModelImplCopyWith<_$BlogPostModelImpl> get copyWith =>
throw _privateConstructorUsedError;
} }

View File

@@ -6,7 +6,8 @@ part of 'blog_post_model.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$BlogPostModelImpl _$$BlogPostModelImplFromJson(Map<String, dynamic> json) => _$BlogPostModelImpl( _$BlogPostModelImpl _$$BlogPostModelImplFromJson(Map<String, dynamic> json) =>
_$BlogPostModelImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
state: json['state'] as String, state: json['state'] as String,
image: json['image'] as String?, image: json['image'] as String?,
@@ -19,7 +20,8 @@ _$BlogPostModelImpl _$$BlogPostModelImplFromJson(Map<String, dynamic> json) => _
title: json['title'] as String, title: json['title'] as String,
); );
Map<String, dynamic> _$$BlogPostModelImplToJson(_$BlogPostModelImpl instance) => <String, dynamic>{ Map<String, dynamic> _$$BlogPostModelImplToJson(_$BlogPostModelImpl instance) =>
<String, dynamic>{
'id': instance.id, 'id': instance.id,
'state': instance.state, 'state': instance.state,
'image': instance.image, 'image': instance.image,

View File

@@ -24,7 +24,6 @@ mixin _$BlogPostState {
required TResult Function(String errorMessage) error, required TResult Function(String errorMessage) error,
}) => }) =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
@optionalTypeArgs @optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>( TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, { TResult? Function()? $default, {
@@ -71,28 +70,36 @@ mixin _$BlogPostState {
/// @nodoc /// @nodoc
abstract class $BlogPostStateCopyWith<$Res> { abstract class $BlogPostStateCopyWith<$Res> {
factory $BlogPostStateCopyWith(BlogPostState value, $Res Function(BlogPostState) then) = _$BlogPostStateCopyWithImpl<$Res, BlogPostState>; factory $BlogPostStateCopyWith(
BlogPostState value, $Res Function(BlogPostState) then) =
_$BlogPostStateCopyWithImpl<$Res, BlogPostState>;
} }
/// @nodoc /// @nodoc
class _$BlogPostStateCopyWithImpl<$Res, $Val extends BlogPostState> implements $BlogPostStateCopyWith<$Res> { class _$BlogPostStateCopyWithImpl<$Res, $Val extends BlogPostState>
implements $BlogPostStateCopyWith<$Res> {
_$BlogPostStateCopyWithImpl(this._value, this._then); _$BlogPostStateCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
} }
/// @nodoc /// @nodoc
abstract class _$$BlogPostStateImplCopyWith<$Res> { abstract class _$$BlogPostStateImplCopyWith<$Res> {
factory _$$BlogPostStateImplCopyWith(_$BlogPostStateImpl value, $Res Function(_$BlogPostStateImpl) then) = __$$BlogPostStateImplCopyWithImpl<$Res>; factory _$$BlogPostStateImplCopyWith(
_$BlogPostStateImpl value, $Res Function(_$BlogPostStateImpl) then) =
__$$BlogPostStateImplCopyWithImpl<$Res>;
} }
/// @nodoc /// @nodoc
class __$$BlogPostStateImplCopyWithImpl<$Res> extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateImpl> implements _$$BlogPostStateImplCopyWith<$Res> { class __$$BlogPostStateImplCopyWithImpl<$Res>
__$$BlogPostStateImplCopyWithImpl(_$BlogPostStateImpl _value, $Res Function(_$BlogPostStateImpl) _then) : super(_value, _then); extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateImpl>
implements _$$BlogPostStateImplCopyWith<$Res> {
__$$BlogPostStateImplCopyWithImpl(
_$BlogPostStateImpl _value, $Res Function(_$BlogPostStateImpl) _then)
: super(_value, _then);
} }
/// @nodoc /// @nodoc
@@ -107,7 +114,8 @@ class _$BlogPostStateImpl implements _BlogPostState {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType && other is _$BlogPostStateImpl); return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$BlogPostStateImpl);
} }
@override @override
@@ -194,14 +202,18 @@ abstract class _BlogPostState implements BlogPostState {
/// @nodoc /// @nodoc
abstract class _$$BlogPostStateLoadingImplCopyWith<$Res> { abstract class _$$BlogPostStateLoadingImplCopyWith<$Res> {
factory _$$BlogPostStateLoadingImplCopyWith(_$BlogPostStateLoadingImpl value, $Res Function(_$BlogPostStateLoadingImpl) then) = factory _$$BlogPostStateLoadingImplCopyWith(_$BlogPostStateLoadingImpl value,
$Res Function(_$BlogPostStateLoadingImpl) then) =
__$$BlogPostStateLoadingImplCopyWithImpl<$Res>; __$$BlogPostStateLoadingImplCopyWithImpl<$Res>;
} }
/// @nodoc /// @nodoc
class __$$BlogPostStateLoadingImplCopyWithImpl<$Res> extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateLoadingImpl> class __$$BlogPostStateLoadingImplCopyWithImpl<$Res>
extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateLoadingImpl>
implements _$$BlogPostStateLoadingImplCopyWith<$Res> { implements _$$BlogPostStateLoadingImplCopyWith<$Res> {
__$$BlogPostStateLoadingImplCopyWithImpl(_$BlogPostStateLoadingImpl _value, $Res Function(_$BlogPostStateLoadingImpl) _then) : super(_value, _then); __$$BlogPostStateLoadingImplCopyWithImpl(_$BlogPostStateLoadingImpl _value,
$Res Function(_$BlogPostStateLoadingImpl) _then)
: super(_value, _then);
} }
/// @nodoc /// @nodoc
@@ -216,7 +228,9 @@ class _$BlogPostStateLoadingImpl implements BlogPostStateLoading {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType && other is _$BlogPostStateLoadingImpl); return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$BlogPostStateLoadingImpl);
} }
@override @override
@@ -303,9 +317,9 @@ abstract class BlogPostStateLoading implements BlogPostState {
/// @nodoc /// @nodoc
abstract class _$$BlogPostStateLoadedImplCopyWith<$Res> { abstract class _$$BlogPostStateLoadedImplCopyWith<$Res> {
factory _$$BlogPostStateLoadedImplCopyWith(_$BlogPostStateLoadedImpl value, $Res Function(_$BlogPostStateLoadedImpl) then) = factory _$$BlogPostStateLoadedImplCopyWith(_$BlogPostStateLoadedImpl value,
$Res Function(_$BlogPostStateLoadedImpl) then) =
__$$BlogPostStateLoadedImplCopyWithImpl<$Res>; __$$BlogPostStateLoadedImplCopyWithImpl<$Res>;
@useResult @useResult
$Res call({BlogPostModel blogPost}); $Res call({BlogPostModel blogPost});
@@ -313,9 +327,12 @@ abstract class _$$BlogPostStateLoadedImplCopyWith<$Res> {
} }
/// @nodoc /// @nodoc
class __$$BlogPostStateLoadedImplCopyWithImpl<$Res> extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateLoadedImpl> class __$$BlogPostStateLoadedImplCopyWithImpl<$Res>
extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateLoadedImpl>
implements _$$BlogPostStateLoadedImplCopyWith<$Res> { implements _$$BlogPostStateLoadedImplCopyWith<$Res> {
__$$BlogPostStateLoadedImplCopyWithImpl(_$BlogPostStateLoadedImpl _value, $Res Function(_$BlogPostStateLoadedImpl) _then) : super(_value, _then); __$$BlogPostStateLoadedImplCopyWithImpl(_$BlogPostStateLoadedImpl _value,
$Res Function(_$BlogPostStateLoadedImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -355,7 +372,10 @@ class _$BlogPostStateLoadedImpl implements BlogPostStateLoaded {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$BlogPostStateLoadedImpl && (identical(other.blogPost, blogPost) || other.blogPost == blogPost)); (other.runtimeType == runtimeType &&
other is _$BlogPostStateLoadedImpl &&
(identical(other.blogPost, blogPost) ||
other.blogPost == blogPost));
} }
@override @override
@@ -365,7 +385,8 @@ class _$BlogPostStateLoadedImpl implements BlogPostStateLoaded {
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$BlogPostStateLoadedImplCopyWith<_$BlogPostStateLoadedImpl> get copyWith => _$$BlogPostStateLoadedImplCopyWith<_$BlogPostStateLoadedImpl> get copyWith =>
__$$BlogPostStateLoadedImplCopyWithImpl<_$BlogPostStateLoadedImpl>(this, _$identity); __$$BlogPostStateLoadedImplCopyWithImpl<_$BlogPostStateLoadedImpl>(
this, _$identity);
@override @override
@optionalTypeArgs @optionalTypeArgs
@@ -443,27 +464,31 @@ class _$BlogPostStateLoadedImpl implements BlogPostStateLoaded {
} }
abstract class BlogPostStateLoaded implements BlogPostState { abstract class BlogPostStateLoaded implements BlogPostState {
const factory BlogPostStateLoaded({required final BlogPostModel blogPost}) = _$BlogPostStateLoadedImpl; const factory BlogPostStateLoaded({required final BlogPostModel blogPost}) =
_$BlogPostStateLoadedImpl;
BlogPostModel get blogPost; BlogPostModel get blogPost;
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$BlogPostStateLoadedImplCopyWith<_$BlogPostStateLoadedImpl> get copyWith => throw _privateConstructorUsedError; _$$BlogPostStateLoadedImplCopyWith<_$BlogPostStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class _$$BlogPostStateErrorImplCopyWith<$Res> { abstract class _$$BlogPostStateErrorImplCopyWith<$Res> {
factory _$$BlogPostStateErrorImplCopyWith(_$BlogPostStateErrorImpl value, $Res Function(_$BlogPostStateErrorImpl) then) = factory _$$BlogPostStateErrorImplCopyWith(_$BlogPostStateErrorImpl value,
$Res Function(_$BlogPostStateErrorImpl) then) =
__$$BlogPostStateErrorImplCopyWithImpl<$Res>; __$$BlogPostStateErrorImplCopyWithImpl<$Res>;
@useResult @useResult
$Res call({String errorMessage}); $Res call({String errorMessage});
} }
/// @nodoc /// @nodoc
class __$$BlogPostStateErrorImplCopyWithImpl<$Res> extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateErrorImpl> class __$$BlogPostStateErrorImplCopyWithImpl<$Res>
extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateErrorImpl>
implements _$$BlogPostStateErrorImplCopyWith<$Res> { implements _$$BlogPostStateErrorImplCopyWith<$Res> {
__$$BlogPostStateErrorImplCopyWithImpl(_$BlogPostStateErrorImpl _value, $Res Function(_$BlogPostStateErrorImpl) _then) : super(_value, _then); __$$BlogPostStateErrorImplCopyWithImpl(_$BlogPostStateErrorImpl _value,
$Res Function(_$BlogPostStateErrorImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -497,7 +522,8 @@ class _$BlogPostStateErrorImpl implements BlogPostStateError {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$BlogPostStateErrorImpl && other is _$BlogPostStateErrorImpl &&
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)); (identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
} }
@override @override
@@ -507,7 +533,8 @@ class _$BlogPostStateErrorImpl implements BlogPostStateError {
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$BlogPostStateErrorImplCopyWith<_$BlogPostStateErrorImpl> get copyWith => _$$BlogPostStateErrorImplCopyWith<_$BlogPostStateErrorImpl> get copyWith =>
__$$BlogPostStateErrorImplCopyWithImpl<_$BlogPostStateErrorImpl>(this, _$identity); __$$BlogPostStateErrorImplCopyWithImpl<_$BlogPostStateErrorImpl>(
this, _$identity);
@override @override
@optionalTypeArgs @optionalTypeArgs
@@ -585,10 +612,11 @@ class _$BlogPostStateErrorImpl implements BlogPostStateError {
} }
abstract class BlogPostStateError implements BlogPostState { abstract class BlogPostStateError implements BlogPostState {
const factory BlogPostStateError({required final String errorMessage}) = _$BlogPostStateErrorImpl; const factory BlogPostStateError({required final String errorMessage}) =
_$BlogPostStateErrorImpl;
String get errorMessage; String get errorMessage;
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$BlogPostStateErrorImplCopyWith<_$BlogPostStateErrorImpl> get copyWith => throw _privateConstructorUsedError; _$$BlogPostStateErrorImplCopyWith<_$BlogPostStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
} }

View File

@@ -177,7 +177,7 @@ class BlogPostScreen extends StatelessWidget {
style: theme.textTheme.bodyMedium, style: theme.textTheme.bodyMedium,
), ),
), ),
SizedBox(height: 16.0), SizedBox(height: 8),
Row( Row(
children: [ children: [
Padding( Padding(

View File

@@ -24,28 +24,31 @@ class _BlogPostService implements BlogPostService {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{}; final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null; const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(_setStreamType<BlogPostModel>(Options( final _result = await _dio
.fetch<Map<String, dynamic>>(_setStreamType<BlogPostModel>(Options(
method: 'GET', method: 'GET',
headers: _headers, headers: _headers,
extra: _extra, extra: _extra,
) )
.compose( .compose(
_dio.options, _dio.options,
'/api/blogPosts/show/${id}', '/api/blogPosts/show/${id}',
queryParameters: queryParameters, queryParameters: queryParameters,
data: _data, data: _data,
) )
.copyWith( .copyWith(
baseUrl: _combineBaseUrls( baseUrl: _combineBaseUrls(
_dio.options.baseUrl, _dio.options.baseUrl,
baseUrl, baseUrl,
)))); ))));
final _value = BlogPostModel.fromJson(_result.data!); final _value = BlogPostModel.fromJson(_result.data!);
return _value; return _value;
} }
RequestOptions _setStreamType<T>(RequestOptions requestOptions) { 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) { if (T == String) {
requestOptions.responseType = ResponseType.plain; requestOptions.responseType = ResponseType.plain;
} else { } else {

View File

@@ -1,7 +1,6 @@
import 'dart:io'; import 'dart:io';
import 'package:eatvio_app/core/app_export.dart'; import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
import 'package:eatvio_app/widgets/custom_text_form_field.dart'; import 'package:eatvio_app/widgets/custom_text_form_field.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
@@ -51,68 +50,58 @@ class _BlogPostCreateScreenState extends State<BlogPostCreateScreen> {
_buildBlogPostCreate(BuildContext context, BlogPostCreateLoadedState state) { _buildBlogPostCreate(BuildContext context, BlogPostCreateLoadedState state) {
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
body: Container( appBar: AppBar(),
width: double.maxFinite, floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
decoration: AppDecoration.fillGray, floatingActionButton: SizedBox(
child: ListView( 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.blueA400,
onPressed: () => _submitForm(context, state.title!.text, state.description!.text, state.youtubeURL!.text),
label: Text(
'Создать',
style: theme.textTheme.titleSmall,
),
),
),
body: SingleChildScrollView(
padding: EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox(height: 30.v), Text('Заголовок'),
Container( SizedBox(height: 8),
margin: EdgeInsets.only( CustomTextFormField(
left: 16.h, controller: state.title,
right: 20.h, validator: _validateTitle,
bottom: 10.h,
),
padding: EdgeInsets.all(12.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: const BorderRadius.all(Radius.circular(12)),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 2,
blurRadius: 5,
offset: Offset(0, 3),
),
],
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Column(
children: <Widget>[
Text("Заголовок новости", style: theme.textTheme.bodyLarge),
CustomTextFormField(
controller: state.title,
validator: _validateTitle,
),
SizedBox(height: 8.0),
Text("Ссылка на YouTube", style: theme.textTheme.bodyLarge),
CustomTextFormField(
controller: state.youtubeURL,
validator: _validateYouTubeLink,
),
SizedBox(height: 8.0),
Text("Описание", style: theme.textTheme.bodyLarge),
CustomTextFormField(
controller: state.description,
validator: _validateDescription,
maxLines: 6,
),
SizedBox(height: 16.0),
_buildAddPhoto(context, state),
SizedBox(height: 16.0),
// Add widget for image upload here
CustomOutlinedButton(
onPressed: () => _submitForm(context, state.title!.text, state.description!.text, state.youtubeURL!.text),
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
text: 'Создать',
),
],
),
],
),
), ),
SizedBox(height: 16),
Text('Описание'),
SizedBox(height: 8),
CustomTextFormField(
controller: state.description,
validator: _validateDescription,
maxLines: 6,
minLines: 1,
),
SizedBox(height: 16),
Text('Ссылка на видео'),
SizedBox(height: 8),
CustomTextFormField(
controller: state.youtubeURL,
validator: _validateYouTubeLink,
),
SizedBox(height: 16),
Text('Изображение поста'),
SizedBox(height: 8),
_buildAddPhoto(context, state),
SizedBox(height: 80),
], ],
), ),
), ),
@@ -145,47 +134,34 @@ _buildAddPhoto(BuildContext context, BlogPostCreateLoadedState state) {
children: [ children: [
if (state.image == null) if (state.image == null)
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 10.h), height: 128,
padding: EdgeInsets.symmetric(
horizontal: 40.h,
vertical: 80.v,
),
decoration: AppDecoration.fillGray.copyWith( decoration: AppDecoration.fillGray.copyWith(
borderRadius: BorderRadiusStyle.roundedBorder5, borderRadius: BorderRadius.circular(16),
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Padding(
padding: EdgeInsets.only(
left: 7.h,
top: 5.v,
),
child: Text(
"Добавить фото",
selectionColor: appTheme.blueA400,
),
),
Spacer(),
Icon( Icon(
Icons.photo_library, Icons.photo_library,
color: appTheme.blueGray300, color: appTheme.blueGray300,
), ),
SizedBox(width: 8),
Text(
"Добавить фото",
selectionColor: appTheme.blueA400,
),
], ],
), ),
), ),
if (state.image != null) if (state.image != null)
Container( ClipRRect(
margin: EdgeInsets.symmetric(horizontal: 10.h), borderRadius: BorderRadius.circular(16),
padding: EdgeInsets.symmetric( child: Image(
horizontal: 40.h, image: FileImage(
vertical: 80.v, File(state.image!.path),
),
), ),
decoration: AppDecoration.fillGray.copyWith(
borderRadius: BorderRadiusStyle.roundedBorder5,
),
child: Image(image: FileImage(File(state.image!.path))),
) )
], ],
), ),

View File

@@ -24,7 +24,6 @@ mixin _$NewMessagesState {
required TResult Function(String errorMessage) error, required TResult Function(String errorMessage) error,
}) => }) =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
@optionalTypeArgs @optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>( TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, { TResult? Function()? $default, {
@@ -71,30 +70,36 @@ mixin _$NewMessagesState {
/// @nodoc /// @nodoc
abstract class $NewMessagesStateCopyWith<$Res> { abstract class $NewMessagesStateCopyWith<$Res> {
factory $NewMessagesStateCopyWith(NewMessagesState value, $Res Function(NewMessagesState) then) = _$NewMessagesStateCopyWithImpl<$Res, NewMessagesState>; factory $NewMessagesStateCopyWith(
NewMessagesState value, $Res Function(NewMessagesState) then) =
_$NewMessagesStateCopyWithImpl<$Res, NewMessagesState>;
} }
/// @nodoc /// @nodoc
class _$NewMessagesStateCopyWithImpl<$Res, $Val extends NewMessagesState> implements $NewMessagesStateCopyWith<$Res> { class _$NewMessagesStateCopyWithImpl<$Res, $Val extends NewMessagesState>
implements $NewMessagesStateCopyWith<$Res> {
_$NewMessagesStateCopyWithImpl(this._value, this._then); _$NewMessagesStateCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
} }
/// @nodoc /// @nodoc
abstract class _$$NewMessagesStateImplCopyWith<$Res> { abstract class _$$NewMessagesStateImplCopyWith<$Res> {
factory _$$NewMessagesStateImplCopyWith(_$NewMessagesStateImpl value, $Res Function(_$NewMessagesStateImpl) then) = factory _$$NewMessagesStateImplCopyWith(_$NewMessagesStateImpl value,
$Res Function(_$NewMessagesStateImpl) then) =
__$$NewMessagesStateImplCopyWithImpl<$Res>; __$$NewMessagesStateImplCopyWithImpl<$Res>;
} }
/// @nodoc /// @nodoc
class __$$NewMessagesStateImplCopyWithImpl<$Res> extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateImpl> class __$$NewMessagesStateImplCopyWithImpl<$Res>
extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateImpl>
implements _$$NewMessagesStateImplCopyWith<$Res> { implements _$$NewMessagesStateImplCopyWith<$Res> {
__$$NewMessagesStateImplCopyWithImpl(_$NewMessagesStateImpl _value, $Res Function(_$NewMessagesStateImpl) _then) : super(_value, _then); __$$NewMessagesStateImplCopyWithImpl(_$NewMessagesStateImpl _value,
$Res Function(_$NewMessagesStateImpl) _then)
: super(_value, _then);
} }
/// @nodoc /// @nodoc
@@ -109,7 +114,8 @@ class _$NewMessagesStateImpl implements _NewMessagesState {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType && other is _$NewMessagesStateImpl); return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$NewMessagesStateImpl);
} }
@override @override
@@ -196,14 +202,19 @@ abstract class _NewMessagesState implements NewMessagesState {
/// @nodoc /// @nodoc
abstract class _$$NewMessagesStateEmptyImplCopyWith<$Res> { abstract class _$$NewMessagesStateEmptyImplCopyWith<$Res> {
factory _$$NewMessagesStateEmptyImplCopyWith(_$NewMessagesStateEmptyImpl value, $Res Function(_$NewMessagesStateEmptyImpl) then) = factory _$$NewMessagesStateEmptyImplCopyWith(
_$NewMessagesStateEmptyImpl value,
$Res Function(_$NewMessagesStateEmptyImpl) then) =
__$$NewMessagesStateEmptyImplCopyWithImpl<$Res>; __$$NewMessagesStateEmptyImplCopyWithImpl<$Res>;
} }
/// @nodoc /// @nodoc
class __$$NewMessagesStateEmptyImplCopyWithImpl<$Res> extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateEmptyImpl> class __$$NewMessagesStateEmptyImplCopyWithImpl<$Res>
extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateEmptyImpl>
implements _$$NewMessagesStateEmptyImplCopyWith<$Res> { implements _$$NewMessagesStateEmptyImplCopyWith<$Res> {
__$$NewMessagesStateEmptyImplCopyWithImpl(_$NewMessagesStateEmptyImpl _value, $Res Function(_$NewMessagesStateEmptyImpl) _then) : super(_value, _then); __$$NewMessagesStateEmptyImplCopyWithImpl(_$NewMessagesStateEmptyImpl _value,
$Res Function(_$NewMessagesStateEmptyImpl) _then)
: super(_value, _then);
} }
/// @nodoc /// @nodoc
@@ -218,7 +229,9 @@ class _$NewMessagesStateEmptyImpl implements NewMessagesStateEmpty {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType && other is _$NewMessagesStateEmptyImpl); return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$NewMessagesStateEmptyImpl);
} }
@override @override
@@ -305,17 +318,22 @@ abstract class NewMessagesStateEmpty implements NewMessagesState {
/// @nodoc /// @nodoc
abstract class _$$NewMessagesStateLoadedImplCopyWith<$Res> { abstract class _$$NewMessagesStateLoadedImplCopyWith<$Res> {
factory _$$NewMessagesStateLoadedImplCopyWith(_$NewMessagesStateLoadedImpl value, $Res Function(_$NewMessagesStateLoadedImpl) then) = factory _$$NewMessagesStateLoadedImplCopyWith(
_$NewMessagesStateLoadedImpl value,
$Res Function(_$NewMessagesStateLoadedImpl) then) =
__$$NewMessagesStateLoadedImplCopyWithImpl<$Res>; __$$NewMessagesStateLoadedImplCopyWithImpl<$Res>;
@useResult @useResult
$Res call({int messagesCount}); $Res call({int messagesCount});
} }
/// @nodoc /// @nodoc
class __$$NewMessagesStateLoadedImplCopyWithImpl<$Res> extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateLoadedImpl> class __$$NewMessagesStateLoadedImplCopyWithImpl<$Res>
extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateLoadedImpl>
implements _$$NewMessagesStateLoadedImplCopyWith<$Res> { implements _$$NewMessagesStateLoadedImplCopyWith<$Res> {
__$$NewMessagesStateLoadedImplCopyWithImpl(_$NewMessagesStateLoadedImpl _value, $Res Function(_$NewMessagesStateLoadedImpl) _then) : super(_value, _then); __$$NewMessagesStateLoadedImplCopyWithImpl(
_$NewMessagesStateLoadedImpl _value,
$Res Function(_$NewMessagesStateLoadedImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -349,7 +367,8 @@ class _$NewMessagesStateLoadedImpl implements NewMessagesStateLoaded {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$NewMessagesStateLoadedImpl && other is _$NewMessagesStateLoadedImpl &&
(identical(other.messagesCount, messagesCount) || other.messagesCount == messagesCount)); (identical(other.messagesCount, messagesCount) ||
other.messagesCount == messagesCount));
} }
@override @override
@@ -358,8 +377,9 @@ class _$NewMessagesStateLoadedImpl implements NewMessagesStateLoaded {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl> get copyWith => _$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl>
__$$NewMessagesStateLoadedImplCopyWithImpl<_$NewMessagesStateLoadedImpl>(this, _$identity); get copyWith => __$$NewMessagesStateLoadedImplCopyWithImpl<
_$NewMessagesStateLoadedImpl>(this, _$identity);
@override @override
@optionalTypeArgs @optionalTypeArgs
@@ -437,27 +457,32 @@ class _$NewMessagesStateLoadedImpl implements NewMessagesStateLoaded {
} }
abstract class NewMessagesStateLoaded implements NewMessagesState { abstract class NewMessagesStateLoaded implements NewMessagesState {
const factory NewMessagesStateLoaded({required final int messagesCount}) = _$NewMessagesStateLoadedImpl; const factory NewMessagesStateLoaded({required final int messagesCount}) =
_$NewMessagesStateLoadedImpl;
int get messagesCount; int get messagesCount;
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl> get copyWith => throw _privateConstructorUsedError; _$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl>
get copyWith => throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class _$$NewMessagesStateErrorImplCopyWith<$Res> { abstract class _$$NewMessagesStateErrorImplCopyWith<$Res> {
factory _$$NewMessagesStateErrorImplCopyWith(_$NewMessagesStateErrorImpl value, $Res Function(_$NewMessagesStateErrorImpl) then) = factory _$$NewMessagesStateErrorImplCopyWith(
_$NewMessagesStateErrorImpl value,
$Res Function(_$NewMessagesStateErrorImpl) then) =
__$$NewMessagesStateErrorImplCopyWithImpl<$Res>; __$$NewMessagesStateErrorImplCopyWithImpl<$Res>;
@useResult @useResult
$Res call({String errorMessage}); $Res call({String errorMessage});
} }
/// @nodoc /// @nodoc
class __$$NewMessagesStateErrorImplCopyWithImpl<$Res> extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateErrorImpl> class __$$NewMessagesStateErrorImplCopyWithImpl<$Res>
extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateErrorImpl>
implements _$$NewMessagesStateErrorImplCopyWith<$Res> { implements _$$NewMessagesStateErrorImplCopyWith<$Res> {
__$$NewMessagesStateErrorImplCopyWithImpl(_$NewMessagesStateErrorImpl _value, $Res Function(_$NewMessagesStateErrorImpl) _then) : super(_value, _then); __$$NewMessagesStateErrorImplCopyWithImpl(_$NewMessagesStateErrorImpl _value,
$Res Function(_$NewMessagesStateErrorImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -491,7 +516,8 @@ class _$NewMessagesStateErrorImpl implements NewMessagesStateError {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$NewMessagesStateErrorImpl && other is _$NewMessagesStateErrorImpl &&
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)); (identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
} }
@override @override
@@ -500,8 +526,9 @@ class _$NewMessagesStateErrorImpl implements NewMessagesStateError {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl> get copyWith => _$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl>
__$$NewMessagesStateErrorImplCopyWithImpl<_$NewMessagesStateErrorImpl>(this, _$identity); get copyWith => __$$NewMessagesStateErrorImplCopyWithImpl<
_$NewMessagesStateErrorImpl>(this, _$identity);
@override @override
@optionalTypeArgs @optionalTypeArgs
@@ -579,10 +606,11 @@ class _$NewMessagesStateErrorImpl implements NewMessagesStateError {
} }
abstract class NewMessagesStateError implements NewMessagesState { abstract class NewMessagesStateError implements NewMessagesState {
const factory NewMessagesStateError({required final String errorMessage}) = _$NewMessagesStateErrorImpl; const factory NewMessagesStateError({required final String errorMessage}) =
_$NewMessagesStateErrorImpl;
String get errorMessage; String get errorMessage;
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl> get copyWith => throw _privateConstructorUsedError; _$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl>
get copyWith => throw _privateConstructorUsedError;
} }

View File

@@ -24,7 +24,6 @@ mixin _$NotificationsState {
required TResult Function(String errorMessage) error, required TResult Function(String errorMessage) error,
}) => }) =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
@optionalTypeArgs @optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>( TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, { TResult? Function()? $default, {
@@ -71,31 +70,36 @@ mixin _$NotificationsState {
/// @nodoc /// @nodoc
abstract class $NotificationsStateCopyWith<$Res> { abstract class $NotificationsStateCopyWith<$Res> {
factory $NotificationsStateCopyWith(NotificationsState value, $Res Function(NotificationsState) then) = factory $NotificationsStateCopyWith(
NotificationsState value, $Res Function(NotificationsState) then) =
_$NotificationsStateCopyWithImpl<$Res, NotificationsState>; _$NotificationsStateCopyWithImpl<$Res, NotificationsState>;
} }
/// @nodoc /// @nodoc
class _$NotificationsStateCopyWithImpl<$Res, $Val extends NotificationsState> implements $NotificationsStateCopyWith<$Res> { class _$NotificationsStateCopyWithImpl<$Res, $Val extends NotificationsState>
implements $NotificationsStateCopyWith<$Res> {
_$NotificationsStateCopyWithImpl(this._value, this._then); _$NotificationsStateCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
} }
/// @nodoc /// @nodoc
abstract class _$$NotificationsStateImplCopyWith<$Res> { abstract class _$$NotificationsStateImplCopyWith<$Res> {
factory _$$NotificationsStateImplCopyWith(_$NotificationsStateImpl value, $Res Function(_$NotificationsStateImpl) then) = factory _$$NotificationsStateImplCopyWith(_$NotificationsStateImpl value,
$Res Function(_$NotificationsStateImpl) then) =
__$$NotificationsStateImplCopyWithImpl<$Res>; __$$NotificationsStateImplCopyWithImpl<$Res>;
} }
/// @nodoc /// @nodoc
class __$$NotificationsStateImplCopyWithImpl<$Res> extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateImpl> class __$$NotificationsStateImplCopyWithImpl<$Res>
extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateImpl>
implements _$$NotificationsStateImplCopyWith<$Res> { implements _$$NotificationsStateImplCopyWith<$Res> {
__$$NotificationsStateImplCopyWithImpl(_$NotificationsStateImpl _value, $Res Function(_$NotificationsStateImpl) _then) : super(_value, _then); __$$NotificationsStateImplCopyWithImpl(_$NotificationsStateImpl _value,
$Res Function(_$NotificationsStateImpl) _then)
: super(_value, _then);
} }
/// @nodoc /// @nodoc
@@ -110,7 +114,8 @@ class _$NotificationsStateImpl implements _NotificationsState {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType && other is _$NotificationsStateImpl); return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$NotificationsStateImpl);
} }
@override @override
@@ -197,14 +202,21 @@ abstract class _NotificationsState implements NotificationsState {
/// @nodoc /// @nodoc
abstract class _$$NotificationsStateEmptyImplCopyWith<$Res> { abstract class _$$NotificationsStateEmptyImplCopyWith<$Res> {
factory _$$NotificationsStateEmptyImplCopyWith(_$NotificationsStateEmptyImpl value, $Res Function(_$NotificationsStateEmptyImpl) then) = factory _$$NotificationsStateEmptyImplCopyWith(
_$NotificationsStateEmptyImpl value,
$Res Function(_$NotificationsStateEmptyImpl) then) =
__$$NotificationsStateEmptyImplCopyWithImpl<$Res>; __$$NotificationsStateEmptyImplCopyWithImpl<$Res>;
} }
/// @nodoc /// @nodoc
class __$$NotificationsStateEmptyImplCopyWithImpl<$Res> extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateEmptyImpl> class __$$NotificationsStateEmptyImplCopyWithImpl<$Res>
extends _$NotificationsStateCopyWithImpl<$Res,
_$NotificationsStateEmptyImpl>
implements _$$NotificationsStateEmptyImplCopyWith<$Res> { implements _$$NotificationsStateEmptyImplCopyWith<$Res> {
__$$NotificationsStateEmptyImplCopyWithImpl(_$NotificationsStateEmptyImpl _value, $Res Function(_$NotificationsStateEmptyImpl) _then) : super(_value, _then); __$$NotificationsStateEmptyImplCopyWithImpl(
_$NotificationsStateEmptyImpl _value,
$Res Function(_$NotificationsStateEmptyImpl) _then)
: super(_value, _then);
} }
/// @nodoc /// @nodoc
@@ -219,7 +231,9 @@ class _$NotificationsStateEmptyImpl implements NotificationsStateEmpty {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType && other is _$NotificationsStateEmptyImpl); return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$NotificationsStateEmptyImpl);
} }
@override @override
@@ -306,17 +320,22 @@ abstract class NotificationsStateEmpty implements NotificationsState {
/// @nodoc /// @nodoc
abstract class _$$NotificationsStateLoadedImplCopyWith<$Res> { abstract class _$$NotificationsStateLoadedImplCopyWith<$Res> {
factory _$$NotificationsStateLoadedImplCopyWith(_$NotificationsStateLoadedImpl value, $Res Function(_$NotificationsStateLoadedImpl) then) = factory _$$NotificationsStateLoadedImplCopyWith(
_$NotificationsStateLoadedImpl value,
$Res Function(_$NotificationsStateLoadedImpl) then) =
__$$NotificationsStateLoadedImplCopyWithImpl<$Res>; __$$NotificationsStateLoadedImplCopyWithImpl<$Res>;
@useResult @useResult
$Res call({int notificationsCount}); $Res call({int notificationsCount});
} }
/// @nodoc /// @nodoc
class __$$NotificationsStateLoadedImplCopyWithImpl<$Res> extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateLoadedImpl> class __$$NotificationsStateLoadedImplCopyWithImpl<$Res>
extends _$NotificationsStateCopyWithImpl<$Res,
_$NotificationsStateLoadedImpl>
implements _$$NotificationsStateLoadedImplCopyWith<$Res> { implements _$$NotificationsStateLoadedImplCopyWith<$Res> {
__$$NotificationsStateLoadedImplCopyWithImpl(_$NotificationsStateLoadedImpl _value, $Res Function(_$NotificationsStateLoadedImpl) _then) __$$NotificationsStateLoadedImplCopyWithImpl(
_$NotificationsStateLoadedImpl _value,
$Res Function(_$NotificationsStateLoadedImpl) _then)
: super(_value, _then); : super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@@ -351,7 +370,8 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$NotificationsStateLoadedImpl && other is _$NotificationsStateLoadedImpl &&
(identical(other.notificationsCount, notificationsCount) || other.notificationsCount == notificationsCount)); (identical(other.notificationsCount, notificationsCount) ||
other.notificationsCount == notificationsCount));
} }
@override @override
@@ -360,8 +380,9 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl> get copyWith => _$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl>
__$$NotificationsStateLoadedImplCopyWithImpl<_$NotificationsStateLoadedImpl>(this, _$identity); get copyWith => __$$NotificationsStateLoadedImplCopyWithImpl<
_$NotificationsStateLoadedImpl>(this, _$identity);
@override @override
@optionalTypeArgs @optionalTypeArgs
@@ -439,27 +460,34 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
} }
abstract class NotificationsStateLoaded implements NotificationsState { abstract class NotificationsStateLoaded implements NotificationsState {
const factory NotificationsStateLoaded({required final int notificationsCount}) = _$NotificationsStateLoadedImpl; const factory NotificationsStateLoaded(
{required final int notificationsCount}) = _$NotificationsStateLoadedImpl;
int get notificationsCount; int get notificationsCount;
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl> get copyWith => throw _privateConstructorUsedError; _$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl>
get copyWith => throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class _$$NotificationsStateErrorImplCopyWith<$Res> { abstract class _$$NotificationsStateErrorImplCopyWith<$Res> {
factory _$$NotificationsStateErrorImplCopyWith(_$NotificationsStateErrorImpl value, $Res Function(_$NotificationsStateErrorImpl) then) = factory _$$NotificationsStateErrorImplCopyWith(
_$NotificationsStateErrorImpl value,
$Res Function(_$NotificationsStateErrorImpl) then) =
__$$NotificationsStateErrorImplCopyWithImpl<$Res>; __$$NotificationsStateErrorImplCopyWithImpl<$Res>;
@useResult @useResult
$Res call({String errorMessage}); $Res call({String errorMessage});
} }
/// @nodoc /// @nodoc
class __$$NotificationsStateErrorImplCopyWithImpl<$Res> extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateErrorImpl> class __$$NotificationsStateErrorImplCopyWithImpl<$Res>
extends _$NotificationsStateCopyWithImpl<$Res,
_$NotificationsStateErrorImpl>
implements _$$NotificationsStateErrorImplCopyWith<$Res> { implements _$$NotificationsStateErrorImplCopyWith<$Res> {
__$$NotificationsStateErrorImplCopyWithImpl(_$NotificationsStateErrorImpl _value, $Res Function(_$NotificationsStateErrorImpl) _then) : super(_value, _then); __$$NotificationsStateErrorImplCopyWithImpl(
_$NotificationsStateErrorImpl _value,
$Res Function(_$NotificationsStateErrorImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -493,7 +521,8 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$NotificationsStateErrorImpl && other is _$NotificationsStateErrorImpl &&
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)); (identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
} }
@override @override
@@ -502,8 +531,9 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl> get copyWith => _$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl>
__$$NotificationsStateErrorImplCopyWithImpl<_$NotificationsStateErrorImpl>(this, _$identity); get copyWith => __$$NotificationsStateErrorImplCopyWithImpl<
_$NotificationsStateErrorImpl>(this, _$identity);
@override @override
@optionalTypeArgs @optionalTypeArgs
@@ -581,10 +611,11 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
} }
abstract class NotificationsStateError implements NotificationsState { abstract class NotificationsStateError implements NotificationsState {
const factory NotificationsStateError({required final String errorMessage}) = _$NotificationsStateErrorImpl; const factory NotificationsStateError({required final String errorMessage}) =
_$NotificationsStateErrorImpl;
String get errorMessage; String get errorMessage;
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl> get copyWith => throw _privateConstructorUsedError; _$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl>
get copyWith => throw _privateConstructorUsedError;
} }

View File

@@ -21,28 +21,25 @@ ChatMessageModel _$ChatMessageModelFromJson(Map<String, dynamic> json) {
/// @nodoc /// @nodoc
mixin _$ChatMessageModel { mixin _$ChatMessageModel {
int get id => throw _privateConstructorUsedError; int get id => throw _privateConstructorUsedError;
String get data => throw _privateConstructorUsedError; String get data => throw _privateConstructorUsedError;
@JsonKey(name: 'media_data') @JsonKey(name: 'media_data')
List<dynamic>? get mediaData => throw _privateConstructorUsedError; List<dynamic>? get mediaData => throw _privateConstructorUsedError;
@JsonKey(name: 'author_id') @JsonKey(name: 'author_id')
int get authorId => throw _privateConstructorUsedError; int get authorId => throw _privateConstructorUsedError;
@JsonKey(name: 'updated_at') @JsonKey(name: 'updated_at')
String get updatedAt => throw _privateConstructorUsedError; String get updatedAt => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$ChatMessageModelCopyWith<ChatMessageModel> get copyWith => throw _privateConstructorUsedError; $ChatMessageModelCopyWith<ChatMessageModel> get copyWith =>
throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class $ChatMessageModelCopyWith<$Res> { abstract class $ChatMessageModelCopyWith<$Res> {
factory $ChatMessageModelCopyWith(ChatMessageModel value, $Res Function(ChatMessageModel) then) = _$ChatMessageModelCopyWithImpl<$Res, ChatMessageModel>; factory $ChatMessageModelCopyWith(
ChatMessageModel value, $Res Function(ChatMessageModel) then) =
_$ChatMessageModelCopyWithImpl<$Res, ChatMessageModel>;
@useResult @useResult
$Res call( $Res call(
{int id, {int id,
@@ -53,12 +50,12 @@ abstract class $ChatMessageModelCopyWith<$Res> {
} }
/// @nodoc /// @nodoc
class _$ChatMessageModelCopyWithImpl<$Res, $Val extends ChatMessageModel> implements $ChatMessageModelCopyWith<$Res> { class _$ChatMessageModelCopyWithImpl<$Res, $Val extends ChatMessageModel>
implements $ChatMessageModelCopyWith<$Res> {
_$ChatMessageModelCopyWithImpl(this._value, this._then); _$ChatMessageModelCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -97,10 +94,11 @@ class _$ChatMessageModelCopyWithImpl<$Res, $Val extends ChatMessageModel> implem
} }
/// @nodoc /// @nodoc
abstract class _$$ChatMessageModelImplCopyWith<$Res> implements $ChatMessageModelCopyWith<$Res> { abstract class _$$ChatMessageModelImplCopyWith<$Res>
factory _$$ChatMessageModelImplCopyWith(_$ChatMessageModelImpl value, $Res Function(_$ChatMessageModelImpl) then) = implements $ChatMessageModelCopyWith<$Res> {
factory _$$ChatMessageModelImplCopyWith(_$ChatMessageModelImpl value,
$Res Function(_$ChatMessageModelImpl) then) =
__$$ChatMessageModelImplCopyWithImpl<$Res>; __$$ChatMessageModelImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call( $Res call(
@@ -112,9 +110,12 @@ abstract class _$$ChatMessageModelImplCopyWith<$Res> implements $ChatMessageMode
} }
/// @nodoc /// @nodoc
class __$$ChatMessageModelImplCopyWithImpl<$Res> extends _$ChatMessageModelCopyWithImpl<$Res, _$ChatMessageModelImpl> class __$$ChatMessageModelImplCopyWithImpl<$Res>
extends _$ChatMessageModelCopyWithImpl<$Res, _$ChatMessageModelImpl>
implements _$$ChatMessageModelImplCopyWith<$Res> { implements _$$ChatMessageModelImplCopyWith<$Res> {
__$$ChatMessageModelImplCopyWithImpl(_$ChatMessageModelImpl _value, $Res Function(_$ChatMessageModelImpl) _then) : super(_value, _then); __$$ChatMessageModelImplCopyWithImpl(_$ChatMessageModelImpl _value,
$Res Function(_$ChatMessageModelImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -161,14 +162,14 @@ class _$ChatMessageModelImpl implements _ChatMessageModel {
@JsonKey(name: 'updated_at') required this.updatedAt}) @JsonKey(name: 'updated_at') required this.updatedAt})
: _mediaData = mediaData; : _mediaData = mediaData;
factory _$ChatMessageModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatMessageModelImplFromJson(json); factory _$ChatMessageModelImpl.fromJson(Map<String, dynamic> json) =>
_$$ChatMessageModelImplFromJson(json);
@override @override
final int id; final int id;
@override @override
final String data; final String data;
final List<dynamic>? _mediaData; final List<dynamic>? _mediaData;
@override @override
@JsonKey(name: 'media_data') @JsonKey(name: 'media_data')
List<dynamic>? get mediaData { List<dynamic>? get mediaData {
@@ -198,19 +199,25 @@ class _$ChatMessageModelImpl implements _ChatMessageModel {
other is _$ChatMessageModelImpl && other is _$ChatMessageModelImpl &&
(identical(other.id, id) || other.id == id) && (identical(other.id, id) || other.id == id) &&
(identical(other.data, data) || other.data == data) && (identical(other.data, data) || other.data == data) &&
const DeepCollectionEquality().equals(other._mediaData, _mediaData) && const DeepCollectionEquality()
(identical(other.authorId, authorId) || other.authorId == authorId) && .equals(other._mediaData, _mediaData) &&
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)); (identical(other.authorId, authorId) ||
other.authorId == authorId) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt));
} }
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
int get hashCode => Object.hash(runtimeType, id, data, const DeepCollectionEquality().hash(_mediaData), authorId, updatedAt); int get hashCode => Object.hash(runtimeType, id, data,
const DeepCollectionEquality().hash(_mediaData), authorId, updatedAt);
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith => __$$ChatMessageModelImplCopyWithImpl<_$ChatMessageModelImpl>(this, _$identity); _$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith =>
__$$ChatMessageModelImplCopyWithImpl<_$ChatMessageModelImpl>(
this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -222,33 +229,31 @@ class _$ChatMessageModelImpl implements _ChatMessageModel {
abstract class _ChatMessageModel implements ChatMessageModel { abstract class _ChatMessageModel implements ChatMessageModel {
const factory _ChatMessageModel( const factory _ChatMessageModel(
{required final int id, {required final int id,
required final String data, required final String data,
@JsonKey(name: 'media_data') required final List<dynamic>? mediaData, @JsonKey(name: 'media_data') required final List<dynamic>? mediaData,
@JsonKey(name: 'author_id') required final int authorId, @JsonKey(name: 'author_id') required final int authorId,
@JsonKey(name: 'updated_at') required final String updatedAt}) = _$ChatMessageModelImpl; @JsonKey(name: 'updated_at') required final String updatedAt}) =
_$ChatMessageModelImpl;
factory _ChatMessageModel.fromJson(Map<String, dynamic> json) = _$ChatMessageModelImpl.fromJson; factory _ChatMessageModel.fromJson(Map<String, dynamic> json) =
_$ChatMessageModelImpl.fromJson;
@override @override
int get id; int get id;
@override @override
String get data; String get data;
@override @override
@JsonKey(name: 'media_data') @JsonKey(name: 'media_data')
List<dynamic>? get mediaData; List<dynamic>? get mediaData;
@override @override
@JsonKey(name: 'author_id') @JsonKey(name: 'author_id')
int get authorId; int get authorId;
@override @override
@JsonKey(name: 'updated_at') @JsonKey(name: 'updated_at')
String get updatedAt; String get updatedAt;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith => throw _privateConstructorUsedError; _$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith =>
throw _privateConstructorUsedError;
} }

View File

@@ -6,7 +6,9 @@ part of 'chat_message_model.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$ChatMessageModelImpl _$$ChatMessageModelImplFromJson(Map<String, dynamic> json) => _$ChatMessageModelImpl( _$ChatMessageModelImpl _$$ChatMessageModelImplFromJson(
Map<String, dynamic> json) =>
_$ChatMessageModelImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
data: json['data'] as String, data: json['data'] as String,
mediaData: json['media_data'] as List<dynamic>?, mediaData: json['media_data'] as List<dynamic>?,
@@ -14,7 +16,9 @@ _$ChatMessageModelImpl _$$ChatMessageModelImplFromJson(Map<String, dynamic> json
updatedAt: json['updated_at'] as String, updatedAt: json['updated_at'] as String,
); );
Map<String, dynamic> _$$ChatMessageModelImplToJson(_$ChatMessageModelImpl instance) => <String, dynamic>{ Map<String, dynamic> _$$ChatMessageModelImplToJson(
_$ChatMessageModelImpl instance) =>
<String, dynamic>{
'id': instance.id, 'id': instance.id,
'data': instance.data, 'data': instance.data,
'media_data': instance.mediaData, 'media_data': instance.mediaData,

View File

@@ -22,32 +22,34 @@ ChatMessagesModel _$ChatMessagesModelFromJson(Map<String, dynamic> json) {
mixin _$ChatMessagesModel { mixin _$ChatMessagesModel {
@JsonKey(name: 'data') @JsonKey(name: 'data')
List<ChatMessageModel> get messagesList => throw _privateConstructorUsedError; List<ChatMessageModel> get messagesList => throw _privateConstructorUsedError;
ChatMetaModel get meta => throw _privateConstructorUsedError; ChatMetaModel get meta => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$ChatMessagesModelCopyWith<ChatMessagesModel> get copyWith => throw _privateConstructorUsedError; $ChatMessagesModelCopyWith<ChatMessagesModel> get copyWith =>
throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class $ChatMessagesModelCopyWith<$Res> { abstract class $ChatMessagesModelCopyWith<$Res> {
factory $ChatMessagesModelCopyWith(ChatMessagesModel value, $Res Function(ChatMessagesModel) then) = _$ChatMessagesModelCopyWithImpl<$Res, ChatMessagesModel>; factory $ChatMessagesModelCopyWith(
ChatMessagesModel value, $Res Function(ChatMessagesModel) then) =
_$ChatMessagesModelCopyWithImpl<$Res, ChatMessagesModel>;
@useResult @useResult
$Res call({@JsonKey(name: 'data') List<ChatMessageModel> messagesList, ChatMetaModel meta}); $Res call(
{@JsonKey(name: 'data') List<ChatMessageModel> messagesList,
ChatMetaModel meta});
$ChatMetaModelCopyWith<$Res> get meta; $ChatMetaModelCopyWith<$Res> get meta;
} }
/// @nodoc /// @nodoc
class _$ChatMessagesModelCopyWithImpl<$Res, $Val extends ChatMessagesModel> implements $ChatMessagesModelCopyWith<$Res> { class _$ChatMessagesModelCopyWithImpl<$Res, $Val extends ChatMessagesModel>
implements $ChatMessagesModelCopyWith<$Res> {
_$ChatMessagesModelCopyWithImpl(this._value, this._then); _$ChatMessagesModelCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -79,22 +81,28 @@ class _$ChatMessagesModelCopyWithImpl<$Res, $Val extends ChatMessagesModel> impl
} }
/// @nodoc /// @nodoc
abstract class _$$ChatMessagesModelImplCopyWith<$Res> implements $ChatMessagesModelCopyWith<$Res> { abstract class _$$ChatMessagesModelImplCopyWith<$Res>
factory _$$ChatMessagesModelImplCopyWith(_$ChatMessagesModelImpl value, $Res Function(_$ChatMessagesModelImpl) then) = implements $ChatMessagesModelCopyWith<$Res> {
factory _$$ChatMessagesModelImplCopyWith(_$ChatMessagesModelImpl value,
$Res Function(_$ChatMessagesModelImpl) then) =
__$$ChatMessagesModelImplCopyWithImpl<$Res>; __$$ChatMessagesModelImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call({@JsonKey(name: 'data') List<ChatMessageModel> messagesList, ChatMetaModel meta}); $Res call(
{@JsonKey(name: 'data') List<ChatMessageModel> messagesList,
ChatMetaModel meta});
@override @override
$ChatMetaModelCopyWith<$Res> get meta; $ChatMetaModelCopyWith<$Res> get meta;
} }
/// @nodoc /// @nodoc
class __$$ChatMessagesModelImplCopyWithImpl<$Res> extends _$ChatMessagesModelCopyWithImpl<$Res, _$ChatMessagesModelImpl> class __$$ChatMessagesModelImplCopyWithImpl<$Res>
extends _$ChatMessagesModelCopyWithImpl<$Res, _$ChatMessagesModelImpl>
implements _$$ChatMessagesModelImplCopyWith<$Res> { implements _$$ChatMessagesModelImplCopyWith<$Res> {
__$$ChatMessagesModelImplCopyWithImpl(_$ChatMessagesModelImpl _value, $Res Function(_$ChatMessagesModelImpl) _then) : super(_value, _then); __$$ChatMessagesModelImplCopyWithImpl(_$ChatMessagesModelImpl _value,
$Res Function(_$ChatMessagesModelImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -118,12 +126,16 @@ class __$$ChatMessagesModelImplCopyWithImpl<$Res> extends _$ChatMessagesModelCop
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$ChatMessagesModelImpl implements _ChatMessagesModel { class _$ChatMessagesModelImpl implements _ChatMessagesModel {
const _$ChatMessagesModelImpl({@JsonKey(name: 'data') required final List<ChatMessageModel> messagesList, required this.meta}) : _messagesList = messagesList; const _$ChatMessagesModelImpl(
{@JsonKey(name: 'data')
required final List<ChatMessageModel> messagesList,
required this.meta})
: _messagesList = messagesList;
factory _$ChatMessagesModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatMessagesModelImplFromJson(json); factory _$ChatMessagesModelImpl.fromJson(Map<String, dynamic> json) =>
_$$ChatMessagesModelImplFromJson(json);
final List<ChatMessageModel> _messagesList; final List<ChatMessageModel> _messagesList;
@override @override
@JsonKey(name: 'data') @JsonKey(name: 'data')
List<ChatMessageModel> get messagesList { List<ChatMessageModel> get messagesList {
@@ -145,18 +157,22 @@ class _$ChatMessagesModelImpl implements _ChatMessagesModel {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$ChatMessagesModelImpl && other is _$ChatMessagesModelImpl &&
const DeepCollectionEquality().equals(other._messagesList, _messagesList) && const DeepCollectionEquality()
.equals(other._messagesList, _messagesList) &&
(identical(other.meta, meta) || other.meta == meta)); (identical(other.meta, meta) || other.meta == meta));
} }
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_messagesList), meta); int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_messagesList), meta);
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith => __$$ChatMessagesModelImplCopyWithImpl<_$ChatMessagesModelImpl>(this, _$identity); _$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith =>
__$$ChatMessagesModelImplCopyWithImpl<_$ChatMessagesModelImpl>(
this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -167,19 +183,21 @@ class _$ChatMessagesModelImpl implements _ChatMessagesModel {
} }
abstract class _ChatMessagesModel implements ChatMessagesModel { abstract class _ChatMessagesModel implements ChatMessagesModel {
const factory _ChatMessagesModel({@JsonKey(name: 'data') required final List<ChatMessageModel> messagesList, required final ChatMetaModel meta}) = const factory _ChatMessagesModel(
_$ChatMessagesModelImpl; {@JsonKey(name: 'data')
required final List<ChatMessageModel> messagesList,
required final ChatMetaModel meta}) = _$ChatMessagesModelImpl;
factory _ChatMessagesModel.fromJson(Map<String, dynamic> json) = _$ChatMessagesModelImpl.fromJson; factory _ChatMessagesModel.fromJson(Map<String, dynamic> json) =
_$ChatMessagesModelImpl.fromJson;
@override @override
@JsonKey(name: 'data') @JsonKey(name: 'data')
List<ChatMessageModel> get messagesList; List<ChatMessageModel> get messagesList;
@override @override
ChatMetaModel get meta; ChatMetaModel get meta;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith => throw _privateConstructorUsedError; _$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith =>
throw _privateConstructorUsedError;
} }

View File

@@ -6,12 +6,18 @@ part of 'chat_messages_model.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$ChatMessagesModelImpl _$$ChatMessagesModelImplFromJson(Map<String, dynamic> json) => _$ChatMessagesModelImpl( _$ChatMessagesModelImpl _$$ChatMessagesModelImplFromJson(
messagesList: (json['data'] as List<dynamic>).map((e) => ChatMessageModel.fromJson(e as Map<String, dynamic>)).toList(), Map<String, dynamic> json) =>
_$ChatMessagesModelImpl(
messagesList: (json['data'] as List<dynamic>)
.map((e) => ChatMessageModel.fromJson(e as Map<String, dynamic>))
.toList(),
meta: ChatMetaModel.fromJson(json['meta'] as Map<String, dynamic>), meta: ChatMetaModel.fromJson(json['meta'] as Map<String, dynamic>),
); );
Map<String, dynamic> _$$ChatMessagesModelImplToJson(_$ChatMessagesModelImpl instance) => <String, dynamic>{ Map<String, dynamic> _$$ChatMessagesModelImplToJson(
_$ChatMessagesModelImpl instance) =>
<String, dynamic>{
'data': instance.messagesList, 'data': instance.messagesList,
'meta': instance.meta, 'meta': instance.meta,
}; };

View File

@@ -24,26 +24,27 @@ mixin _$ChatMetaModel {
int get lastPage => throw _privateConstructorUsedError; int get lastPage => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$ChatMetaModelCopyWith<ChatMetaModel> get copyWith => throw _privateConstructorUsedError; $ChatMetaModelCopyWith<ChatMetaModel> get copyWith =>
throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class $ChatMetaModelCopyWith<$Res> { abstract class $ChatMetaModelCopyWith<$Res> {
factory $ChatMetaModelCopyWith(ChatMetaModel value, $Res Function(ChatMetaModel) then) = _$ChatMetaModelCopyWithImpl<$Res, ChatMetaModel>; factory $ChatMetaModelCopyWith(
ChatMetaModel value, $Res Function(ChatMetaModel) then) =
_$ChatMetaModelCopyWithImpl<$Res, ChatMetaModel>;
@useResult @useResult
$Res call({@JsonKey(name: "last_page") int lastPage}); $Res call({@JsonKey(name: "last_page") int lastPage});
} }
/// @nodoc /// @nodoc
class _$ChatMetaModelCopyWithImpl<$Res, $Val extends ChatMetaModel> implements $ChatMetaModelCopyWith<$Res> { class _$ChatMetaModelCopyWithImpl<$Res, $Val extends ChatMetaModel>
implements $ChatMetaModelCopyWith<$Res> {
_$ChatMetaModelCopyWithImpl(this._value, this._then); _$ChatMetaModelCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -62,17 +63,23 @@ class _$ChatMetaModelCopyWithImpl<$Res, $Val extends ChatMetaModel> implements $
} }
/// @nodoc /// @nodoc
abstract class _$$ChatMetaModelImplCopyWith<$Res> implements $ChatMetaModelCopyWith<$Res> { abstract class _$$ChatMetaModelImplCopyWith<$Res>
factory _$$ChatMetaModelImplCopyWith(_$ChatMetaModelImpl value, $Res Function(_$ChatMetaModelImpl) then) = __$$ChatMetaModelImplCopyWithImpl<$Res>; implements $ChatMetaModelCopyWith<$Res> {
factory _$$ChatMetaModelImplCopyWith(
_$ChatMetaModelImpl value, $Res Function(_$ChatMetaModelImpl) then) =
__$$ChatMetaModelImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call({@JsonKey(name: "last_page") int lastPage}); $Res call({@JsonKey(name: "last_page") int lastPage});
} }
/// @nodoc /// @nodoc
class __$$ChatMetaModelImplCopyWithImpl<$Res> extends _$ChatMetaModelCopyWithImpl<$Res, _$ChatMetaModelImpl> implements _$$ChatMetaModelImplCopyWith<$Res> { class __$$ChatMetaModelImplCopyWithImpl<$Res>
__$$ChatMetaModelImplCopyWithImpl(_$ChatMetaModelImpl _value, $Res Function(_$ChatMetaModelImpl) _then) : super(_value, _then); extends _$ChatMetaModelCopyWithImpl<$Res, _$ChatMetaModelImpl>
implements _$$ChatMetaModelImplCopyWith<$Res> {
__$$ChatMetaModelImplCopyWithImpl(
_$ChatMetaModelImpl _value, $Res Function(_$ChatMetaModelImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -91,9 +98,11 @@ class __$$ChatMetaModelImplCopyWithImpl<$Res> extends _$ChatMetaModelCopyWithImp
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$ChatMetaModelImpl implements _ChatMetaModel { class _$ChatMetaModelImpl implements _ChatMetaModel {
const _$ChatMetaModelImpl({@JsonKey(name: "last_page") required this.lastPage}); const _$ChatMetaModelImpl(
{@JsonKey(name: "last_page") required this.lastPage});
factory _$ChatMetaModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatMetaModelImplFromJson(json); factory _$ChatMetaModelImpl.fromJson(Map<String, dynamic> json) =>
_$$ChatMetaModelImplFromJson(json);
@override @override
@JsonKey(name: "last_page") @JsonKey(name: "last_page")
@@ -107,7 +116,10 @@ class _$ChatMetaModelImpl implements _ChatMetaModel {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$ChatMetaModelImpl && (identical(other.lastPage, lastPage) || other.lastPage == lastPage)); (other.runtimeType == runtimeType &&
other is _$ChatMetaModelImpl &&
(identical(other.lastPage, lastPage) ||
other.lastPage == lastPage));
} }
@JsonKey(ignore: true) @JsonKey(ignore: true)
@@ -117,7 +129,8 @@ class _$ChatMetaModelImpl implements _ChatMetaModel {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith => __$$ChatMetaModelImplCopyWithImpl<_$ChatMetaModelImpl>(this, _$identity); _$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith =>
__$$ChatMetaModelImplCopyWithImpl<_$ChatMetaModelImpl>(this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -128,15 +141,18 @@ class _$ChatMetaModelImpl implements _ChatMetaModel {
} }
abstract class _ChatMetaModel implements ChatMetaModel { abstract class _ChatMetaModel implements ChatMetaModel {
const factory _ChatMetaModel({@JsonKey(name: "last_page") required final int lastPage}) = _$ChatMetaModelImpl; const factory _ChatMetaModel(
{@JsonKey(name: "last_page") required final int lastPage}) =
_$ChatMetaModelImpl;
factory _ChatMetaModel.fromJson(Map<String, dynamic> json) = _$ChatMetaModelImpl.fromJson; factory _ChatMetaModel.fromJson(Map<String, dynamic> json) =
_$ChatMetaModelImpl.fromJson;
@override @override
@JsonKey(name: "last_page") @JsonKey(name: "last_page")
int get lastPage; int get lastPage;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith => throw _privateConstructorUsedError; _$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith =>
throw _privateConstructorUsedError;
} }

View File

@@ -6,10 +6,12 @@ part of 'chat_meta_model.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$ChatMetaModelImpl _$$ChatMetaModelImplFromJson(Map<String, dynamic> json) => _$ChatMetaModelImpl( _$ChatMetaModelImpl _$$ChatMetaModelImplFromJson(Map<String, dynamic> json) =>
_$ChatMetaModelImpl(
lastPage: (json['last_page'] as num).toInt(), lastPage: (json['last_page'] as num).toInt(),
); );
Map<String, dynamic> _$$ChatMetaModelImplToJson(_$ChatMetaModelImpl instance) => <String, dynamic>{ Map<String, dynamic> _$$ChatMetaModelImplToJson(_$ChatMetaModelImpl instance) =>
<String, dynamic>{
'last_page': instance.lastPage, 'last_page': instance.lastPage,
}; };

View File

@@ -21,35 +21,39 @@ ChatRoomModel _$ChatRoomModelFromJson(Map<String, dynamic> json) {
/// @nodoc /// @nodoc
mixin _$ChatRoomModel { mixin _$ChatRoomModel {
String get id => throw _privateConstructorUsedError; String get id => throw _privateConstructorUsedError;
@JsonKey(name: 'chat_room_setting') @JsonKey(name: 'chat_room_setting')
ChatRoomSettingsModel get chatRoomSettings => throw _privateConstructorUsedError; ChatRoomSettingsModel get chatRoomSettings =>
throw _privateConstructorUsedError;
Map<String, ChatUserModel> get users => throw _privateConstructorUsedError; Map<String, ChatUserModel> get users => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$ChatRoomModelCopyWith<ChatRoomModel> get copyWith => throw _privateConstructorUsedError; $ChatRoomModelCopyWith<ChatRoomModel> get copyWith =>
throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class $ChatRoomModelCopyWith<$Res> { abstract class $ChatRoomModelCopyWith<$Res> {
factory $ChatRoomModelCopyWith(ChatRoomModel value, $Res Function(ChatRoomModel) then) = _$ChatRoomModelCopyWithImpl<$Res, ChatRoomModel>; factory $ChatRoomModelCopyWith(
ChatRoomModel value, $Res Function(ChatRoomModel) then) =
_$ChatRoomModelCopyWithImpl<$Res, ChatRoomModel>;
@useResult @useResult
$Res call({String id, @JsonKey(name: 'chat_room_setting') ChatRoomSettingsModel chatRoomSettings, Map<String, ChatUserModel> users}); $Res call(
{String id,
@JsonKey(name: 'chat_room_setting')
ChatRoomSettingsModel chatRoomSettings,
Map<String, ChatUserModel> users});
$ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings; $ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings;
} }
/// @nodoc /// @nodoc
class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel> implements $ChatRoomModelCopyWith<$Res> { class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel>
implements $ChatRoomModelCopyWith<$Res> {
_$ChatRoomModelCopyWithImpl(this._value, this._then); _$ChatRoomModelCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -79,27 +83,38 @@ class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel> implements $
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings { $ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings {
return $ChatRoomSettingsModelCopyWith<$Res>(_value.chatRoomSettings, (value) { return $ChatRoomSettingsModelCopyWith<$Res>(_value.chatRoomSettings,
(value) {
return _then(_value.copyWith(chatRoomSettings: value) as $Val); return _then(_value.copyWith(chatRoomSettings: value) as $Val);
}); });
} }
} }
/// @nodoc /// @nodoc
abstract class _$$ChatRoomModelImplCopyWith<$Res> implements $ChatRoomModelCopyWith<$Res> { abstract class _$$ChatRoomModelImplCopyWith<$Res>
factory _$$ChatRoomModelImplCopyWith(_$ChatRoomModelImpl value, $Res Function(_$ChatRoomModelImpl) then) = __$$ChatRoomModelImplCopyWithImpl<$Res>; implements $ChatRoomModelCopyWith<$Res> {
factory _$$ChatRoomModelImplCopyWith(
_$ChatRoomModelImpl value, $Res Function(_$ChatRoomModelImpl) then) =
__$$ChatRoomModelImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call({String id, @JsonKey(name: 'chat_room_setting') ChatRoomSettingsModel chatRoomSettings, Map<String, ChatUserModel> users}); $Res call(
{String id,
@JsonKey(name: 'chat_room_setting')
ChatRoomSettingsModel chatRoomSettings,
Map<String, ChatUserModel> users});
@override @override
$ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings; $ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings;
} }
/// @nodoc /// @nodoc
class __$$ChatRoomModelImplCopyWithImpl<$Res> extends _$ChatRoomModelCopyWithImpl<$Res, _$ChatRoomModelImpl> implements _$$ChatRoomModelImplCopyWith<$Res> { class __$$ChatRoomModelImplCopyWithImpl<$Res>
__$$ChatRoomModelImplCopyWithImpl(_$ChatRoomModelImpl _value, $Res Function(_$ChatRoomModelImpl) _then) : super(_value, _then); extends _$ChatRoomModelCopyWithImpl<$Res, _$ChatRoomModelImpl>
implements _$$ChatRoomModelImplCopyWith<$Res> {
__$$ChatRoomModelImplCopyWithImpl(
_$ChatRoomModelImpl _value, $Res Function(_$ChatRoomModelImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -129,10 +144,13 @@ class __$$ChatRoomModelImplCopyWithImpl<$Res> extends _$ChatRoomModelCopyWithImp
@JsonSerializable() @JsonSerializable()
class _$ChatRoomModelImpl implements _ChatRoomModel { class _$ChatRoomModelImpl implements _ChatRoomModel {
const _$ChatRoomModelImpl( const _$ChatRoomModelImpl(
{required this.id, @JsonKey(name: 'chat_room_setting') required this.chatRoomSettings, required final Map<String, ChatUserModel> users}) {required this.id,
@JsonKey(name: 'chat_room_setting') required this.chatRoomSettings,
required final Map<String, ChatUserModel> users})
: _users = users; : _users = users;
factory _$ChatRoomModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatRoomModelImplFromJson(json); factory _$ChatRoomModelImpl.fromJson(Map<String, dynamic> json) =>
_$$ChatRoomModelImplFromJson(json);
@override @override
final String id; final String id;
@@ -140,7 +158,6 @@ class _$ChatRoomModelImpl implements _ChatRoomModel {
@JsonKey(name: 'chat_room_setting') @JsonKey(name: 'chat_room_setting')
final ChatRoomSettingsModel chatRoomSettings; final ChatRoomSettingsModel chatRoomSettings;
final Map<String, ChatUserModel> _users; final Map<String, ChatUserModel> _users;
@override @override
Map<String, ChatUserModel> get users { Map<String, ChatUserModel> get users {
if (_users is EqualUnmodifiableMapView) return _users; if (_users is EqualUnmodifiableMapView) return _users;
@@ -159,18 +176,21 @@ class _$ChatRoomModelImpl implements _ChatRoomModel {
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$ChatRoomModelImpl && other is _$ChatRoomModelImpl &&
(identical(other.id, id) || other.id == id) && (identical(other.id, id) || other.id == id) &&
(identical(other.chatRoomSettings, chatRoomSettings) || other.chatRoomSettings == chatRoomSettings) && (identical(other.chatRoomSettings, chatRoomSettings) ||
other.chatRoomSettings == chatRoomSettings) &&
const DeepCollectionEquality().equals(other._users, _users)); const DeepCollectionEquality().equals(other._users, _users));
} }
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
int get hashCode => Object.hash(runtimeType, id, chatRoomSettings, const DeepCollectionEquality().hash(_users)); int get hashCode => Object.hash(runtimeType, id, chatRoomSettings,
const DeepCollectionEquality().hash(_users));
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith => __$$ChatRoomModelImplCopyWithImpl<_$ChatRoomModelImpl>(this, _$identity); _$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith =>
__$$ChatRoomModelImplCopyWithImpl<_$ChatRoomModelImpl>(this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -183,22 +203,22 @@ class _$ChatRoomModelImpl implements _ChatRoomModel {
abstract class _ChatRoomModel implements ChatRoomModel { abstract class _ChatRoomModel implements ChatRoomModel {
const factory _ChatRoomModel( const factory _ChatRoomModel(
{required final String id, {required final String id,
@JsonKey(name: 'chat_room_setting') required final ChatRoomSettingsModel chatRoomSettings, @JsonKey(name: 'chat_room_setting')
required final ChatRoomSettingsModel chatRoomSettings,
required final Map<String, ChatUserModel> users}) = _$ChatRoomModelImpl; required final Map<String, ChatUserModel> users}) = _$ChatRoomModelImpl;
factory _ChatRoomModel.fromJson(Map<String, dynamic> json) = _$ChatRoomModelImpl.fromJson; factory _ChatRoomModel.fromJson(Map<String, dynamic> json) =
_$ChatRoomModelImpl.fromJson;
@override @override
String get id; String get id;
@override @override
@JsonKey(name: 'chat_room_setting') @JsonKey(name: 'chat_room_setting')
ChatRoomSettingsModel get chatRoomSettings; ChatRoomSettingsModel get chatRoomSettings;
@override @override
Map<String, ChatUserModel> get users; Map<String, ChatUserModel> get users;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith => throw _privateConstructorUsedError; _$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith =>
throw _privateConstructorUsedError;
} }

View File

@@ -6,15 +6,19 @@ part of 'chat_room_model.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$ChatRoomModelImpl _$$ChatRoomModelImplFromJson(Map<String, dynamic> json) => _$ChatRoomModelImpl( _$ChatRoomModelImpl _$$ChatRoomModelImplFromJson(Map<String, dynamic> json) =>
_$ChatRoomModelImpl(
id: json['id'] as String, id: json['id'] as String,
chatRoomSettings: ChatRoomSettingsModel.fromJson(json['chat_room_setting'] as Map<String, dynamic>), chatRoomSettings: ChatRoomSettingsModel.fromJson(
json['chat_room_setting'] as Map<String, dynamic>),
users: (json['users'] as Map<String, dynamic>).map( users: (json['users'] as Map<String, dynamic>).map(
(k, e) => MapEntry(k, ChatUserModel.fromJson(e as Map<String, dynamic>)), (k, e) =>
MapEntry(k, ChatUserModel.fromJson(e as Map<String, dynamic>)),
), ),
); );
Map<String, dynamic> _$$ChatRoomModelImplToJson(_$ChatRoomModelImpl instance) => <String, dynamic>{ Map<String, dynamic> _$$ChatRoomModelImplToJson(_$ChatRoomModelImpl instance) =>
<String, dynamic>{
'id': instance.id, 'id': instance.id,
'chat_room_setting': instance.chatRoomSettings, 'chat_room_setting': instance.chatRoomSettings,
'users': instance.users, 'users': instance.users,

View File

@@ -14,36 +14,33 @@ T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError( final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
ChatRoomSettingsModel _$ChatRoomSettingsModelFromJson(Map<String, dynamic> json) { ChatRoomSettingsModel _$ChatRoomSettingsModelFromJson(
Map<String, dynamic> json) {
return _ChatRoomSettingsModel.fromJson(json); return _ChatRoomSettingsModel.fromJson(json);
} }
/// @nodoc /// @nodoc
mixin _$ChatRoomSettingsModel { mixin _$ChatRoomSettingsModel {
int get id => throw _privateConstructorUsedError; int get id => throw _privateConstructorUsedError;
@JsonKey(name: 'room_name') @JsonKey(name: 'room_name')
String get roomName => throw _privateConstructorUsedError; String get roomName => throw _privateConstructorUsedError;
String get state => throw _privateConstructorUsedError; String get state => throw _privateConstructorUsedError;
@JsonKey(name: 'access_level') @JsonKey(name: 'access_level')
String get accessLevel => throw _privateConstructorUsedError; String get accessLevel => throw _privateConstructorUsedError;
@JsonKey(name: 'updated_at') @JsonKey(name: 'updated_at')
String get updatedAt => throw _privateConstructorUsedError; String get updatedAt => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$ChatRoomSettingsModelCopyWith<ChatRoomSettingsModel> get copyWith => throw _privateConstructorUsedError; $ChatRoomSettingsModelCopyWith<ChatRoomSettingsModel> get copyWith =>
throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class $ChatRoomSettingsModelCopyWith<$Res> { abstract class $ChatRoomSettingsModelCopyWith<$Res> {
factory $ChatRoomSettingsModelCopyWith(ChatRoomSettingsModel value, $Res Function(ChatRoomSettingsModel) then) = factory $ChatRoomSettingsModelCopyWith(ChatRoomSettingsModel value,
$Res Function(ChatRoomSettingsModel) then) =
_$ChatRoomSettingsModelCopyWithImpl<$Res, ChatRoomSettingsModel>; _$ChatRoomSettingsModelCopyWithImpl<$Res, ChatRoomSettingsModel>;
@useResult @useResult
$Res call( $Res call(
{int id, {int id,
@@ -54,12 +51,13 @@ abstract class $ChatRoomSettingsModelCopyWith<$Res> {
} }
/// @nodoc /// @nodoc
class _$ChatRoomSettingsModelCopyWithImpl<$Res, $Val extends ChatRoomSettingsModel> implements $ChatRoomSettingsModelCopyWith<$Res> { class _$ChatRoomSettingsModelCopyWithImpl<$Res,
$Val extends ChatRoomSettingsModel>
implements $ChatRoomSettingsModelCopyWith<$Res> {
_$ChatRoomSettingsModelCopyWithImpl(this._value, this._then); _$ChatRoomSettingsModelCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -98,10 +96,12 @@ class _$ChatRoomSettingsModelCopyWithImpl<$Res, $Val extends ChatRoomSettingsMod
} }
/// @nodoc /// @nodoc
abstract class _$$ChatRoomSettingsModelImplCopyWith<$Res> implements $ChatRoomSettingsModelCopyWith<$Res> { abstract class _$$ChatRoomSettingsModelImplCopyWith<$Res>
factory _$$ChatRoomSettingsModelImplCopyWith(_$ChatRoomSettingsModelImpl value, $Res Function(_$ChatRoomSettingsModelImpl) then) = implements $ChatRoomSettingsModelCopyWith<$Res> {
factory _$$ChatRoomSettingsModelImplCopyWith(
_$ChatRoomSettingsModelImpl value,
$Res Function(_$ChatRoomSettingsModelImpl) then) =
__$$ChatRoomSettingsModelImplCopyWithImpl<$Res>; __$$ChatRoomSettingsModelImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call( $Res call(
@@ -113,9 +113,13 @@ abstract class _$$ChatRoomSettingsModelImplCopyWith<$Res> implements $ChatRoomSe
} }
/// @nodoc /// @nodoc
class __$$ChatRoomSettingsModelImplCopyWithImpl<$Res> extends _$ChatRoomSettingsModelCopyWithImpl<$Res, _$ChatRoomSettingsModelImpl> class __$$ChatRoomSettingsModelImplCopyWithImpl<$Res>
extends _$ChatRoomSettingsModelCopyWithImpl<$Res,
_$ChatRoomSettingsModelImpl>
implements _$$ChatRoomSettingsModelImplCopyWith<$Res> { implements _$$ChatRoomSettingsModelImplCopyWith<$Res> {
__$$ChatRoomSettingsModelImplCopyWithImpl(_$ChatRoomSettingsModelImpl _value, $Res Function(_$ChatRoomSettingsModelImpl) _then) : super(_value, _then); __$$ChatRoomSettingsModelImplCopyWithImpl(_$ChatRoomSettingsModelImpl _value,
$Res Function(_$ChatRoomSettingsModelImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -161,7 +165,8 @@ class _$ChatRoomSettingsModelImpl implements _ChatRoomSettingsModel {
@JsonKey(name: 'access_level') required this.accessLevel, @JsonKey(name: 'access_level') required this.accessLevel,
@JsonKey(name: 'updated_at') required this.updatedAt}); @JsonKey(name: 'updated_at') required this.updatedAt});
factory _$ChatRoomSettingsModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatRoomSettingsModelImplFromJson(json); factory _$ChatRoomSettingsModelImpl.fromJson(Map<String, dynamic> json) =>
_$$ChatRoomSettingsModelImplFromJson(json);
@override @override
final int id; final int id;
@@ -188,21 +193,26 @@ class _$ChatRoomSettingsModelImpl implements _ChatRoomSettingsModel {
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$ChatRoomSettingsModelImpl && other is _$ChatRoomSettingsModelImpl &&
(identical(other.id, id) || other.id == id) && (identical(other.id, id) || other.id == id) &&
(identical(other.roomName, roomName) || other.roomName == roomName) && (identical(other.roomName, roomName) ||
other.roomName == roomName) &&
(identical(other.state, state) || other.state == state) && (identical(other.state, state) || other.state == state) &&
(identical(other.accessLevel, accessLevel) || other.accessLevel == accessLevel) && (identical(other.accessLevel, accessLevel) ||
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)); other.accessLevel == accessLevel) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt));
} }
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
int get hashCode => Object.hash(runtimeType, id, roomName, state, accessLevel, updatedAt); int get hashCode =>
Object.hash(runtimeType, id, roomName, state, accessLevel, updatedAt);
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl> get copyWith => _$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl>
__$$ChatRoomSettingsModelImplCopyWithImpl<_$ChatRoomSettingsModelImpl>(this, _$identity); get copyWith => __$$ChatRoomSettingsModelImplCopyWithImpl<
_$ChatRoomSettingsModelImpl>(this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -214,33 +224,31 @@ class _$ChatRoomSettingsModelImpl implements _ChatRoomSettingsModel {
abstract class _ChatRoomSettingsModel implements ChatRoomSettingsModel { abstract class _ChatRoomSettingsModel implements ChatRoomSettingsModel {
const factory _ChatRoomSettingsModel( const factory _ChatRoomSettingsModel(
{required final int id, {required final int id,
@JsonKey(name: 'room_name') required final String roomName, @JsonKey(name: 'room_name') required final String roomName,
required final String state, required final String state,
@JsonKey(name: 'access_level') required final String accessLevel, @JsonKey(name: 'access_level') required final String accessLevel,
@JsonKey(name: 'updated_at') required final String updatedAt}) = _$ChatRoomSettingsModelImpl; @JsonKey(name: 'updated_at') required final String updatedAt}) =
_$ChatRoomSettingsModelImpl;
factory _ChatRoomSettingsModel.fromJson(Map<String, dynamic> json) = _$ChatRoomSettingsModelImpl.fromJson; factory _ChatRoomSettingsModel.fromJson(Map<String, dynamic> json) =
_$ChatRoomSettingsModelImpl.fromJson;
@override @override
int get id; int get id;
@override @override
@JsonKey(name: 'room_name') @JsonKey(name: 'room_name')
String get roomName; String get roomName;
@override @override
String get state; String get state;
@override @override
@JsonKey(name: 'access_level') @JsonKey(name: 'access_level')
String get accessLevel; String get accessLevel;
@override @override
@JsonKey(name: 'updated_at') @JsonKey(name: 'updated_at')
String get updatedAt; String get updatedAt;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl> get copyWith => throw _privateConstructorUsedError; _$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl>
get copyWith => throw _privateConstructorUsedError;
} }

View File

@@ -6,7 +6,9 @@ part of 'chat_room_settings_model.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$ChatRoomSettingsModelImpl _$$ChatRoomSettingsModelImplFromJson(Map<String, dynamic> json) => _$ChatRoomSettingsModelImpl( _$ChatRoomSettingsModelImpl _$$ChatRoomSettingsModelImplFromJson(
Map<String, dynamic> json) =>
_$ChatRoomSettingsModelImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
roomName: json['room_name'] as String, roomName: json['room_name'] as String,
state: json['state'] as String, state: json['state'] as String,
@@ -14,7 +16,9 @@ _$ChatRoomSettingsModelImpl _$$ChatRoomSettingsModelImplFromJson(Map<String, dyn
updatedAt: json['updated_at'] as String, updatedAt: json['updated_at'] as String,
); );
Map<String, dynamic> _$$ChatRoomSettingsModelImplToJson(_$ChatRoomSettingsModelImpl instance) => <String, dynamic>{ Map<String, dynamic> _$$ChatRoomSettingsModelImplToJson(
_$ChatRoomSettingsModelImpl instance) =>
<String, dynamic>{
'id': instance.id, 'id': instance.id,
'room_name': instance.roomName, 'room_name': instance.roomName,
'state': instance.state, 'state': instance.state,

View File

@@ -21,36 +21,38 @@ ChatUserModel _$ChatUserModelFromJson(Map<String, dynamic> json) {
/// @nodoc /// @nodoc
mixin _$ChatUserModel { mixin _$ChatUserModel {
int get id => throw _privateConstructorUsedError; int get id => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError; String get name => throw _privateConstructorUsedError;
@JsonKey(name: 'profile_photo_path') @JsonKey(name: 'profile_photo_path')
String? get profilePhotoPath => throw _privateConstructorUsedError; String? get profilePhotoPath => throw _privateConstructorUsedError;
@JsonKey(name: 'profile_photo_url') @JsonKey(name: 'profile_photo_url')
String? get profilePhotoUrl => throw _privateConstructorUsedError; String? get profilePhotoUrl => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$ChatUserModelCopyWith<ChatUserModel> get copyWith => throw _privateConstructorUsedError; $ChatUserModelCopyWith<ChatUserModel> get copyWith =>
throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class $ChatUserModelCopyWith<$Res> { abstract class $ChatUserModelCopyWith<$Res> {
factory $ChatUserModelCopyWith(ChatUserModel value, $Res Function(ChatUserModel) then) = _$ChatUserModelCopyWithImpl<$Res, ChatUserModel>; factory $ChatUserModelCopyWith(
ChatUserModel value, $Res Function(ChatUserModel) then) =
_$ChatUserModelCopyWithImpl<$Res, ChatUserModel>;
@useResult @useResult
$Res call({int id, String name, @JsonKey(name: 'profile_photo_path') String? profilePhotoPath, @JsonKey(name: 'profile_photo_url') String? profilePhotoUrl}); $Res call(
{int id,
String name,
@JsonKey(name: 'profile_photo_path') String? profilePhotoPath,
@JsonKey(name: 'profile_photo_url') String? profilePhotoUrl});
} }
/// @nodoc /// @nodoc
class _$ChatUserModelCopyWithImpl<$Res, $Val extends ChatUserModel> implements $ChatUserModelCopyWith<$Res> { class _$ChatUserModelCopyWithImpl<$Res, $Val extends ChatUserModel>
implements $ChatUserModelCopyWith<$Res> {
_$ChatUserModelCopyWithImpl(this._value, this._then); _$ChatUserModelCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -84,17 +86,27 @@ class _$ChatUserModelCopyWithImpl<$Res, $Val extends ChatUserModel> implements $
} }
/// @nodoc /// @nodoc
abstract class _$$ChatUserModelImplCopyWith<$Res> implements $ChatUserModelCopyWith<$Res> { abstract class _$$ChatUserModelImplCopyWith<$Res>
factory _$$ChatUserModelImplCopyWith(_$ChatUserModelImpl value, $Res Function(_$ChatUserModelImpl) then) = __$$ChatUserModelImplCopyWithImpl<$Res>; implements $ChatUserModelCopyWith<$Res> {
factory _$$ChatUserModelImplCopyWith(
_$ChatUserModelImpl value, $Res Function(_$ChatUserModelImpl) then) =
__$$ChatUserModelImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call({int id, String name, @JsonKey(name: 'profile_photo_path') String? profilePhotoPath, @JsonKey(name: 'profile_photo_url') String? profilePhotoUrl}); $Res call(
{int id,
String name,
@JsonKey(name: 'profile_photo_path') String? profilePhotoPath,
@JsonKey(name: 'profile_photo_url') String? profilePhotoUrl});
} }
/// @nodoc /// @nodoc
class __$$ChatUserModelImplCopyWithImpl<$Res> extends _$ChatUserModelCopyWithImpl<$Res, _$ChatUserModelImpl> implements _$$ChatUserModelImplCopyWith<$Res> { class __$$ChatUserModelImplCopyWithImpl<$Res>
__$$ChatUserModelImplCopyWithImpl(_$ChatUserModelImpl _value, $Res Function(_$ChatUserModelImpl) _then) : super(_value, _then); extends _$ChatUserModelCopyWithImpl<$Res, _$ChatUserModelImpl>
implements _$$ChatUserModelImplCopyWith<$Res> {
__$$ChatUserModelImplCopyWithImpl(
_$ChatUserModelImpl _value, $Res Function(_$ChatUserModelImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -134,7 +146,8 @@ class _$ChatUserModelImpl implements _ChatUserModel {
@JsonKey(name: 'profile_photo_path') this.profilePhotoPath, @JsonKey(name: 'profile_photo_path') this.profilePhotoPath,
@JsonKey(name: 'profile_photo_url') this.profilePhotoUrl}); @JsonKey(name: 'profile_photo_url') this.profilePhotoUrl});
factory _$ChatUserModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatUserModelImplFromJson(json); factory _$ChatUserModelImpl.fromJson(Map<String, dynamic> json) =>
_$$ChatUserModelImplFromJson(json);
@override @override
final int id; final int id;
@@ -159,18 +172,22 @@ class _$ChatUserModelImpl implements _ChatUserModel {
other is _$ChatUserModelImpl && other is _$ChatUserModelImpl &&
(identical(other.id, id) || other.id == id) && (identical(other.id, id) || other.id == id) &&
(identical(other.name, name) || other.name == name) && (identical(other.name, name) || other.name == name) &&
(identical(other.profilePhotoPath, profilePhotoPath) || other.profilePhotoPath == profilePhotoPath) && (identical(other.profilePhotoPath, profilePhotoPath) ||
(identical(other.profilePhotoUrl, profilePhotoUrl) || other.profilePhotoUrl == profilePhotoUrl)); other.profilePhotoPath == profilePhotoPath) &&
(identical(other.profilePhotoUrl, profilePhotoUrl) ||
other.profilePhotoUrl == profilePhotoUrl));
} }
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
int get hashCode => Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl); int get hashCode =>
Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl);
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith => __$$ChatUserModelImplCopyWithImpl<_$ChatUserModelImpl>(this, _$identity); _$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith =>
__$$ChatUserModelImplCopyWithImpl<_$ChatUserModelImpl>(this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -182,28 +199,27 @@ class _$ChatUserModelImpl implements _ChatUserModel {
abstract class _ChatUserModel implements ChatUserModel { abstract class _ChatUserModel implements ChatUserModel {
const factory _ChatUserModel( const factory _ChatUserModel(
{required final int id, {required final int id,
required final String name, required final String name,
@JsonKey(name: 'profile_photo_path') final String? profilePhotoPath, @JsonKey(name: 'profile_photo_path') final String? profilePhotoPath,
@JsonKey(name: 'profile_photo_url') final String? profilePhotoUrl}) = _$ChatUserModelImpl; @JsonKey(name: 'profile_photo_url') final String? profilePhotoUrl}) =
_$ChatUserModelImpl;
factory _ChatUserModel.fromJson(Map<String, dynamic> json) = _$ChatUserModelImpl.fromJson; factory _ChatUserModel.fromJson(Map<String, dynamic> json) =
_$ChatUserModelImpl.fromJson;
@override @override
int get id; int get id;
@override @override
String get name; String get name;
@override @override
@JsonKey(name: 'profile_photo_path') @JsonKey(name: 'profile_photo_path')
String? get profilePhotoPath; String? get profilePhotoPath;
@override @override
@JsonKey(name: 'profile_photo_url') @JsonKey(name: 'profile_photo_url')
String? get profilePhotoUrl; String? get profilePhotoUrl;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith => throw _privateConstructorUsedError; _$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith =>
throw _privateConstructorUsedError;
} }

View File

@@ -6,14 +6,16 @@ part of 'chat_user_model.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$ChatUserModelImpl _$$ChatUserModelImplFromJson(Map<String, dynamic> json) => _$ChatUserModelImpl( _$ChatUserModelImpl _$$ChatUserModelImplFromJson(Map<String, dynamic> json) =>
_$ChatUserModelImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
name: json['name'] as String, name: json['name'] as String,
profilePhotoPath: json['profile_photo_path'] as String?, profilePhotoPath: json['profile_photo_path'] as String?,
profilePhotoUrl: json['profile_photo_url'] as String?, profilePhotoUrl: json['profile_photo_url'] as String?,
); );
Map<String, dynamic> _$$ChatUserModelImplToJson(_$ChatUserModelImpl instance) => <String, dynamic>{ Map<String, dynamic> _$$ChatUserModelImplToJson(_$ChatUserModelImpl instance) =>
<String, dynamic>{
'id': instance.id, 'id': instance.id,
'name': instance.name, 'name': instance.name,
'profile_photo_path': instance.profilePhotoPath, 'profile_photo_path': instance.profilePhotoPath,

View File

@@ -21,38 +21,39 @@ WebsocketInfoModel _$WebsocketInfoModelFromJson(Map<String, dynamic> json) {
/// @nodoc /// @nodoc
mixin _$WebsocketInfoModel { mixin _$WebsocketInfoModel {
String get key => throw _privateConstructorUsedError; String get key => throw _privateConstructorUsedError;
String get host => throw _privateConstructorUsedError; String get host => throw _privateConstructorUsedError;
String get port => throw _privateConstructorUsedError; String get port => throw _privateConstructorUsedError;
String get cluster => throw _privateConstructorUsedError; String get cluster => throw _privateConstructorUsedError;
@JsonKey(name: 'user_id') @JsonKey(name: 'user_id')
int get userId => throw _privateConstructorUsedError; int get userId => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$WebsocketInfoModelCopyWith<WebsocketInfoModel> get copyWith => throw _privateConstructorUsedError; $WebsocketInfoModelCopyWith<WebsocketInfoModel> get copyWith =>
throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class $WebsocketInfoModelCopyWith<$Res> { abstract class $WebsocketInfoModelCopyWith<$Res> {
factory $WebsocketInfoModelCopyWith(WebsocketInfoModel value, $Res Function(WebsocketInfoModel) then) = factory $WebsocketInfoModelCopyWith(
WebsocketInfoModel value, $Res Function(WebsocketInfoModel) then) =
_$WebsocketInfoModelCopyWithImpl<$Res, WebsocketInfoModel>; _$WebsocketInfoModelCopyWithImpl<$Res, WebsocketInfoModel>;
@useResult @useResult
$Res call({String key, String host, String port, String cluster, @JsonKey(name: 'user_id') int userId}); $Res call(
{String key,
String host,
String port,
String cluster,
@JsonKey(name: 'user_id') int userId});
} }
/// @nodoc /// @nodoc
class _$WebsocketInfoModelCopyWithImpl<$Res, $Val extends WebsocketInfoModel> implements $WebsocketInfoModelCopyWith<$Res> { class _$WebsocketInfoModelCopyWithImpl<$Res, $Val extends WebsocketInfoModel>
implements $WebsocketInfoModelCopyWith<$Res> {
_$WebsocketInfoModelCopyWithImpl(this._value, this._then); _$WebsocketInfoModelCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -91,19 +92,28 @@ class _$WebsocketInfoModelCopyWithImpl<$Res, $Val extends WebsocketInfoModel> im
} }
/// @nodoc /// @nodoc
abstract class _$$WebsocketInfoModelImplCopyWith<$Res> implements $WebsocketInfoModelCopyWith<$Res> { abstract class _$$WebsocketInfoModelImplCopyWith<$Res>
factory _$$WebsocketInfoModelImplCopyWith(_$WebsocketInfoModelImpl value, $Res Function(_$WebsocketInfoModelImpl) then) = implements $WebsocketInfoModelCopyWith<$Res> {
factory _$$WebsocketInfoModelImplCopyWith(_$WebsocketInfoModelImpl value,
$Res Function(_$WebsocketInfoModelImpl) then) =
__$$WebsocketInfoModelImplCopyWithImpl<$Res>; __$$WebsocketInfoModelImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call({String key, String host, String port, String cluster, @JsonKey(name: 'user_id') int userId}); $Res call(
{String key,
String host,
String port,
String cluster,
@JsonKey(name: 'user_id') int userId});
} }
/// @nodoc /// @nodoc
class __$$WebsocketInfoModelImplCopyWithImpl<$Res> extends _$WebsocketInfoModelCopyWithImpl<$Res, _$WebsocketInfoModelImpl> class __$$WebsocketInfoModelImplCopyWithImpl<$Res>
extends _$WebsocketInfoModelCopyWithImpl<$Res, _$WebsocketInfoModelImpl>
implements _$$WebsocketInfoModelImplCopyWith<$Res> { implements _$$WebsocketInfoModelImplCopyWith<$Res> {
__$$WebsocketInfoModelImplCopyWithImpl(_$WebsocketInfoModelImpl _value, $Res Function(_$WebsocketInfoModelImpl) _then) : super(_value, _then); __$$WebsocketInfoModelImplCopyWithImpl(_$WebsocketInfoModelImpl _value,
$Res Function(_$WebsocketInfoModelImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -143,9 +153,14 @@ class __$$WebsocketInfoModelImplCopyWithImpl<$Res> extends _$WebsocketInfoModelC
@JsonSerializable() @JsonSerializable()
class _$WebsocketInfoModelImpl implements _WebsocketInfoModel { class _$WebsocketInfoModelImpl implements _WebsocketInfoModel {
const _$WebsocketInfoModelImpl( const _$WebsocketInfoModelImpl(
{required this.key, required this.host, required this.port, required this.cluster, @JsonKey(name: 'user_id') required this.userId}); {required this.key,
required this.host,
required this.port,
required this.cluster,
@JsonKey(name: 'user_id') required this.userId});
factory _$WebsocketInfoModelImpl.fromJson(Map<String, dynamic> json) => _$$WebsocketInfoModelImplFromJson(json); factory _$WebsocketInfoModelImpl.fromJson(Map<String, dynamic> json) =>
_$$WebsocketInfoModelImplFromJson(json);
@override @override
final String key; final String key;
@@ -178,13 +193,15 @@ class _$WebsocketInfoModelImpl implements _WebsocketInfoModel {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
int get hashCode => Object.hash(runtimeType, key, host, port, cluster, userId); int get hashCode =>
Object.hash(runtimeType, key, host, port, cluster, userId);
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith => _$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith =>
__$$WebsocketInfoModelImplCopyWithImpl<_$WebsocketInfoModelImpl>(this, _$identity); __$$WebsocketInfoModelImplCopyWithImpl<_$WebsocketInfoModelImpl>(
this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -196,31 +213,29 @@ class _$WebsocketInfoModelImpl implements _WebsocketInfoModel {
abstract class _WebsocketInfoModel implements WebsocketInfoModel { abstract class _WebsocketInfoModel implements WebsocketInfoModel {
const factory _WebsocketInfoModel( const factory _WebsocketInfoModel(
{required final String key, {required final String key,
required final String host, required final String host,
required final String port, required final String port,
required final String cluster, required final String cluster,
@JsonKey(name: 'user_id') required final int userId}) = _$WebsocketInfoModelImpl; @JsonKey(name: 'user_id') required final int userId}) =
_$WebsocketInfoModelImpl;
factory _WebsocketInfoModel.fromJson(Map<String, dynamic> json) = _$WebsocketInfoModelImpl.fromJson; factory _WebsocketInfoModel.fromJson(Map<String, dynamic> json) =
_$WebsocketInfoModelImpl.fromJson;
@override @override
String get key; String get key;
@override @override
String get host; String get host;
@override @override
String get port; String get port;
@override @override
String get cluster; String get cluster;
@override @override
@JsonKey(name: 'user_id') @JsonKey(name: 'user_id')
int get userId; int get userId;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith => throw _privateConstructorUsedError; _$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith =>
throw _privateConstructorUsedError;
} }

View File

@@ -6,7 +6,9 @@ part of 'websocket_info_model.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$WebsocketInfoModelImpl _$$WebsocketInfoModelImplFromJson(Map<String, dynamic> json) => _$WebsocketInfoModelImpl( _$WebsocketInfoModelImpl _$$WebsocketInfoModelImplFromJson(
Map<String, dynamic> json) =>
_$WebsocketInfoModelImpl(
key: json['key'] as String, key: json['key'] as String,
host: json['host'] as String, host: json['host'] as String,
port: json['port'] as String, port: json['port'] as String,
@@ -14,7 +16,9 @@ _$WebsocketInfoModelImpl _$$WebsocketInfoModelImplFromJson(Map<String, dynamic>
userId: (json['user_id'] as num).toInt(), userId: (json['user_id'] as num).toInt(),
); );
Map<String, dynamic> _$$WebsocketInfoModelImplToJson(_$WebsocketInfoModelImpl instance) => <String, dynamic>{ Map<String, dynamic> _$$WebsocketInfoModelImplToJson(
_$WebsocketInfoModelImpl instance) =>
<String, dynamic>{
'key': instance.key, 'key': instance.key,
'host': instance.host, 'host': instance.host,
'port': instance.port, 'port': instance.port,

View File

@@ -20,16 +20,19 @@ mixin _$ChatRoomState {
TResult when<TResult extends Object?>( TResult when<TResult extends Object?>(
TResult Function() $default, { TResult Function() $default, {
required TResult Function() loading, required TResult Function() loading,
required TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading) loaded, required TResult Function(ChatRoomModel chatRoom,
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
loaded,
required TResult Function(String errorMessage) error, required TResult Function(String errorMessage) error,
}) => }) =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
@optionalTypeArgs @optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>( TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, { TResult? Function()? $default, {
TResult? Function()? loading, TResult? Function()? loading,
TResult? Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded, TResult? Function(ChatRoomModel chatRoom,
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
loaded,
TResult? Function(String errorMessage)? error, TResult? Function(String errorMessage)? error,
}) => }) =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
@@ -37,7 +40,9 @@ mixin _$ChatRoomState {
TResult maybeWhen<TResult extends Object?>( TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, { TResult Function()? $default, {
TResult Function()? loading, TResult Function()? loading,
TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded, TResult Function(ChatRoomModel chatRoom,
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
loaded,
TResult Function(String errorMessage)? error, TResult Function(String errorMessage)? error,
required TResult orElse(), required TResult orElse(),
}) => }) =>
@@ -71,28 +76,36 @@ mixin _$ChatRoomState {
/// @nodoc /// @nodoc
abstract class $ChatRoomStateCopyWith<$Res> { abstract class $ChatRoomStateCopyWith<$Res> {
factory $ChatRoomStateCopyWith(ChatRoomState value, $Res Function(ChatRoomState) then) = _$ChatRoomStateCopyWithImpl<$Res, ChatRoomState>; factory $ChatRoomStateCopyWith(
ChatRoomState value, $Res Function(ChatRoomState) then) =
_$ChatRoomStateCopyWithImpl<$Res, ChatRoomState>;
} }
/// @nodoc /// @nodoc
class _$ChatRoomStateCopyWithImpl<$Res, $Val extends ChatRoomState> implements $ChatRoomStateCopyWith<$Res> { class _$ChatRoomStateCopyWithImpl<$Res, $Val extends ChatRoomState>
implements $ChatRoomStateCopyWith<$Res> {
_$ChatRoomStateCopyWithImpl(this._value, this._then); _$ChatRoomStateCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
} }
/// @nodoc /// @nodoc
abstract class _$$ChatRoomStateImplCopyWith<$Res> { abstract class _$$ChatRoomStateImplCopyWith<$Res> {
factory _$$ChatRoomStateImplCopyWith(_$ChatRoomStateImpl value, $Res Function(_$ChatRoomStateImpl) then) = __$$ChatRoomStateImplCopyWithImpl<$Res>; factory _$$ChatRoomStateImplCopyWith(
_$ChatRoomStateImpl value, $Res Function(_$ChatRoomStateImpl) then) =
__$$ChatRoomStateImplCopyWithImpl<$Res>;
} }
/// @nodoc /// @nodoc
class __$$ChatRoomStateImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateImpl> implements _$$ChatRoomStateImplCopyWith<$Res> { class __$$ChatRoomStateImplCopyWithImpl<$Res>
__$$ChatRoomStateImplCopyWithImpl(_$ChatRoomStateImpl _value, $Res Function(_$ChatRoomStateImpl) _then) : super(_value, _then); extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateImpl>
implements _$$ChatRoomStateImplCopyWith<$Res> {
__$$ChatRoomStateImplCopyWithImpl(
_$ChatRoomStateImpl _value, $Res Function(_$ChatRoomStateImpl) _then)
: super(_value, _then);
} }
/// @nodoc /// @nodoc
@@ -107,7 +120,8 @@ class _$ChatRoomStateImpl implements _ChatRoomState {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChatRoomStateImpl); return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$ChatRoomStateImpl);
} }
@override @override
@@ -118,7 +132,9 @@ class _$ChatRoomStateImpl implements _ChatRoomState {
TResult when<TResult extends Object?>( TResult when<TResult extends Object?>(
TResult Function() $default, { TResult Function() $default, {
required TResult Function() loading, required TResult Function() loading,
required TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading) loaded, required TResult Function(ChatRoomModel chatRoom,
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
loaded,
required TResult Function(String errorMessage) error, required TResult Function(String errorMessage) error,
}) { }) {
return $default(); return $default();
@@ -129,7 +145,9 @@ class _$ChatRoomStateImpl implements _ChatRoomState {
TResult? whenOrNull<TResult extends Object?>( TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, { TResult? Function()? $default, {
TResult? Function()? loading, TResult? Function()? loading,
TResult? Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded, TResult? Function(ChatRoomModel chatRoom,
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
loaded,
TResult? Function(String errorMessage)? error, TResult? Function(String errorMessage)? error,
}) { }) {
return $default?.call(); return $default?.call();
@@ -140,7 +158,9 @@ class _$ChatRoomStateImpl implements _ChatRoomState {
TResult maybeWhen<TResult extends Object?>( TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, { TResult Function()? $default, {
TResult Function()? loading, TResult Function()? loading,
TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded, TResult Function(ChatRoomModel chatRoom,
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
loaded,
TResult Function(String errorMessage)? error, TResult Function(String errorMessage)? error,
required TResult orElse(), required TResult orElse(),
}) { }) {
@@ -194,14 +214,18 @@ abstract class _ChatRoomState implements ChatRoomState {
/// @nodoc /// @nodoc
abstract class _$$ChatRoomStateLoadingImplCopyWith<$Res> { abstract class _$$ChatRoomStateLoadingImplCopyWith<$Res> {
factory _$$ChatRoomStateLoadingImplCopyWith(_$ChatRoomStateLoadingImpl value, $Res Function(_$ChatRoomStateLoadingImpl) then) = factory _$$ChatRoomStateLoadingImplCopyWith(_$ChatRoomStateLoadingImpl value,
$Res Function(_$ChatRoomStateLoadingImpl) then) =
__$$ChatRoomStateLoadingImplCopyWithImpl<$Res>; __$$ChatRoomStateLoadingImplCopyWithImpl<$Res>;
} }
/// @nodoc /// @nodoc
class __$$ChatRoomStateLoadingImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateLoadingImpl> class __$$ChatRoomStateLoadingImplCopyWithImpl<$Res>
extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateLoadingImpl>
implements _$$ChatRoomStateLoadingImplCopyWith<$Res> { implements _$$ChatRoomStateLoadingImplCopyWith<$Res> {
__$$ChatRoomStateLoadingImplCopyWithImpl(_$ChatRoomStateLoadingImpl _value, $Res Function(_$ChatRoomStateLoadingImpl) _then) : super(_value, _then); __$$ChatRoomStateLoadingImplCopyWithImpl(_$ChatRoomStateLoadingImpl _value,
$Res Function(_$ChatRoomStateLoadingImpl) _then)
: super(_value, _then);
} }
/// @nodoc /// @nodoc
@@ -216,7 +240,9 @@ class _$ChatRoomStateLoadingImpl implements ChatRoomStateLoading {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChatRoomStateLoadingImpl); return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ChatRoomStateLoadingImpl);
} }
@override @override
@@ -227,7 +253,9 @@ class _$ChatRoomStateLoadingImpl implements ChatRoomStateLoading {
TResult when<TResult extends Object?>( TResult when<TResult extends Object?>(
TResult Function() $default, { TResult Function() $default, {
required TResult Function() loading, required TResult Function() loading,
required TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading) loaded, required TResult Function(ChatRoomModel chatRoom,
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
loaded,
required TResult Function(String errorMessage) error, required TResult Function(String errorMessage) error,
}) { }) {
return loading(); return loading();
@@ -238,7 +266,9 @@ class _$ChatRoomStateLoadingImpl implements ChatRoomStateLoading {
TResult? whenOrNull<TResult extends Object?>( TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, { TResult? Function()? $default, {
TResult? Function()? loading, TResult? Function()? loading,
TResult? Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded, TResult? Function(ChatRoomModel chatRoom,
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
loaded,
TResult? Function(String errorMessage)? error, TResult? Function(String errorMessage)? error,
}) { }) {
return loading?.call(); return loading?.call();
@@ -249,7 +279,9 @@ class _$ChatRoomStateLoadingImpl implements ChatRoomStateLoading {
TResult maybeWhen<TResult extends Object?>( TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, { TResult Function()? $default, {
TResult Function()? loading, TResult Function()? loading,
TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded, TResult Function(ChatRoomModel chatRoom,
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
loaded,
TResult Function(String errorMessage)? error, TResult Function(String errorMessage)? error,
required TResult orElse(), required TResult orElse(),
}) { }) {
@@ -303,19 +335,26 @@ abstract class ChatRoomStateLoading implements ChatRoomState {
/// @nodoc /// @nodoc
abstract class _$$ChatRoomStateLoadedImplCopyWith<$Res> { abstract class _$$ChatRoomStateLoadedImplCopyWith<$Res> {
factory _$$ChatRoomStateLoadedImplCopyWith(_$ChatRoomStateLoadedImpl value, $Res Function(_$ChatRoomStateLoadedImpl) then) = factory _$$ChatRoomStateLoadedImplCopyWith(_$ChatRoomStateLoadedImpl value,
$Res Function(_$ChatRoomStateLoadedImpl) then) =
__$$ChatRoomStateLoadedImplCopyWithImpl<$Res>; __$$ChatRoomStateLoadedImplCopyWithImpl<$Res>;
@useResult @useResult
$Res call({ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading}); $Res call(
{ChatRoomModel chatRoom,
List<ChatMessageModel> chatMessages,
bool isTyping,
bool isLoading});
$ChatRoomModelCopyWith<$Res> get chatRoom; $ChatRoomModelCopyWith<$Res> get chatRoom;
} }
/// @nodoc /// @nodoc
class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateLoadedImpl> class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res>
extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateLoadedImpl>
implements _$$ChatRoomStateLoadedImplCopyWith<$Res> { implements _$$ChatRoomStateLoadedImplCopyWith<$Res> {
__$$ChatRoomStateLoadedImplCopyWithImpl(_$ChatRoomStateLoadedImpl _value, $Res Function(_$ChatRoomStateLoadedImpl) _then) : super(_value, _then); __$$ChatRoomStateLoadedImplCopyWithImpl(_$ChatRoomStateLoadedImpl _value,
$Res Function(_$ChatRoomStateLoadedImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -357,13 +396,16 @@ class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyW
/// @nodoc /// @nodoc
class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded { class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
const _$ChatRoomStateLoadedImpl({required this.chatRoom, required final List<ChatMessageModel> chatMessages, required this.isTyping, required this.isLoading}) const _$ChatRoomStateLoadedImpl(
{required this.chatRoom,
required final List<ChatMessageModel> chatMessages,
required this.isTyping,
required this.isLoading})
: _chatMessages = chatMessages; : _chatMessages = chatMessages;
@override @override
final ChatRoomModel chatRoom; final ChatRoomModel chatRoom;
final List<ChatMessageModel> _chatMessages; final List<ChatMessageModel> _chatMessages;
@override @override
List<ChatMessageModel> get chatMessages { List<ChatMessageModel> get chatMessages {
if (_chatMessages is EqualUnmodifiableListView) return _chatMessages; if (_chatMessages is EqualUnmodifiableListView) return _chatMessages;
@@ -386,27 +428,35 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$ChatRoomStateLoadedImpl && other is _$ChatRoomStateLoadedImpl &&
(identical(other.chatRoom, chatRoom) || other.chatRoom == chatRoom) && (identical(other.chatRoom, chatRoom) ||
const DeepCollectionEquality().equals(other._chatMessages, _chatMessages) && other.chatRoom == chatRoom) &&
(identical(other.isTyping, isTyping) || other.isTyping == isTyping) && const DeepCollectionEquality()
(identical(other.isLoading, isLoading) || other.isLoading == isLoading)); .equals(other._chatMessages, _chatMessages) &&
(identical(other.isTyping, isTyping) ||
other.isTyping == isTyping) &&
(identical(other.isLoading, isLoading) ||
other.isLoading == isLoading));
} }
@override @override
int get hashCode => Object.hash(runtimeType, chatRoom, const DeepCollectionEquality().hash(_chatMessages), isTyping, isLoading); int get hashCode => Object.hash(runtimeType, chatRoom,
const DeepCollectionEquality().hash(_chatMessages), isTyping, isLoading);
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith => _$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith =>
__$$ChatRoomStateLoadedImplCopyWithImpl<_$ChatRoomStateLoadedImpl>(this, _$identity); __$$ChatRoomStateLoadedImplCopyWithImpl<_$ChatRoomStateLoadedImpl>(
this, _$identity);
@override @override
@optionalTypeArgs @optionalTypeArgs
TResult when<TResult extends Object?>( TResult when<TResult extends Object?>(
TResult Function() $default, { TResult Function() $default, {
required TResult Function() loading, required TResult Function() loading,
required TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading) loaded, required TResult Function(ChatRoomModel chatRoom,
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
loaded,
required TResult Function(String errorMessage) error, required TResult Function(String errorMessage) error,
}) { }) {
return loaded(chatRoom, chatMessages, isTyping, isLoading); return loaded(chatRoom, chatMessages, isTyping, isLoading);
@@ -417,7 +467,9 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
TResult? whenOrNull<TResult extends Object?>( TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, { TResult? Function()? $default, {
TResult? Function()? loading, TResult? Function()? loading,
TResult? Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded, TResult? Function(ChatRoomModel chatRoom,
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
loaded,
TResult? Function(String errorMessage)? error, TResult? Function(String errorMessage)? error,
}) { }) {
return loaded?.call(chatRoom, chatMessages, isTyping, isLoading); return loaded?.call(chatRoom, chatMessages, isTyping, isLoading);
@@ -428,7 +480,9 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
TResult maybeWhen<TResult extends Object?>( TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, { TResult Function()? $default, {
TResult Function()? loading, TResult Function()? loading,
TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded, TResult Function(ChatRoomModel chatRoom,
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
loaded,
TResult Function(String errorMessage)? error, TResult Function(String errorMessage)? error,
required TResult orElse(), required TResult orElse(),
}) { }) {
@@ -484,30 +538,30 @@ abstract class ChatRoomStateLoaded implements ChatRoomState {
required final bool isLoading}) = _$ChatRoomStateLoadedImpl; required final bool isLoading}) = _$ChatRoomStateLoadedImpl;
ChatRoomModel get chatRoom; ChatRoomModel get chatRoom;
List<ChatMessageModel> get chatMessages; List<ChatMessageModel> get chatMessages;
bool get isTyping; bool get isTyping;
bool get isLoading; bool get isLoading;
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith => throw _privateConstructorUsedError; _$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class _$$ChatRoomStateErrorImplCopyWith<$Res> { abstract class _$$ChatRoomStateErrorImplCopyWith<$Res> {
factory _$$ChatRoomStateErrorImplCopyWith(_$ChatRoomStateErrorImpl value, $Res Function(_$ChatRoomStateErrorImpl) then) = factory _$$ChatRoomStateErrorImplCopyWith(_$ChatRoomStateErrorImpl value,
$Res Function(_$ChatRoomStateErrorImpl) then) =
__$$ChatRoomStateErrorImplCopyWithImpl<$Res>; __$$ChatRoomStateErrorImplCopyWithImpl<$Res>;
@useResult @useResult
$Res call({String errorMessage}); $Res call({String errorMessage});
} }
/// @nodoc /// @nodoc
class __$$ChatRoomStateErrorImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateErrorImpl> class __$$ChatRoomStateErrorImplCopyWithImpl<$Res>
extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateErrorImpl>
implements _$$ChatRoomStateErrorImplCopyWith<$Res> { implements _$$ChatRoomStateErrorImplCopyWith<$Res> {
__$$ChatRoomStateErrorImplCopyWithImpl(_$ChatRoomStateErrorImpl _value, $Res Function(_$ChatRoomStateErrorImpl) _then) : super(_value, _then); __$$ChatRoomStateErrorImplCopyWithImpl(_$ChatRoomStateErrorImpl _value,
$Res Function(_$ChatRoomStateErrorImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -541,7 +595,8 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$ChatRoomStateErrorImpl && other is _$ChatRoomStateErrorImpl &&
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)); (identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
} }
@override @override
@@ -551,14 +606,17 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith => _$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith =>
__$$ChatRoomStateErrorImplCopyWithImpl<_$ChatRoomStateErrorImpl>(this, _$identity); __$$ChatRoomStateErrorImplCopyWithImpl<_$ChatRoomStateErrorImpl>(
this, _$identity);
@override @override
@optionalTypeArgs @optionalTypeArgs
TResult when<TResult extends Object?>( TResult when<TResult extends Object?>(
TResult Function() $default, { TResult Function() $default, {
required TResult Function() loading, required TResult Function() loading,
required TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading) loaded, required TResult Function(ChatRoomModel chatRoom,
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
loaded,
required TResult Function(String errorMessage) error, required TResult Function(String errorMessage) error,
}) { }) {
return error(errorMessage); return error(errorMessage);
@@ -569,7 +627,9 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
TResult? whenOrNull<TResult extends Object?>( TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, { TResult? Function()? $default, {
TResult? Function()? loading, TResult? Function()? loading,
TResult? Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded, TResult? Function(ChatRoomModel chatRoom,
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
loaded,
TResult? Function(String errorMessage)? error, TResult? Function(String errorMessage)? error,
}) { }) {
return error?.call(errorMessage); return error?.call(errorMessage);
@@ -580,7 +640,9 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
TResult maybeWhen<TResult extends Object?>( TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, { TResult Function()? $default, {
TResult Function()? loading, TResult Function()? loading,
TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded, TResult Function(ChatRoomModel chatRoom,
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
loaded,
TResult Function(String errorMessage)? error, TResult Function(String errorMessage)? error,
required TResult orElse(), required TResult orElse(),
}) { }) {
@@ -629,10 +691,11 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
} }
abstract class ChatRoomStateError implements ChatRoomState { abstract class ChatRoomStateError implements ChatRoomState {
const factory ChatRoomStateError({required final String errorMessage}) = _$ChatRoomStateErrorImpl; const factory ChatRoomStateError({required final String errorMessage}) =
_$ChatRoomStateErrorImpl;
String get errorMessage; String get errorMessage;
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith => throw _privateConstructorUsedError; _$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
} }

View File

@@ -52,13 +52,9 @@ class _ChatScreenState extends State<ChatScreen> {
_buildChat(BuildContext context, ChatRoomStateLoaded state) { _buildChat(BuildContext context, ChatRoomStateLoaded state) {
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: true, resizeToAvoidBottomInset: true,
backgroundColor: PrimaryColors().gray50,
appBar: AppBar( appBar: AppBar(
titleSpacing: 0, titleSpacing: 0,
centerTitle: false, centerTitle: false,
backgroundColor: Colors.white,
forceMaterialTransparency: true,
elevation: 0,
title: Row( title: Row(
children: [ children: [
Container( Container(
@@ -156,7 +152,7 @@ class _ChatScreenState extends State<ChatScreen> {
SizedBox(width: 8), SizedBox(width: 8),
InkWell( InkWell(
onTap: () {}, onTap: () {},
borderRadius: BorderRadiusStyle.circleBorder17, borderRadius: BorderRadius.circular(16),
child: Ink( child: Ink(
height: 32, height: 32,
width: 32, width: 32,
@@ -190,21 +186,21 @@ class _ChatScreenState extends State<ChatScreen> {
), ),
filled: true, filled: true,
border: OutlineInputBorder( border: OutlineInputBorder(
borderRadius: BorderRadiusStyle.circleBorder17, borderRadius: BorderRadius.circular(16),
borderSide: BorderSide( borderSide: BorderSide(
color: Color(0xFFD1D1D6), color: Color(0xFFD1D1D6),
width: 1, width: 1,
), ),
), ),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderRadius: BorderRadiusStyle.circleBorder17, borderRadius: BorderRadius.circular(16),
borderSide: BorderSide( borderSide: BorderSide(
color: Color(0xFFD1D1D6), color: Color(0xFFD1D1D6),
width: 1, width: 1,
), ),
), ),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderRadius: BorderRadiusStyle.circleBorder17, borderRadius: BorderRadius.circular(16),
borderSide: BorderSide( borderSide: BorderSide(
color: Color(0xFFD1D1D6), color: Color(0xFFD1D1D6),
width: 1, width: 1,
@@ -215,7 +211,7 @@ class _ChatScreenState extends State<ChatScreen> {
), ),
SizedBox(width: 8), SizedBox(width: 8),
InkWell( InkWell(
borderRadius: BorderRadiusStyle.circleBorder17, borderRadius: BorderRadius.circular(16),
onTap: () { onTap: () {
if (textEditingController.text.isNotEmpty) { if (textEditingController.text.isNotEmpty) {
context.read<ChatRoomCubit>().sendMessage( context.read<ChatRoomCubit>().sendMessage(

View File

@@ -103,7 +103,7 @@ class CustomSearchView extends StatelessWidget {
hintStyle: hintStyle ?? CustomTextStyles.bodySmallMulishBluegray800, hintStyle: hintStyle ?? CustomTextStyles.bodySmallMulishBluegray800,
prefixIcon: prefix ?? prefixIcon: prefix ??
Padding( Padding(
padding: EdgeInsets.only(left: 10), padding: EdgeInsets.only(left: 12),
child: Icon( child: Icon(
Icons.search, Icons.search,
color: Color(0xFF7B8794), color: Color(0xFF7B8794),
@@ -127,17 +127,17 @@ class CustomSearchView extends StatelessWidget {
filled: filled, filled: filled,
border: borderDecoration ?? border: borderDecoration ??
OutlineInputBorder( OutlineInputBorder(
borderRadius: BorderRadius.circular(8.h), borderRadius: BorderRadius.circular(16),
borderSide: BorderSide.none, borderSide: BorderSide.none,
), ),
enabledBorder: borderDecoration ?? enabledBorder: borderDecoration ??
OutlineInputBorder( OutlineInputBorder(
borderRadius: BorderRadius.circular(8.h), borderRadius: BorderRadius.circular(16),
borderSide: BorderSide.none, borderSide: BorderSide.none,
), ),
focusedBorder: borderDecoration ?? focusedBorder: borderDecoration ??
OutlineInputBorder( OutlineInputBorder(
borderRadius: BorderRadius.circular(8.h), borderRadius: BorderRadius.circular(16),
borderSide: BorderSide.none, borderSide: BorderSide.none,
), ),
); );

View File

@@ -86,7 +86,7 @@ _buildChatList(BuildContext context, ChatSelectLoadedState state) {
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
separatorBuilder: (context, index) { separatorBuilder: (context, index) {
return SizedBox( return SizedBox(
height: 10.v, height: 8,
); );
}, },
itemCount: state.chatRooms?.length ?? 0, itemCount: state.chatRooms?.length ?? 0,

View File

@@ -16,7 +16,7 @@ class ChatEntryWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return InkWell( return InkWell(
borderRadius: BorderRadiusStyle.circleBorder8, borderRadius: BorderRadius.circular(16),
onTap: () => GoRouter.of(context).pushNamed( onTap: () => GoRouter.of(context).pushNamed(
'chatScreen', 'chatScreen',
extra: chatEntryObj.id.toString(), extra: chatEntryObj.id.toString(),
@@ -24,7 +24,7 @@ class ChatEntryWidget extends StatelessWidget {
child: Ink( child: Ink(
padding: EdgeInsets.all(16), padding: EdgeInsets.all(16),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadiusStyle.circleBorder8, borderRadius: BorderRadius.circular(16),
color: Color(0xFFF6FAFF), color: Color(0xFFF6FAFF),
), ),
child: Row( child: Row(

View File

@@ -26,7 +26,7 @@ class ChatBubbleWidget extends StatelessWidget {
alignment: isCurrentUser ? Alignment.centerRight : Alignment.centerLeft, alignment: isCurrentUser ? Alignment.centerRight : Alignment.centerLeft,
child: DecoratedBox( child: DecoratedBox(
decoration: BoxDecoration( decoration: BoxDecoration(
color: isCurrentUser ? Color(0xFFF6FAFF) : Colors.white, color: isCurrentUser ? Color(0xFF7F9CF5) : Colors.white,
borderRadius: BorderRadiusStyle.circleBorder17, borderRadius: BorderRadiusStyle.circleBorder17,
), ),
child: Padding( child: Padding(
@@ -102,7 +102,7 @@ class ChatBubbleWidget extends StatelessWidget {
Text( Text(
text, text,
style: TextStyle( style: TextStyle(
color: Color(0xFF323F4B), color: isCurrentUser ? Colors.white : Color(0xFF323F4B),
), ),
), ),
], ],

View File

@@ -24,23 +24,25 @@ class _ChatService implements ChatService {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{}; final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null; const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(_setStreamType<Map<String, ChatRoomModel>>(Options( final _result = await _dio.fetch<Map<String, dynamic>>(
_setStreamType<Map<String, ChatRoomModel>>(Options(
method: 'GET', method: 'GET',
headers: _headers, headers: _headers,
extra: _extra, extra: _extra,
) )
.compose( .compose(
_dio.options, _dio.options,
'/api/chat/show/${id}', '/api/chat/show/${id}',
queryParameters: queryParameters, queryParameters: queryParameters,
data: _data, data: _data,
) )
.copyWith( .copyWith(
baseUrl: _combineBaseUrls( baseUrl: _combineBaseUrls(
_dio.options.baseUrl, _dio.options.baseUrl,
baseUrl, baseUrl,
)))); ))));
var _value = _result.data!.map((k, dynamic v) => MapEntry(k, ChatRoomModel.fromJson(v as Map<String, dynamic>))); var _value = _result.data!.map((k, dynamic v) =>
MapEntry(k, ChatRoomModel.fromJson(v as Map<String, dynamic>)));
return _value; return _value;
} }
@@ -96,22 +98,23 @@ class _ChatService implements ChatService {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{}; final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null; const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(_setStreamType<ChatMessagesModel>(Options( final _result = await _dio
.fetch<Map<String, dynamic>>(_setStreamType<ChatMessagesModel>(Options(
method: 'GET', method: 'GET',
headers: _headers, headers: _headers,
extra: _extra, extra: _extra,
) )
.compose( .compose(
_dio.options, _dio.options,
'/api/chat/show/${id}/messages?page=${page}', '/api/chat/show/${id}/messages?page=${page}',
queryParameters: queryParameters, queryParameters: queryParameters,
data: _data, data: _data,
) )
.copyWith( .copyWith(
baseUrl: _combineBaseUrls( baseUrl: _combineBaseUrls(
_dio.options.baseUrl, _dio.options.baseUrl,
baseUrl, baseUrl,
)))); ))));
final _value = ChatMessagesModel.fromJson(_result.data!); final _value = ChatMessagesModel.fromJson(_result.data!);
return _value; return _value;
} }
@@ -122,28 +125,31 @@ class _ChatService implements ChatService {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{}; final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null; const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(_setStreamType<WebsocketInfoModel>(Options( final _result = await _dio
.fetch<Map<String, dynamic>>(_setStreamType<WebsocketInfoModel>(Options(
method: 'GET', method: 'GET',
headers: _headers, headers: _headers,
extra: _extra, extra: _extra,
) )
.compose( .compose(
_dio.options, _dio.options,
'/api/profile/ws/params', '/api/profile/ws/params',
queryParameters: queryParameters, queryParameters: queryParameters,
data: _data, data: _data,
) )
.copyWith( .copyWith(
baseUrl: _combineBaseUrls( baseUrl: _combineBaseUrls(
_dio.options.baseUrl, _dio.options.baseUrl,
baseUrl, baseUrl,
)))); ))));
final _value = WebsocketInfoModel.fromJson(_result.data!); final _value = WebsocketInfoModel.fromJson(_result.data!);
return _value; return _value;
} }
RequestOptions _setStreamType<T>(RequestOptions requestOptions) { 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) { if (T == String) {
requestOptions.responseType = ResponseType.plain; requestOptions.responseType = ResponseType.plain;
} else { } else {

View File

@@ -21,21 +21,14 @@ Meal _$MealFromJson(Map<String, dynamic> json) {
/// @nodoc /// @nodoc
mixin _$Meal { mixin _$Meal {
int get id => throw _privateConstructorUsedError; int get id => throw _privateConstructorUsedError;
String get time => throw _privateConstructorUsedError; String get time => throw _privateConstructorUsedError;
int get type => throw _privateConstructorUsedError; int get type => throw _privateConstructorUsedError;
int get satiety => throw _privateConstructorUsedError; int get satiety => throw _privateConstructorUsedError;
int get mood => throw _privateConstructorUsedError; int get mood => throw _privateConstructorUsedError;
List<Portion> get portions => throw _privateConstructorUsedError; List<Portion> get portions => throw _privateConstructorUsedError;
List<Photo> get photos => throw _privateConstructorUsedError; List<Photo> get photos => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$MealCopyWith<Meal> get copyWith => throw _privateConstructorUsedError; $MealCopyWith<Meal> get copyWith => throw _privateConstructorUsedError;
} }
@@ -43,16 +36,16 @@ mixin _$Meal {
/// @nodoc /// @nodoc
abstract class $MealCopyWith<$Res> { abstract class $MealCopyWith<$Res> {
factory $MealCopyWith(Meal value, $Res Function(Meal) then) = factory $MealCopyWith(Meal value, $Res Function(Meal) then) =
_$MealCopyWithImpl<$Res, Meal>; _$MealCopyWithImpl<$Res, Meal>;
@useResult @useResult
$Res call({int id, $Res call(
String time, {int id,
int type, String time,
int satiety, int type,
int mood, int satiety,
List<Portion> portions, int mood,
List<Photo> photos}); List<Portion> portions,
List<Photo> photos});
} }
/// @nodoc /// @nodoc
@@ -62,7 +55,6 @@ class _$MealCopyWithImpl<$Res, $Val extends Meal>
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -81,53 +73,55 @@ class _$MealCopyWithImpl<$Res, $Val extends Meal>
id: null == id id: null == id
? _value.id ? _value.id
: id // ignore: cast_nullable_to_non_nullable : id // ignore: cast_nullable_to_non_nullable
as int, as int,
time: null == time time: null == time
? _value.time ? _value.time
: time // ignore: cast_nullable_to_non_nullable : time // ignore: cast_nullable_to_non_nullable
as String, as String,
type: null == type type: null == type
? _value.type ? _value.type
: type // ignore: cast_nullable_to_non_nullable : type // ignore: cast_nullable_to_non_nullable
as int, as int,
satiety: null == satiety satiety: null == satiety
? _value.satiety ? _value.satiety
: satiety // ignore: cast_nullable_to_non_nullable : satiety // ignore: cast_nullable_to_non_nullable
as int, as int,
mood: null == mood mood: null == mood
? _value.mood ? _value.mood
: mood // ignore: cast_nullable_to_non_nullable : mood // ignore: cast_nullable_to_non_nullable
as int, as int,
portions: null == portions portions: null == portions
? _value.portions ? _value.portions
: portions // ignore: cast_nullable_to_non_nullable : portions // ignore: cast_nullable_to_non_nullable
as List<Portion>, as List<Portion>,
photos: null == photos photos: null == photos
? _value.photos ? _value.photos
: photos // ignore: cast_nullable_to_non_nullable : photos // ignore: cast_nullable_to_non_nullable
as List<Photo>, as List<Photo>,
) as $Val); ) as $Val);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$MealImplCopyWith<$Res> implements $MealCopyWith<$Res> { abstract class _$$MealImplCopyWith<$Res> implements $MealCopyWith<$Res> {
factory _$$MealImplCopyWith(_$MealImpl value, $Res Function(_$MealImpl) then) = factory _$$MealImplCopyWith(
__$$MealImplCopyWithImpl<$Res>; _$MealImpl value, $Res Function(_$MealImpl) then) =
__$$MealImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call({int id, $Res call(
String time, {int id,
int type, String time,
int satiety, int type,
int mood, int satiety,
List<Portion> portions, int mood,
List<Photo> photos}); List<Portion> portions,
List<Photo> photos});
} }
/// @nodoc /// @nodoc
class __$$MealImplCopyWithImpl<$Res> extends _$MealCopyWithImpl<$Res, _$MealImpl> class __$$MealImplCopyWithImpl<$Res>
extends _$MealCopyWithImpl<$Res, _$MealImpl>
implements _$$MealImplCopyWith<$Res> { implements _$$MealImplCopyWith<$Res> {
__$$MealImplCopyWithImpl(_$MealImpl _value, $Res Function(_$MealImpl) _then) __$$MealImplCopyWithImpl(_$MealImpl _value, $Res Function(_$MealImpl) _then)
: super(_value, _then); : super(_value, _then);
@@ -147,31 +141,31 @@ class __$$MealImplCopyWithImpl<$Res> extends _$MealCopyWithImpl<$Res, _$MealImpl
id: null == id id: null == id
? _value.id ? _value.id
: id // ignore: cast_nullable_to_non_nullable : id // ignore: cast_nullable_to_non_nullable
as int, as int,
time: null == time time: null == time
? _value.time ? _value.time
: time // ignore: cast_nullable_to_non_nullable : time // ignore: cast_nullable_to_non_nullable
as String, as String,
type: null == type type: null == type
? _value.type ? _value.type
: type // ignore: cast_nullable_to_non_nullable : type // ignore: cast_nullable_to_non_nullable
as int, as int,
satiety: null == satiety satiety: null == satiety
? _value.satiety ? _value.satiety
: satiety // ignore: cast_nullable_to_non_nullable : satiety // ignore: cast_nullable_to_non_nullable
as int, as int,
mood: null == mood mood: null == mood
? _value.mood ? _value.mood
: mood // ignore: cast_nullable_to_non_nullable : mood // ignore: cast_nullable_to_non_nullable
as int, as int,
portions: null == portions portions: null == portions
? _value._portions ? _value._portions
: portions // ignore: cast_nullable_to_non_nullable : portions // ignore: cast_nullable_to_non_nullable
as List<Portion>, as List<Portion>,
photos: null == photos photos: null == photos
? _value._photos ? _value._photos
: photos // ignore: cast_nullable_to_non_nullable : photos // ignore: cast_nullable_to_non_nullable
as List<Photo>, as List<Photo>,
)); ));
} }
} }
@@ -179,13 +173,14 @@ class __$$MealImplCopyWithImpl<$Res> extends _$MealCopyWithImpl<$Res, _$MealImpl
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$MealImpl implements _Meal { class _$MealImpl implements _Meal {
const _$MealImpl({required this.id, const _$MealImpl(
required this.time, {required this.id,
required this.type, required this.time,
required this.satiety, required this.type,
required this.mood, required this.satiety,
required final List<Portion> portions, required this.mood,
required final List<Photo> photos}) required final List<Portion> portions,
required final List<Photo> photos})
: _portions = portions, : _portions = portions,
_photos = photos; _photos = photos;
@@ -203,7 +198,6 @@ class _$MealImpl implements _Meal {
@override @override
final int mood; final int mood;
final List<Portion> _portions; final List<Portion> _portions;
@override @override
List<Portion> get portions { List<Portion> get portions {
if (_portions is EqualUnmodifiableListView) return _portions; if (_portions is EqualUnmodifiableListView) return _portions;
@@ -212,7 +206,6 @@ class _$MealImpl implements _Meal {
} }
final List<Photo> _photos; final List<Photo> _photos;
@override @override
List<Photo> get photos { List<Photo> get photos {
if (_photos is EqualUnmodifiableListView) return _photos; if (_photos is EqualUnmodifiableListView) return _photos;
@@ -241,16 +234,15 @@ class _$MealImpl implements _Meal {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
int get hashCode => int get hashCode => Object.hash(
Object.hash( runtimeType,
runtimeType, id,
id, time,
time, type,
type, satiety,
satiety, mood,
mood, const DeepCollectionEquality().hash(_portions),
const DeepCollectionEquality().hash(_portions), const DeepCollectionEquality().hash(_photos));
const DeepCollectionEquality().hash(_photos));
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@@ -267,37 +259,31 @@ class _$MealImpl implements _Meal {
} }
abstract class _Meal implements Meal { abstract class _Meal implements Meal {
const factory _Meal({required final int id, const factory _Meal(
required final String time, {required final int id,
required final int type, required final String time,
required final int satiety, required final int type,
required final int mood, required final int satiety,
required final List<Portion> portions, required final int mood,
required final List<Photo> photos}) = _$MealImpl; required final List<Portion> portions,
required final List<Photo> photos}) = _$MealImpl;
factory _Meal.fromJson(Map<String, dynamic> json) = _$MealImpl.fromJson; factory _Meal.fromJson(Map<String, dynamic> json) = _$MealImpl.fromJson;
@override @override
int get id; int get id;
@override @override
String get time; String get time;
@override @override
int get type; int get type;
@override @override
int get satiety; int get satiety;
@override @override
int get mood; int get mood;
@override @override
List<Portion> get portions; List<Portion> get portions;
@override @override
List<Photo> get photos; List<Photo> get photos;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$MealImplCopyWith<_$MealImpl> get copyWith => _$$MealImplCopyWith<_$MealImpl> get copyWith =>

View File

@@ -6,8 +6,7 @@ part of 'meal.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$MealImpl _$$MealImplFromJson(Map<String, dynamic> json) => _$MealImpl _$$MealImplFromJson(Map<String, dynamic> json) => _$MealImpl(
_$MealImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
time: json['time'] as String, time: json['time'] as String,
type: (json['type'] as num).toInt(), type: (json['type'] as num).toInt(),

View File

@@ -21,14 +21,11 @@ Photo _$PhotoFromJson(Map<String, dynamic> json) {
/// @nodoc /// @nodoc
mixin _$Photo { mixin _$Photo {
int get id => throw _privateConstructorUsedError; int get id => throw _privateConstructorUsedError;
@JsonKey(name: 'original_name') @JsonKey(name: 'original_name')
String get originalName => throw _privateConstructorUsedError; String get originalName => throw _privateConstructorUsedError;
String get path => throw _privateConstructorUsedError; String get path => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$PhotoCopyWith<Photo> get copyWith => throw _privateConstructorUsedError; $PhotoCopyWith<Photo> get copyWith => throw _privateConstructorUsedError;
} }
@@ -36,12 +33,12 @@ mixin _$Photo {
/// @nodoc /// @nodoc
abstract class $PhotoCopyWith<$Res> { abstract class $PhotoCopyWith<$Res> {
factory $PhotoCopyWith(Photo value, $Res Function(Photo) then) = factory $PhotoCopyWith(Photo value, $Res Function(Photo) then) =
_$PhotoCopyWithImpl<$Res, Photo>; _$PhotoCopyWithImpl<$Res, Photo>;
@useResult @useResult
$Res call({int id, $Res call(
@JsonKey(name: 'original_name') String originalName, {int id,
String path}); @JsonKey(name: 'original_name') String originalName,
String path});
} }
/// @nodoc /// @nodoc
@@ -51,7 +48,6 @@ class _$PhotoCopyWithImpl<$Res, $Val extends Photo>
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -66,35 +62,38 @@ class _$PhotoCopyWithImpl<$Res, $Val extends Photo>
id: null == id id: null == id
? _value.id ? _value.id
: id // ignore: cast_nullable_to_non_nullable : id // ignore: cast_nullable_to_non_nullable
as int, as int,
originalName: null == originalName originalName: null == originalName
? _value.originalName ? _value.originalName
: originalName // ignore: cast_nullable_to_non_nullable : originalName // ignore: cast_nullable_to_non_nullable
as String, as String,
path: null == path path: null == path
? _value.path ? _value.path
: path // ignore: cast_nullable_to_non_nullable : path // ignore: cast_nullable_to_non_nullable
as String, as String,
) as $Val); ) as $Val);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$PhotoImplCopyWith<$Res> implements $PhotoCopyWith<$Res> { abstract class _$$PhotoImplCopyWith<$Res> implements $PhotoCopyWith<$Res> {
factory _$$PhotoImplCopyWith(_$PhotoImpl value, $Res Function(_$PhotoImpl) then) = factory _$$PhotoImplCopyWith(
__$$PhotoImplCopyWithImpl<$Res>; _$PhotoImpl value, $Res Function(_$PhotoImpl) then) =
__$$PhotoImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call({int id, $Res call(
@JsonKey(name: 'original_name') String originalName, {int id,
String path}); @JsonKey(name: 'original_name') String originalName,
String path});
} }
/// @nodoc /// @nodoc
class __$$PhotoImplCopyWithImpl<$Res> extends _$PhotoCopyWithImpl<$Res, _$PhotoImpl> class __$$PhotoImplCopyWithImpl<$Res>
extends _$PhotoCopyWithImpl<$Res, _$PhotoImpl>
implements _$$PhotoImplCopyWith<$Res> { implements _$$PhotoImplCopyWith<$Res> {
__$$PhotoImplCopyWithImpl(_$PhotoImpl _value, $Res Function(_$PhotoImpl) _then) __$$PhotoImplCopyWithImpl(
_$PhotoImpl _value, $Res Function(_$PhotoImpl) _then)
: super(_value, _then); : super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@@ -108,15 +107,15 @@ class __$$PhotoImplCopyWithImpl<$Res> extends _$PhotoCopyWithImpl<$Res, _$PhotoI
id: null == id id: null == id
? _value.id ? _value.id
: id // ignore: cast_nullable_to_non_nullable : id // ignore: cast_nullable_to_non_nullable
as int, as int,
originalName: null == originalName originalName: null == originalName
? _value.originalName ? _value.originalName
: originalName // ignore: cast_nullable_to_non_nullable : originalName // ignore: cast_nullable_to_non_nullable
as String, as String,
path: null == path path: null == path
? _value.path ? _value.path
: path // ignore: cast_nullable_to_non_nullable : path // ignore: cast_nullable_to_non_nullable
as String, as String,
)); ));
} }
} }
@@ -124,9 +123,10 @@ class __$$PhotoImplCopyWithImpl<$Res> extends _$PhotoCopyWithImpl<$Res, _$PhotoI
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$PhotoImpl implements _Photo { class _$PhotoImpl implements _Photo {
const _$PhotoImpl({required this.id, const _$PhotoImpl(
@JsonKey(name: 'original_name') required this.originalName, {required this.id,
required this.path}); @JsonKey(name: 'original_name') required this.originalName,
required this.path});
factory _$PhotoImpl.fromJson(Map<String, dynamic> json) => factory _$PhotoImpl.fromJson(Map<String, dynamic> json) =>
_$$PhotoImplFromJson(json); _$$PhotoImplFromJson(json);
@@ -174,22 +174,20 @@ class _$PhotoImpl implements _Photo {
} }
abstract class _Photo implements Photo { abstract class _Photo implements Photo {
const factory _Photo({required final int id, const factory _Photo(
@JsonKey(name: 'original_name') required final String originalName, {required final int id,
required final String path}) = _$PhotoImpl; @JsonKey(name: 'original_name') required final String originalName,
required final String path}) = _$PhotoImpl;
factory _Photo.fromJson(Map<String, dynamic> json) = _$PhotoImpl.fromJson; factory _Photo.fromJson(Map<String, dynamic> json) = _$PhotoImpl.fromJson;
@override @override
int get id; int get id;
@override @override
@JsonKey(name: 'original_name') @JsonKey(name: 'original_name')
String get originalName; String get originalName;
@override @override
String get path; String get path;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith => _$$PhotoImplCopyWith<_$PhotoImpl> get copyWith =>

View File

@@ -6,8 +6,7 @@ part of 'photo.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$PhotoImpl _$$PhotoImplFromJson(Map<String, dynamic> json) => _$PhotoImpl _$$PhotoImplFromJson(Map<String, dynamic> json) => _$PhotoImpl(
_$PhotoImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
originalName: json['original_name'] as String, originalName: json['original_name'] as String,
path: json['path'] as String, path: json['path'] as String,

View File

@@ -21,15 +21,11 @@ Portion _$PortionFromJson(Map<String, dynamic> json) {
/// @nodoc /// @nodoc
mixin _$Portion { mixin _$Portion {
int get id => throw _privateConstructorUsedError; int get id => throw _privateConstructorUsedError;
String get product_name => throw _privateConstructorUsedError; String get product_name => throw _privateConstructorUsedError;
int get quantity => throw _privateConstructorUsedError; int get quantity => throw _privateConstructorUsedError;
String get portion => throw _privateConstructorUsedError; String get portion => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$PortionCopyWith<Portion> get copyWith => throw _privateConstructorUsedError; $PortionCopyWith<Portion> get copyWith => throw _privateConstructorUsedError;
} }
@@ -37,8 +33,7 @@ mixin _$Portion {
/// @nodoc /// @nodoc
abstract class $PortionCopyWith<$Res> { abstract class $PortionCopyWith<$Res> {
factory $PortionCopyWith(Portion value, $Res Function(Portion) then) = factory $PortionCopyWith(Portion value, $Res Function(Portion) then) =
_$PortionCopyWithImpl<$Res, Portion>; _$PortionCopyWithImpl<$Res, Portion>;
@useResult @useResult
$Res call({int id, String product_name, int quantity, String portion}); $Res call({int id, String product_name, int quantity, String portion});
} }
@@ -50,7 +45,6 @@ class _$PortionCopyWithImpl<$Res, $Val extends Portion>
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -66,37 +60,39 @@ class _$PortionCopyWithImpl<$Res, $Val extends Portion>
id: null == id id: null == id
? _value.id ? _value.id
: id // ignore: cast_nullable_to_non_nullable : id // ignore: cast_nullable_to_non_nullable
as int, as int,
product_name: null == product_name product_name: null == product_name
? _value.product_name ? _value.product_name
: product_name // ignore: cast_nullable_to_non_nullable : product_name // ignore: cast_nullable_to_non_nullable
as String, as String,
quantity: null == quantity quantity: null == quantity
? _value.quantity ? _value.quantity
: quantity // ignore: cast_nullable_to_non_nullable : quantity // ignore: cast_nullable_to_non_nullable
as int, as int,
portion: null == portion portion: null == portion
? _value.portion ? _value.portion
: portion // ignore: cast_nullable_to_non_nullable : portion // ignore: cast_nullable_to_non_nullable
as String, as String,
) as $Val); ) as $Val);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$PortionImplCopyWith<$Res> implements $PortionCopyWith<$Res> { abstract class _$$PortionImplCopyWith<$Res> implements $PortionCopyWith<$Res> {
factory _$$PortionImplCopyWith(_$PortionImpl value, $Res Function(_$PortionImpl) then) = factory _$$PortionImplCopyWith(
__$$PortionImplCopyWithImpl<$Res>; _$PortionImpl value, $Res Function(_$PortionImpl) then) =
__$$PortionImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call({int id, String product_name, int quantity, String portion}); $Res call({int id, String product_name, int quantity, String portion});
} }
/// @nodoc /// @nodoc
class __$$PortionImplCopyWithImpl<$Res> extends _$PortionCopyWithImpl<$Res, _$PortionImpl> class __$$PortionImplCopyWithImpl<$Res>
extends _$PortionCopyWithImpl<$Res, _$PortionImpl>
implements _$$PortionImplCopyWith<$Res> { implements _$$PortionImplCopyWith<$Res> {
__$$PortionImplCopyWithImpl(_$PortionImpl _value, $Res Function(_$PortionImpl) _then) __$$PortionImplCopyWithImpl(
_$PortionImpl _value, $Res Function(_$PortionImpl) _then)
: super(_value, _then); : super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@@ -111,19 +107,19 @@ class __$$PortionImplCopyWithImpl<$Res> extends _$PortionCopyWithImpl<$Res, _$Po
id: null == id id: null == id
? _value.id ? _value.id
: id // ignore: cast_nullable_to_non_nullable : id // ignore: cast_nullable_to_non_nullable
as int, as int,
product_name: null == product_name product_name: null == product_name
? _value.product_name ? _value.product_name
: product_name // ignore: cast_nullable_to_non_nullable : product_name // ignore: cast_nullable_to_non_nullable
as String, as String,
quantity: null == quantity quantity: null == quantity
? _value.quantity ? _value.quantity
: quantity // ignore: cast_nullable_to_non_nullable : quantity // ignore: cast_nullable_to_non_nullable
as int, as int,
portion: null == portion portion: null == portion
? _value.portion ? _value.portion
: portion // ignore: cast_nullable_to_non_nullable : portion // ignore: cast_nullable_to_non_nullable
as String, as String,
)); ));
} }
} }
@@ -131,10 +127,11 @@ class __$$PortionImplCopyWithImpl<$Res> extends _$PortionCopyWithImpl<$Res, _$Po
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$PortionImpl implements _Portion { class _$PortionImpl implements _Portion {
const _$PortionImpl({required this.id, const _$PortionImpl(
required this.product_name, {required this.id,
required this.quantity, required this.product_name,
required this.portion}); required this.quantity,
required this.portion});
factory _$PortionImpl.fromJson(Map<String, dynamic> json) => factory _$PortionImpl.fromJson(Map<String, dynamic> json) =>
_$$PortionImplFromJson(json); _$$PortionImplFromJson(json);
@@ -186,25 +183,22 @@ class _$PortionImpl implements _Portion {
} }
abstract class _Portion implements Portion { abstract class _Portion implements Portion {
const factory _Portion({required final int id, const factory _Portion(
required final String product_name, {required final int id,
required final int quantity, required final String product_name,
required final String portion}) = _$PortionImpl; required final int quantity,
required final String portion}) = _$PortionImpl;
factory _Portion.fromJson(Map<String, dynamic> json) = _$PortionImpl.fromJson; factory _Portion.fromJson(Map<String, dynamic> json) = _$PortionImpl.fromJson;
@override @override
int get id; int get id;
@override @override
String get product_name; String get product_name;
@override @override
int get quantity; int get quantity;
@override @override
String get portion; String get portion;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$PortionImplCopyWith<_$PortionImpl> get copyWith => _$$PortionImplCopyWith<_$PortionImpl> get copyWith =>

View File

@@ -21,11 +21,9 @@ Product _$ProductFromJson(Map<String, dynamic> json) {
/// @nodoc /// @nodoc
mixin _$Product { mixin _$Product {
int get id => throw _privateConstructorUsedError; int get id => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError; String get name => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$ProductCopyWith<Product> get copyWith => throw _privateConstructorUsedError; $ProductCopyWith<Product> get copyWith => throw _privateConstructorUsedError;
} }
@@ -33,8 +31,7 @@ mixin _$Product {
/// @nodoc /// @nodoc
abstract class $ProductCopyWith<$Res> { abstract class $ProductCopyWith<$Res> {
factory $ProductCopyWith(Product value, $Res Function(Product) then) = factory $ProductCopyWith(Product value, $Res Function(Product) then) =
_$ProductCopyWithImpl<$Res, Product>; _$ProductCopyWithImpl<$Res, Product>;
@useResult @useResult
$Res call({int id, String name}); $Res call({int id, String name});
} }
@@ -46,7 +43,6 @@ class _$ProductCopyWithImpl<$Res, $Val extends Product>
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -60,29 +56,31 @@ class _$ProductCopyWithImpl<$Res, $Val extends Product>
id: null == id id: null == id
? _value.id ? _value.id
: id // ignore: cast_nullable_to_non_nullable : id // ignore: cast_nullable_to_non_nullable
as int, as int,
name: null == name name: null == name
? _value.name ? _value.name
: name // ignore: cast_nullable_to_non_nullable : name // ignore: cast_nullable_to_non_nullable
as String, as String,
) as $Val); ) as $Val);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$ProductImplCopyWith<$Res> implements $ProductCopyWith<$Res> { abstract class _$$ProductImplCopyWith<$Res> implements $ProductCopyWith<$Res> {
factory _$$ProductImplCopyWith(_$ProductImpl value, $Res Function(_$ProductImpl) then) = factory _$$ProductImplCopyWith(
__$$ProductImplCopyWithImpl<$Res>; _$ProductImpl value, $Res Function(_$ProductImpl) then) =
__$$ProductImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call({int id, String name}); $Res call({int id, String name});
} }
/// @nodoc /// @nodoc
class __$$ProductImplCopyWithImpl<$Res> extends _$ProductCopyWithImpl<$Res, _$ProductImpl> class __$$ProductImplCopyWithImpl<$Res>
extends _$ProductCopyWithImpl<$Res, _$ProductImpl>
implements _$$ProductImplCopyWith<$Res> { implements _$$ProductImplCopyWith<$Res> {
__$$ProductImplCopyWithImpl(_$ProductImpl _value, $Res Function(_$ProductImpl) _then) __$$ProductImplCopyWithImpl(
_$ProductImpl _value, $Res Function(_$ProductImpl) _then)
: super(_value, _then); : super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@@ -95,11 +93,11 @@ class __$$ProductImplCopyWithImpl<$Res> extends _$ProductCopyWithImpl<$Res, _$Pr
id: null == id id: null == id
? _value.id ? _value.id
: id // ignore: cast_nullable_to_non_nullable : id // ignore: cast_nullable_to_non_nullable
as int, as int,
name: null == name name: null == name
? _value.name ? _value.name
: name // ignore: cast_nullable_to_non_nullable : name // ignore: cast_nullable_to_non_nullable
as String, as String,
)); ));
} }
} }
@@ -151,16 +149,14 @@ class _$ProductImpl implements _Product {
abstract class _Product implements Product { abstract class _Product implements Product {
const factory _Product({required final int id, required final String name}) = const factory _Product({required final int id, required final String name}) =
_$ProductImpl; _$ProductImpl;
factory _Product.fromJson(Map<String, dynamic> json) = _$ProductImpl.fromJson; factory _Product.fromJson(Map<String, dynamic> json) = _$ProductImpl.fromJson;
@override @override
int get id; int get id;
@override @override
String get name; String get name;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$ProductImplCopyWith<_$ProductImpl> get copyWith => _$$ProductImplCopyWith<_$ProductImpl> get copyWith =>

View File

@@ -1,5 +1,6 @@
// ignore_for_file: unused_local_variable // ignore_for_file: unused_local_variable
import 'package:carousel_slider_plus/carousel_slider_plus.dart';
import 'package:eatvio_app/features/diary/models/diary_model.dart'; import 'package:eatvio_app/features/diary/models/diary_model.dart';
import 'package:eatvio_app/features/diary/models/meal.dart'; import 'package:eatvio_app/features/diary/models/meal.dart';
import 'package:eatvio_app/features/diary/models/photo.dart'; import 'package:eatvio_app/features/diary/models/photo.dart';
@@ -18,7 +19,6 @@ import 'package:flutter/services.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter_form_builder/flutter_form_builder.dart'; import 'package:flutter_form_builder/flutter_form_builder.dart';
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
import 'package:carousel_slider/carousel_slider.dart';
import 'package:syncfusion_flutter_charts/charts.dart'; import 'package:syncfusion_flutter_charts/charts.dart';
// ignore: must_be_immutable // ignore: must_be_immutable

View File

@@ -0,0 +1,133 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'diets_pagination_model.freezed.dart';
part 'diets_pagination_model.g.dart';
@freezed
class DietsPagination with _$DietsPagination {
const factory DietsPagination({
@JsonKey(name: "data") required List<Datum> data,
@JsonKey(name: "links") required Links links,
@JsonKey(name: "meta") required Meta meta,
}) = _DietsPagination;
factory DietsPagination.fromJson(Map<String, dynamic> json) => _$DietsPaginationFromJson(json);
}
@freezed
class Datum with _$Datum {
const factory Datum({
@JsonKey(name: "id") required int id,
@JsonKey(name: "name") required String name,
@JsonKey(name: "image") required String image,
@JsonKey(name: "duration") required int duration,
@JsonKey(name: "state") required String state,
@JsonKey(name: "type") required Type type,
@JsonKey(name: "details") required String details,
@JsonKey(name: "daily_schedule") required List<List<List<DailySchedule>>> dailySchedule,
@JsonKey(name: "author") required Author author,
@JsonKey(name: "total_likes") required int totalLikes,
@JsonKey(name: "total_views") required int totalViews,
@JsonKey(name: "total_comments") required int totalComments,
}) = _Datum;
factory Datum.fromJson(Map<String, dynamic> json) => _$DatumFromJson(json);
}
@freezed
class Author with _$Author {
const factory Author({
@JsonKey(name: "author_slug") required String authorSlug,
@JsonKey(name: "author_name") required String authorName,
@JsonKey(name: "author_profile_icon") required String authorProfileIcon,
@JsonKey(name: "author_is_me") required bool authorIsMe,
}) = _Author;
factory Author.fromJson(Map<String, dynamic> json) => _$AuthorFromJson(json);
}
@freezed
class DailySchedule with _$DailySchedule {
const factory DailySchedule({
@JsonKey(name: "name") required String name,
@JsonKey(name: "uniq") required String uniq,
@JsonKey(name: "portion") required Portion portion,
@JsonKey(name: "quantity") required int quantity,
}) = _DailySchedule;
factory DailySchedule.fromJson(Map<String, dynamic> json) => _$DailyScheduleFromJson(json);
}
enum Portion {
@JsonValue("grams")
GRAMS,
@JsonValue("milliliters")
MILLILITERS,
@JsonValue("pcs")
PCS
}
final portionValues = EnumValues({"grams": Portion.GRAMS, "milliliters": Portion.MILLILITERS, "pcs": Portion.PCS});
@freezed
class Type with _$Type {
const factory Type({
@JsonKey(name: "alko") bool? alko,
@JsonKey(name: "veg") bool? veg,
@JsonKey(name: "corb") bool? corb,
@JsonKey(name: "meat") bool? meat,
}) = _Type;
factory Type.fromJson(Map<String, dynamic> json) => _$TypeFromJson(json);
}
@freezed
class Links with _$Links {
const factory Links({
@JsonKey(name: "first") required String first,
@JsonKey(name: "last") required String last,
@JsonKey(name: "prev") required dynamic prev,
@JsonKey(name: "next") required dynamic next,
}) = _Links;
factory Links.fromJson(Map<String, dynamic> json) => _$LinksFromJson(json);
}
@freezed
class Meta with _$Meta {
const factory Meta({
@JsonKey(name: "current_page") required int currentPage,
@JsonKey(name: "from") required int from,
@JsonKey(name: "last_page") required int lastPage,
@JsonKey(name: "links") required List<Link> links,
@JsonKey(name: "path") required String path,
@JsonKey(name: "per_page") required int perPage,
@JsonKey(name: "to") required int to,
@JsonKey(name: "total") required int total,
}) = _Meta;
factory Meta.fromJson(Map<String, dynamic> json) => _$MetaFromJson(json);
}
@freezed
class Link with _$Link {
const factory Link({
@JsonKey(name: "url") required String? url,
@JsonKey(name: "label") required String label,
@JsonKey(name: "active") required bool active,
}) = _Link;
factory Link.fromJson(Map<String, dynamic> json) => _$LinkFromJson(json);
}
class EnumValues<T> {
Map<String, T> map;
late Map<T, String> reverseMap;
EnumValues(this.map);
Map<T, String> get reverse {
reverseMap = map.map((k, v) => MapEntry(v, k));
return reverseMap;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,167 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'diets_pagination_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_$DietsPaginationImpl _$$DietsPaginationImplFromJson(
Map<String, dynamic> json) =>
_$DietsPaginationImpl(
data: (json['data'] as List<dynamic>)
.map((e) => Datum.fromJson(e as Map<String, dynamic>))
.toList(),
links: Links.fromJson(json['links'] as Map<String, dynamic>),
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
);
Map<String, dynamic> _$$DietsPaginationImplToJson(
_$DietsPaginationImpl instance) =>
<String, dynamic>{
'data': instance.data,
'links': instance.links,
'meta': instance.meta,
};
_$DatumImpl _$$DatumImplFromJson(Map<String, dynamic> json) => _$DatumImpl(
id: (json['id'] as num).toInt(),
name: json['name'] as String,
image: json['image'] as String,
duration: (json['duration'] as num).toInt(),
state: json['state'] as String,
type: Type.fromJson(json['type'] as Map<String, dynamic>),
details: json['details'] as String,
dailySchedule: (json['daily_schedule'] as List<dynamic>)
.map((e) => (e as List<dynamic>)
.map((e) => (e as List<dynamic>)
.map((e) => DailySchedule.fromJson(e as Map<String, dynamic>))
.toList())
.toList())
.toList(),
author: Author.fromJson(json['author'] as Map<String, dynamic>),
totalLikes: (json['total_likes'] as num).toInt(),
totalViews: (json['total_views'] as num).toInt(),
totalComments: (json['total_comments'] as num).toInt(),
);
Map<String, dynamic> _$$DatumImplToJson(_$DatumImpl instance) =>
<String, dynamic>{
'id': instance.id,
'name': instance.name,
'image': instance.image,
'duration': instance.duration,
'state': instance.state,
'type': instance.type,
'details': instance.details,
'daily_schedule': instance.dailySchedule,
'author': instance.author,
'total_likes': instance.totalLikes,
'total_views': instance.totalViews,
'total_comments': instance.totalComments,
};
_$AuthorImpl _$$AuthorImplFromJson(Map<String, dynamic> json) => _$AuthorImpl(
authorSlug: json['author_slug'] as String,
authorName: json['author_name'] as String,
authorProfileIcon: json['author_profile_icon'] as String,
authorIsMe: json['author_is_me'] as bool,
);
Map<String, dynamic> _$$AuthorImplToJson(_$AuthorImpl instance) =>
<String, dynamic>{
'author_slug': instance.authorSlug,
'author_name': instance.authorName,
'author_profile_icon': instance.authorProfileIcon,
'author_is_me': instance.authorIsMe,
};
_$DailyScheduleImpl _$$DailyScheduleImplFromJson(Map<String, dynamic> json) =>
_$DailyScheduleImpl(
name: json['name'] as String,
uniq: json['uniq'] as String,
portion: $enumDecode(_$PortionEnumMap, json['portion']),
quantity: (json['quantity'] as num).toInt(),
);
Map<String, dynamic> _$$DailyScheduleImplToJson(_$DailyScheduleImpl instance) =>
<String, dynamic>{
'name': instance.name,
'uniq': instance.uniq,
'portion': _$PortionEnumMap[instance.portion]!,
'quantity': instance.quantity,
};
const _$PortionEnumMap = {
Portion.GRAMS: 'grams',
Portion.MILLILITERS: 'milliliters',
Portion.PCS: 'pcs',
};
_$TypeImpl _$$TypeImplFromJson(Map<String, dynamic> json) => _$TypeImpl(
alko: json['alko'] as bool?,
veg: json['veg'] as bool?,
corb: json['corb'] as bool?,
meat: json['meat'] as bool?,
);
Map<String, dynamic> _$$TypeImplToJson(_$TypeImpl instance) =>
<String, dynamic>{
'alko': instance.alko,
'veg': instance.veg,
'corb': instance.corb,
'meat': instance.meat,
};
_$LinksImpl _$$LinksImplFromJson(Map<String, dynamic> json) => _$LinksImpl(
first: json['first'] as String,
last: json['last'] as String,
prev: json['prev'],
next: json['next'],
);
Map<String, dynamic> _$$LinksImplToJson(_$LinksImpl instance) =>
<String, dynamic>{
'first': instance.first,
'last': instance.last,
'prev': instance.prev,
'next': instance.next,
};
_$MetaImpl _$$MetaImplFromJson(Map<String, dynamic> json) => _$MetaImpl(
currentPage: (json['current_page'] as num).toInt(),
from: (json['from'] as num).toInt(),
lastPage: (json['last_page'] as num).toInt(),
links: (json['links'] as List<dynamic>)
.map((e) => Link.fromJson(e as Map<String, dynamic>))
.toList(),
path: json['path'] as String,
perPage: (json['per_page'] as num).toInt(),
to: (json['to'] as num).toInt(),
total: (json['total'] as num).toInt(),
);
Map<String, dynamic> _$$MetaImplToJson(_$MetaImpl instance) =>
<String, dynamic>{
'current_page': instance.currentPage,
'from': instance.from,
'last_page': instance.lastPage,
'links': instance.links,
'path': instance.path,
'per_page': instance.perPage,
'to': instance.to,
'total': instance.total,
};
_$LinkImpl _$$LinkImplFromJson(Map<String, dynamic> json) => _$LinkImpl(
url: json['url'] as String?,
label: json['label'] as String,
active: json['active'] as bool,
);
Map<String, dynamic> _$$LinkImplToJson(_$LinkImpl instance) =>
<String, dynamic>{
'url': instance.url,
'label': instance.label,
'active': instance.active,
};

View File

@@ -21,34 +21,28 @@ FeedBlogPostModel _$FeedBlogPostModelFromJson(Map<String, dynamic> json) {
/// @nodoc /// @nodoc
mixin _$FeedBlogPostModel { mixin _$FeedBlogPostModel {
int get id => throw _privateConstructorUsedError; int get id => throw _privateConstructorUsedError;
String get state => throw _privateConstructorUsedError; String get state => throw _privateConstructorUsedError;
String get image => throw _privateConstructorUsedError; String get image => throw _privateConstructorUsedError;
String get description => throw _privateConstructorUsedError; String get description => throw _privateConstructorUsedError;
@JsonKey(name: "youtube_url") @JsonKey(name: "youtube_url")
String get youtubeUrl => throw _privateConstructorUsedError; String get youtubeUrl => throw _privateConstructorUsedError;
@JsonKey(name: "created_at") @JsonKey(name: "created_at")
DateTime get createdAt => throw _privateConstructorUsedError; DateTime get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: "updated_at") @JsonKey(name: "updated_at")
DateTime get updatedAt => throw _privateConstructorUsedError; DateTime get updatedAt => throw _privateConstructorUsedError;
String get title => throw _privateConstructorUsedError; String get title => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$FeedBlogPostModelCopyWith<FeedBlogPostModel> get copyWith => throw _privateConstructorUsedError; $FeedBlogPostModelCopyWith<FeedBlogPostModel> get copyWith =>
throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class $FeedBlogPostModelCopyWith<$Res> { abstract class $FeedBlogPostModelCopyWith<$Res> {
factory $FeedBlogPostModelCopyWith(FeedBlogPostModel value, $Res Function(FeedBlogPostModel) then) = _$FeedBlogPostModelCopyWithImpl<$Res, FeedBlogPostModel>; factory $FeedBlogPostModelCopyWith(
FeedBlogPostModel value, $Res Function(FeedBlogPostModel) then) =
_$FeedBlogPostModelCopyWithImpl<$Res, FeedBlogPostModel>;
@useResult @useResult
$Res call( $Res call(
{int id, {int id,
@@ -62,12 +56,12 @@ abstract class $FeedBlogPostModelCopyWith<$Res> {
} }
/// @nodoc /// @nodoc
class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel> implements $FeedBlogPostModelCopyWith<$Res> { class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
implements $FeedBlogPostModelCopyWith<$Res> {
_$FeedBlogPostModelCopyWithImpl(this._value, this._then); _$FeedBlogPostModelCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -121,10 +115,11 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel> impl
} }
/// @nodoc /// @nodoc
abstract class _$$FeedBlogPostModelImplCopyWith<$Res> implements $FeedBlogPostModelCopyWith<$Res> { abstract class _$$FeedBlogPostModelImplCopyWith<$Res>
factory _$$FeedBlogPostModelImplCopyWith(_$FeedBlogPostModelImpl value, $Res Function(_$FeedBlogPostModelImpl) then) = implements $FeedBlogPostModelCopyWith<$Res> {
factory _$$FeedBlogPostModelImplCopyWith(_$FeedBlogPostModelImpl value,
$Res Function(_$FeedBlogPostModelImpl) then) =
__$$FeedBlogPostModelImplCopyWithImpl<$Res>; __$$FeedBlogPostModelImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call( $Res call(
@@ -139,9 +134,12 @@ abstract class _$$FeedBlogPostModelImplCopyWith<$Res> implements $FeedBlogPostMo
} }
/// @nodoc /// @nodoc
class __$$FeedBlogPostModelImplCopyWithImpl<$Res> extends _$FeedBlogPostModelCopyWithImpl<$Res, _$FeedBlogPostModelImpl> class __$$FeedBlogPostModelImplCopyWithImpl<$Res>
extends _$FeedBlogPostModelCopyWithImpl<$Res, _$FeedBlogPostModelImpl>
implements _$$FeedBlogPostModelImplCopyWith<$Res> { implements _$$FeedBlogPostModelImplCopyWith<$Res> {
__$$FeedBlogPostModelImplCopyWithImpl(_$FeedBlogPostModelImpl _value, $Res Function(_$FeedBlogPostModelImpl) _then) : super(_value, _then); __$$FeedBlogPostModelImplCopyWithImpl(_$FeedBlogPostModelImpl _value,
$Res Function(_$FeedBlogPostModelImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -205,7 +203,8 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
@JsonKey(name: "updated_at") required this.updatedAt, @JsonKey(name: "updated_at") required this.updatedAt,
required this.title}); required this.title});
factory _$FeedBlogPostModelImpl.fromJson(Map<String, dynamic> json) => _$$FeedBlogPostModelImplFromJson(json); factory _$FeedBlogPostModelImpl.fromJson(Map<String, dynamic> json) =>
_$$FeedBlogPostModelImplFromJson(json);
@override @override
final int id; final int id;
@@ -240,21 +239,28 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
(identical(other.id, id) || other.id == id) && (identical(other.id, id) || other.id == id) &&
(identical(other.state, state) || other.state == state) && (identical(other.state, state) || other.state == state) &&
(identical(other.image, image) || other.image == image) && (identical(other.image, image) || other.image == image) &&
(identical(other.description, description) || other.description == description) && (identical(other.description, description) ||
(identical(other.youtubeUrl, youtubeUrl) || other.youtubeUrl == youtubeUrl) && other.description == description) &&
(identical(other.createdAt, createdAt) || other.createdAt == createdAt) && (identical(other.youtubeUrl, youtubeUrl) ||
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) && other.youtubeUrl == youtubeUrl) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.title, title) || other.title == title)); (identical(other.title, title) || other.title == title));
} }
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
int get hashCode => Object.hash(runtimeType, id, state, image, description, youtubeUrl, createdAt, updatedAt, title); int get hashCode => Object.hash(runtimeType, id, state, image, description,
youtubeUrl, createdAt, updatedAt, title);
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith => __$$FeedBlogPostModelImplCopyWithImpl<_$FeedBlogPostModelImpl>(this, _$identity); _$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
__$$FeedBlogPostModelImplCopyWithImpl<_$FeedBlogPostModelImpl>(
this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -275,36 +281,30 @@ abstract class _FeedBlogPostModel implements FeedBlogPostModel {
@JsonKey(name: "updated_at") required final DateTime updatedAt, @JsonKey(name: "updated_at") required final DateTime updatedAt,
required final String title}) = _$FeedBlogPostModelImpl; required final String title}) = _$FeedBlogPostModelImpl;
factory _FeedBlogPostModel.fromJson(Map<String, dynamic> json) = _$FeedBlogPostModelImpl.fromJson; factory _FeedBlogPostModel.fromJson(Map<String, dynamic> json) =
_$FeedBlogPostModelImpl.fromJson;
@override @override
int get id; int get id;
@override @override
String get state; String get state;
@override @override
String get image; String get image;
@override @override
String get description; String get description;
@override @override
@JsonKey(name: "youtube_url") @JsonKey(name: "youtube_url")
String get youtubeUrl; String get youtubeUrl;
@override @override
@JsonKey(name: "created_at") @JsonKey(name: "created_at")
DateTime get createdAt; DateTime get createdAt;
@override @override
@JsonKey(name: "updated_at") @JsonKey(name: "updated_at")
DateTime get updatedAt; DateTime get updatedAt;
@override @override
String get title; String get title;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith => throw _privateConstructorUsedError; _$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
throw _privateConstructorUsedError;
} }

View File

@@ -6,7 +6,9 @@ part of 'feed_blog_post_model.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(Map<String, dynamic> json) => _$FeedBlogPostModelImpl( _$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(
Map<String, dynamic> json) =>
_$FeedBlogPostModelImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
state: json['state'] as String, state: json['state'] as String,
image: json['image'] as String, image: json['image'] as String,
@@ -17,7 +19,9 @@ _$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(Map<String, dynamic> js
title: json['title'] as String, title: json['title'] as String,
); );
Map<String, dynamic> _$$FeedBlogPostModelImplToJson(_$FeedBlogPostModelImpl instance) => <String, dynamic>{ Map<String, dynamic> _$$FeedBlogPostModelImplToJson(
_$FeedBlogPostModelImpl instance) =>
<String, dynamic>{
'id': instance.id, 'id': instance.id,
'state': instance.state, 'state': instance.state,
'image': instance.image, 'image': instance.image,

View File

@@ -14,37 +14,40 @@ T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError( final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
FeedBlogPostSettingsModel _$FeedBlogPostSettingsModelFromJson(Map<String, dynamic> json) { FeedBlogPostSettingsModel _$FeedBlogPostSettingsModelFromJson(
Map<String, dynamic> json) {
return _FeedBlogPostSettingsModel.fromJson(json); return _FeedBlogPostSettingsModel.fromJson(json);
} }
/// @nodoc /// @nodoc
mixin _$FeedBlogPostSettingsModel { mixin _$FeedBlogPostSettingsModel {
@JsonKey(name: 'data') @JsonKey(name: 'data')
List<FeedBlogPostModel> get feedBlogPostList => throw _privateConstructorUsedError; List<FeedBlogPostModel> get feedBlogPostList =>
throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$FeedBlogPostSettingsModelCopyWith<FeedBlogPostSettingsModel> get copyWith => throw _privateConstructorUsedError; $FeedBlogPostSettingsModelCopyWith<FeedBlogPostSettingsModel> get copyWith =>
throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class $FeedBlogPostSettingsModelCopyWith<$Res> { abstract class $FeedBlogPostSettingsModelCopyWith<$Res> {
factory $FeedBlogPostSettingsModelCopyWith(FeedBlogPostSettingsModel value, $Res Function(FeedBlogPostSettingsModel) then) = factory $FeedBlogPostSettingsModelCopyWith(FeedBlogPostSettingsModel value,
$Res Function(FeedBlogPostSettingsModel) then) =
_$FeedBlogPostSettingsModelCopyWithImpl<$Res, FeedBlogPostSettingsModel>; _$FeedBlogPostSettingsModelCopyWithImpl<$Res, FeedBlogPostSettingsModel>;
@useResult @useResult
$Res call({@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList}); $Res call({@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList});
} }
/// @nodoc /// @nodoc
class _$FeedBlogPostSettingsModelCopyWithImpl<$Res, $Val extends FeedBlogPostSettingsModel> implements $FeedBlogPostSettingsModelCopyWith<$Res> { class _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
$Val extends FeedBlogPostSettingsModel>
implements $FeedBlogPostSettingsModelCopyWith<$Res> {
_$FeedBlogPostSettingsModelCopyWithImpl(this._value, this._then); _$FeedBlogPostSettingsModelCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -63,19 +66,25 @@ class _$FeedBlogPostSettingsModelCopyWithImpl<$Res, $Val extends FeedBlogPostSet
} }
/// @nodoc /// @nodoc
abstract class _$$FeedBlogPostSettingsModelImplCopyWith<$Res> implements $FeedBlogPostSettingsModelCopyWith<$Res> { abstract class _$$FeedBlogPostSettingsModelImplCopyWith<$Res>
factory _$$FeedBlogPostSettingsModelImplCopyWith(_$FeedBlogPostSettingsModelImpl value, $Res Function(_$FeedBlogPostSettingsModelImpl) then) = implements $FeedBlogPostSettingsModelCopyWith<$Res> {
factory _$$FeedBlogPostSettingsModelImplCopyWith(
_$FeedBlogPostSettingsModelImpl value,
$Res Function(_$FeedBlogPostSettingsModelImpl) then) =
__$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>; __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call({@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList}); $Res call({@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList});
} }
/// @nodoc /// @nodoc
class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res> extends _$FeedBlogPostSettingsModelCopyWithImpl<$Res, _$FeedBlogPostSettingsModelImpl> class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>
extends _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
_$FeedBlogPostSettingsModelImpl>
implements _$$FeedBlogPostSettingsModelImplCopyWith<$Res> { implements _$$FeedBlogPostSettingsModelImplCopyWith<$Res> {
__$$FeedBlogPostSettingsModelImplCopyWithImpl(_$FeedBlogPostSettingsModelImpl _value, $Res Function(_$FeedBlogPostSettingsModelImpl) _then) __$$FeedBlogPostSettingsModelImplCopyWithImpl(
_$FeedBlogPostSettingsModelImpl _value,
$Res Function(_$FeedBlogPostSettingsModelImpl) _then)
: super(_value, _then); : super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@@ -95,17 +104,20 @@ class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res> extends _$FeedBlogPost
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel { class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
const _$FeedBlogPostSettingsModelImpl({@JsonKey(name: 'data') required final List<FeedBlogPostModel> feedBlogPostList}) const _$FeedBlogPostSettingsModelImpl(
{@JsonKey(name: 'data')
required final List<FeedBlogPostModel> feedBlogPostList})
: _feedBlogPostList = feedBlogPostList; : _feedBlogPostList = feedBlogPostList;
factory _$FeedBlogPostSettingsModelImpl.fromJson(Map<String, dynamic> json) => _$$FeedBlogPostSettingsModelImplFromJson(json); factory _$FeedBlogPostSettingsModelImpl.fromJson(Map<String, dynamic> json) =>
_$$FeedBlogPostSettingsModelImplFromJson(json);
final List<FeedBlogPostModel> _feedBlogPostList; final List<FeedBlogPostModel> _feedBlogPostList;
@override @override
@JsonKey(name: 'data') @JsonKey(name: 'data')
List<FeedBlogPostModel> get feedBlogPostList { List<FeedBlogPostModel> get feedBlogPostList {
if (_feedBlogPostList is EqualUnmodifiableListView) return _feedBlogPostList; if (_feedBlogPostList is EqualUnmodifiableListView)
return _feedBlogPostList;
// ignore: implicit_dynamic_type // ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_feedBlogPostList); return EqualUnmodifiableListView(_feedBlogPostList);
} }
@@ -120,18 +132,21 @@ class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$FeedBlogPostSettingsModelImpl && other is _$FeedBlogPostSettingsModelImpl &&
const DeepCollectionEquality().equals(other._feedBlogPostList, _feedBlogPostList)); const DeepCollectionEquality()
.equals(other._feedBlogPostList, _feedBlogPostList));
} }
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_feedBlogPostList)); int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_feedBlogPostList));
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl> get copyWith => _$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
__$$FeedBlogPostSettingsModelImplCopyWithImpl<_$FeedBlogPostSettingsModelImpl>(this, _$identity); get copyWith => __$$FeedBlogPostSettingsModelImplCopyWithImpl<
_$FeedBlogPostSettingsModelImpl>(this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -142,15 +157,19 @@ class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
} }
abstract class _FeedBlogPostSettingsModel implements FeedBlogPostSettingsModel { abstract class _FeedBlogPostSettingsModel implements FeedBlogPostSettingsModel {
const factory _FeedBlogPostSettingsModel({@JsonKey(name: 'data') required final List<FeedBlogPostModel> feedBlogPostList}) = _$FeedBlogPostSettingsModelImpl; const factory _FeedBlogPostSettingsModel(
{@JsonKey(name: 'data')
required final List<FeedBlogPostModel> feedBlogPostList}) =
_$FeedBlogPostSettingsModelImpl;
factory _FeedBlogPostSettingsModel.fromJson(Map<String, dynamic> json) = _$FeedBlogPostSettingsModelImpl.fromJson; factory _FeedBlogPostSettingsModel.fromJson(Map<String, dynamic> json) =
_$FeedBlogPostSettingsModelImpl.fromJson;
@override @override
@JsonKey(name: 'data') @JsonKey(name: 'data')
List<FeedBlogPostModel> get feedBlogPostList; List<FeedBlogPostModel> get feedBlogPostList;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl> get copyWith => throw _privateConstructorUsedError; _$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
get copyWith => throw _privateConstructorUsedError;
} }

View File

@@ -6,14 +6,16 @@ part of 'feed_blog_post_settings_model.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$FeedBlogPostSettingsModelImpl _$$FeedBlogPostSettingsModelImplFromJson(Map<String, dynamic> json) => _$FeedBlogPostSettingsModelImpl _$$FeedBlogPostSettingsModelImplFromJson(
Map<String, dynamic> json) =>
_$FeedBlogPostSettingsModelImpl( _$FeedBlogPostSettingsModelImpl(
feedBlogPostList: (json['data'] as List<dynamic>) feedBlogPostList: (json['data'] as List<dynamic>)
.map((e) => FeedBlogPostModel.fromJson(e as Map<String, dynamic>)) .map((e) => FeedBlogPostModel.fromJson(e as Map<String, dynamic>))
.toList(), .toList(),
); );
Map<String, dynamic> _$$FeedBlogPostSettingsModelImplToJson(_$FeedBlogPostSettingsModelImpl instance) => Map<String, dynamic> _$$FeedBlogPostSettingsModelImplToJson(
_$FeedBlogPostSettingsModelImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'data': instance.feedBlogPostList, 'data': instance.feedBlogPostList,
}; };

View File

@@ -9,17 +9,19 @@ class Recipes with _$Recipes {
required int id, required int id,
required String image, required String image,
required String state, required String state,
@JsonKey(name: "cooking_time") required int cookingTime, @JsonKey(name: 'cooking_time') required int cookingTime,
required List<Ingredient> ingredients, required List<Ingredient> ingredients,
required String description, required String description,
required List<Step> steps, required List<Step> steps,
@JsonKey(name: "video_url") required String videoUrl, @JsonKey(name: 'video_url') required String videoUrl,
@JsonKey(name: "created_at") required DateTime createdAt, @JsonKey(name: 'created_at') required DateTime createdAt,
@JsonKey(name: "updated_at") required DateTime updatedAt, @JsonKey(name: 'updated_at') required DateTime updatedAt,
required String title, required String title,
required String type, required String type,
required String slug, required String slug,
@JsonKey(name: "comments_count") required int commentsCount, @JsonKey(name: 'total_comments') required int commentsCount,
@JsonKey(name: 'total_likes') required int likesCount,
@JsonKey(name: 'total_views') required int viewsCount,
}) = _Recipes; }) = _Recipes;
factory Recipes.fromJson(Map<String, Object?> json) => _$RecipesFromJson(json); factory Recipes.fromJson(Map<String, Object?> json) => _$RecipesFromJson(json);

View File

@@ -21,73 +21,65 @@ Recipes _$RecipesFromJson(Map<String, dynamic> json) {
/// @nodoc /// @nodoc
mixin _$Recipes { mixin _$Recipes {
int get id => throw _privateConstructorUsedError; int get id => throw _privateConstructorUsedError;
String get image => throw _privateConstructorUsedError; String get image => throw _privateConstructorUsedError;
String get state => throw _privateConstructorUsedError; String get state => throw _privateConstructorUsedError;
@JsonKey(name: 'cooking_time')
@JsonKey(name: "cooking_time")
int get cookingTime => throw _privateConstructorUsedError; int get cookingTime => throw _privateConstructorUsedError;
List<Ingredient> get ingredients => throw _privateConstructorUsedError; List<Ingredient> get ingredients => throw _privateConstructorUsedError;
String get description => throw _privateConstructorUsedError; String get description => throw _privateConstructorUsedError;
List<Step> get steps => throw _privateConstructorUsedError; List<Step> get steps => throw _privateConstructorUsedError;
@JsonKey(name: 'video_url')
@JsonKey(name: "video_url")
String get videoUrl => throw _privateConstructorUsedError; String get videoUrl => throw _privateConstructorUsedError;
@JsonKey(name: 'created_at')
@JsonKey(name: "created_at")
DateTime get createdAt => throw _privateConstructorUsedError; DateTime get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: 'updated_at')
@JsonKey(name: "updated_at")
DateTime get updatedAt => throw _privateConstructorUsedError; DateTime get updatedAt => throw _privateConstructorUsedError;
String get title => throw _privateConstructorUsedError; String get title => throw _privateConstructorUsedError;
String get type => throw _privateConstructorUsedError; String get type => throw _privateConstructorUsedError;
String get slug => throw _privateConstructorUsedError; String get slug => throw _privateConstructorUsedError;
@JsonKey(name: 'total_comments')
@JsonKey(name: "comments_count")
int get commentsCount => throw _privateConstructorUsedError; int get commentsCount => throw _privateConstructorUsedError;
@JsonKey(name: 'total_likes')
int get likesCount => throw _privateConstructorUsedError;
@JsonKey(name: 'total_views')
int get viewsCount => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$RecipesCopyWith<Recipes> get copyWith => throw _privateConstructorUsedError; $RecipesCopyWith<Recipes> get copyWith => throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class $RecipesCopyWith<$Res> { abstract class $RecipesCopyWith<$Res> {
factory $RecipesCopyWith(Recipes value, $Res Function(Recipes) then) = _$RecipesCopyWithImpl<$Res, Recipes>; factory $RecipesCopyWith(Recipes value, $Res Function(Recipes) then) =
_$RecipesCopyWithImpl<$Res, Recipes>;
@useResult @useResult
$Res call( $Res call(
{int id, {int id,
String image, String image,
String state, String state,
@JsonKey(name: "cooking_time") int cookingTime, @JsonKey(name: 'cooking_time') int cookingTime,
List<Ingredient> ingredients, List<Ingredient> ingredients,
String description, String description,
List<Step> steps, List<Step> steps,
@JsonKey(name: "video_url") String videoUrl, @JsonKey(name: 'video_url') String videoUrl,
@JsonKey(name: "created_at") DateTime createdAt, @JsonKey(name: 'created_at') DateTime createdAt,
@JsonKey(name: "updated_at") DateTime updatedAt, @JsonKey(name: 'updated_at') DateTime updatedAt,
String title, String title,
String type, String type,
String slug, String slug,
@JsonKey(name: "comments_count") int commentsCount}); @JsonKey(name: 'total_comments') int commentsCount,
@JsonKey(name: 'total_likes') int likesCount,
@JsonKey(name: 'total_views') int viewsCount});
} }
/// @nodoc /// @nodoc
class _$RecipesCopyWithImpl<$Res, $Val extends Recipes> implements $RecipesCopyWith<$Res> { class _$RecipesCopyWithImpl<$Res, $Val extends Recipes>
implements $RecipesCopyWith<$Res> {
_$RecipesCopyWithImpl(this._value, this._then); _$RecipesCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -108,6 +100,8 @@ class _$RecipesCopyWithImpl<$Res, $Val extends Recipes> implements $RecipesCopyW
Object? type = null, Object? type = null,
Object? slug = null, Object? slug = null,
Object? commentsCount = null, Object? commentsCount = null,
Object? likesCount = null,
Object? viewsCount = null,
}) { }) {
return _then(_value.copyWith( return _then(_value.copyWith(
id: null == id id: null == id
@@ -166,36 +160,51 @@ class _$RecipesCopyWithImpl<$Res, $Val extends Recipes> implements $RecipesCopyW
? _value.commentsCount ? _value.commentsCount
: commentsCount // ignore: cast_nullable_to_non_nullable : commentsCount // ignore: cast_nullable_to_non_nullable
as int, as int,
likesCount: null == likesCount
? _value.likesCount
: likesCount // ignore: cast_nullable_to_non_nullable
as int,
viewsCount: null == viewsCount
? _value.viewsCount
: viewsCount // ignore: cast_nullable_to_non_nullable
as int,
) as $Val); ) as $Val);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$RecipesImplCopyWith<$Res> implements $RecipesCopyWith<$Res> { abstract class _$$RecipesImplCopyWith<$Res> implements $RecipesCopyWith<$Res> {
factory _$$RecipesImplCopyWith(_$RecipesImpl value, $Res Function(_$RecipesImpl) then) = __$$RecipesImplCopyWithImpl<$Res>; factory _$$RecipesImplCopyWith(
_$RecipesImpl value, $Res Function(_$RecipesImpl) then) =
__$$RecipesImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call( $Res call(
{int id, {int id,
String image, String image,
String state, String state,
@JsonKey(name: "cooking_time") int cookingTime, @JsonKey(name: 'cooking_time') int cookingTime,
List<Ingredient> ingredients, List<Ingredient> ingredients,
String description, String description,
List<Step> steps, List<Step> steps,
@JsonKey(name: "video_url") String videoUrl, @JsonKey(name: 'video_url') String videoUrl,
@JsonKey(name: "created_at") DateTime createdAt, @JsonKey(name: 'created_at') DateTime createdAt,
@JsonKey(name: "updated_at") DateTime updatedAt, @JsonKey(name: 'updated_at') DateTime updatedAt,
String title, String title,
String type, String type,
String slug, String slug,
@JsonKey(name: "comments_count") int commentsCount}); @JsonKey(name: 'total_comments') int commentsCount,
@JsonKey(name: 'total_likes') int likesCount,
@JsonKey(name: 'total_views') int viewsCount});
} }
/// @nodoc /// @nodoc
class __$$RecipesImplCopyWithImpl<$Res> extends _$RecipesCopyWithImpl<$Res, _$RecipesImpl> implements _$$RecipesImplCopyWith<$Res> { class __$$RecipesImplCopyWithImpl<$Res>
__$$RecipesImplCopyWithImpl(_$RecipesImpl _value, $Res Function(_$RecipesImpl) _then) : super(_value, _then); extends _$RecipesCopyWithImpl<$Res, _$RecipesImpl>
implements _$$RecipesImplCopyWith<$Res> {
__$$RecipesImplCopyWithImpl(
_$RecipesImpl _value, $Res Function(_$RecipesImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -214,6 +223,8 @@ class __$$RecipesImplCopyWithImpl<$Res> extends _$RecipesCopyWithImpl<$Res, _$Re
Object? type = null, Object? type = null,
Object? slug = null, Object? slug = null,
Object? commentsCount = null, Object? commentsCount = null,
Object? likesCount = null,
Object? viewsCount = null,
}) { }) {
return _then(_$RecipesImpl( return _then(_$RecipesImpl(
id: null == id id: null == id
@@ -272,6 +283,14 @@ class __$$RecipesImplCopyWithImpl<$Res> extends _$RecipesCopyWithImpl<$Res, _$Re
? _value.commentsCount ? _value.commentsCount
: commentsCount // ignore: cast_nullable_to_non_nullable : commentsCount // ignore: cast_nullable_to_non_nullable
as int, as int,
likesCount: null == likesCount
? _value.likesCount
: likesCount // ignore: cast_nullable_to_non_nullable
as int,
viewsCount: null == viewsCount
? _value.viewsCount
: viewsCount // ignore: cast_nullable_to_non_nullable
as int,
)); ));
} }
} }
@@ -283,21 +302,24 @@ class _$RecipesImpl implements _Recipes {
{required this.id, {required this.id,
required this.image, required this.image,
required this.state, required this.state,
@JsonKey(name: "cooking_time") required this.cookingTime, @JsonKey(name: 'cooking_time') required this.cookingTime,
required final List<Ingredient> ingredients, required final List<Ingredient> ingredients,
required this.description, required this.description,
required final List<Step> steps, required final List<Step> steps,
@JsonKey(name: "video_url") required this.videoUrl, @JsonKey(name: 'video_url') required this.videoUrl,
@JsonKey(name: "created_at") required this.createdAt, @JsonKey(name: 'created_at') required this.createdAt,
@JsonKey(name: "updated_at") required this.updatedAt, @JsonKey(name: 'updated_at') required this.updatedAt,
required this.title, required this.title,
required this.type, required this.type,
required this.slug, required this.slug,
@JsonKey(name: "comments_count") required this.commentsCount}) @JsonKey(name: 'total_comments') required this.commentsCount,
@JsonKey(name: 'total_likes') required this.likesCount,
@JsonKey(name: 'total_views') required this.viewsCount})
: _ingredients = ingredients, : _ingredients = ingredients,
_steps = steps; _steps = steps;
factory _$RecipesImpl.fromJson(Map<String, dynamic> json) => _$$RecipesImplFromJson(json); factory _$RecipesImpl.fromJson(Map<String, dynamic> json) =>
_$$RecipesImplFromJson(json);
@override @override
final int id; final int id;
@@ -306,10 +328,9 @@ class _$RecipesImpl implements _Recipes {
@override @override
final String state; final String state;
@override @override
@JsonKey(name: "cooking_time") @JsonKey(name: 'cooking_time')
final int cookingTime; final int cookingTime;
final List<Ingredient> _ingredients; final List<Ingredient> _ingredients;
@override @override
List<Ingredient> get ingredients { List<Ingredient> get ingredients {
if (_ingredients is EqualUnmodifiableListView) return _ingredients; if (_ingredients is EqualUnmodifiableListView) return _ingredients;
@@ -320,7 +341,6 @@ class _$RecipesImpl implements _Recipes {
@override @override
final String description; final String description;
final List<Step> _steps; final List<Step> _steps;
@override @override
List<Step> get steps { List<Step> get steps {
if (_steps is EqualUnmodifiableListView) return _steps; if (_steps is EqualUnmodifiableListView) return _steps;
@@ -329,13 +349,13 @@ class _$RecipesImpl implements _Recipes {
} }
@override @override
@JsonKey(name: "video_url") @JsonKey(name: 'video_url')
final String videoUrl; final String videoUrl;
@override @override
@JsonKey(name: "created_at") @JsonKey(name: 'created_at')
final DateTime createdAt; final DateTime createdAt;
@override @override
@JsonKey(name: "updated_at") @JsonKey(name: 'updated_at')
final DateTime updatedAt; final DateTime updatedAt;
@override @override
final String title; final String title;
@@ -344,12 +364,18 @@ class _$RecipesImpl implements _Recipes {
@override @override
final String slug; final String slug;
@override @override
@JsonKey(name: "comments_count") @JsonKey(name: 'total_comments')
final int commentsCount; final int commentsCount;
@override
@JsonKey(name: 'total_likes')
final int likesCount;
@override
@JsonKey(name: 'total_views')
final int viewsCount;
@override @override
String toString() { String toString() {
return 'Recipes(id: $id, image: $image, state: $state, cookingTime: $cookingTime, ingredients: $ingredients, description: $description, steps: $steps, videoUrl: $videoUrl, createdAt: $createdAt, updatedAt: $updatedAt, title: $title, type: $type, slug: $slug, commentsCount: $commentsCount)'; return 'Recipes(id: $id, image: $image, state: $state, cookingTime: $cookingTime, ingredients: $ingredients, description: $description, steps: $steps, videoUrl: $videoUrl, createdAt: $createdAt, updatedAt: $updatedAt, title: $title, type: $type, slug: $slug, commentsCount: $commentsCount, likesCount: $likesCount, viewsCount: $viewsCount)';
} }
@override @override
@@ -360,28 +386,56 @@ class _$RecipesImpl implements _Recipes {
(identical(other.id, id) || other.id == id) && (identical(other.id, id) || other.id == id) &&
(identical(other.image, image) || other.image == image) && (identical(other.image, image) || other.image == image) &&
(identical(other.state, state) || other.state == state) && (identical(other.state, state) || other.state == state) &&
(identical(other.cookingTime, cookingTime) || other.cookingTime == cookingTime) && (identical(other.cookingTime, cookingTime) ||
const DeepCollectionEquality().equals(other._ingredients, _ingredients) && other.cookingTime == cookingTime) &&
(identical(other.description, description) || other.description == description) && const DeepCollectionEquality()
.equals(other._ingredients, _ingredients) &&
(identical(other.description, description) ||
other.description == description) &&
const DeepCollectionEquality().equals(other._steps, _steps) && const DeepCollectionEquality().equals(other._steps, _steps) &&
(identical(other.videoUrl, videoUrl) || other.videoUrl == videoUrl) && (identical(other.videoUrl, videoUrl) ||
(identical(other.createdAt, createdAt) || other.createdAt == createdAt) && other.videoUrl == videoUrl) &&
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) && (identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.title, title) || other.title == title) && (identical(other.title, title) || other.title == title) &&
(identical(other.type, type) || other.type == type) && (identical(other.type, type) || other.type == type) &&
(identical(other.slug, slug) || other.slug == slug) && (identical(other.slug, slug) || other.slug == slug) &&
(identical(other.commentsCount, commentsCount) || other.commentsCount == commentsCount)); (identical(other.commentsCount, commentsCount) ||
other.commentsCount == commentsCount) &&
(identical(other.likesCount, likesCount) ||
other.likesCount == likesCount) &&
(identical(other.viewsCount, viewsCount) ||
other.viewsCount == viewsCount));
} }
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
int get hashCode => Object.hash(runtimeType, id, image, state, cookingTime, const DeepCollectionEquality().hash(_ingredients), description, int get hashCode => Object.hash(
const DeepCollectionEquality().hash(_steps), videoUrl, createdAt, updatedAt, title, type, slug, commentsCount); runtimeType,
id,
image,
state,
cookingTime,
const DeepCollectionEquality().hash(_ingredients),
description,
const DeepCollectionEquality().hash(_steps),
videoUrl,
createdAt,
updatedAt,
title,
type,
slug,
commentsCount,
likesCount,
viewsCount);
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith => __$$RecipesImplCopyWithImpl<_$RecipesImpl>(this, _$identity); _$$RecipesImplCopyWith<_$RecipesImpl> get copyWith =>
__$$RecipesImplCopyWithImpl<_$RecipesImpl>(this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -393,73 +447,69 @@ class _$RecipesImpl implements _Recipes {
abstract class _Recipes implements Recipes { abstract class _Recipes implements Recipes {
const factory _Recipes( const factory _Recipes(
{required final int id, {required final int id,
required final String image, required final String image,
required final String state, required final String state,
@JsonKey(name: "cooking_time") required final int cookingTime, @JsonKey(name: 'cooking_time') required final int cookingTime,
required final List<Ingredient> ingredients, required final List<Ingredient> ingredients,
required final String description, required final String description,
required final List<Step> steps, required final List<Step> steps,
@JsonKey(name: "video_url") required final String videoUrl, @JsonKey(name: 'video_url') required final String videoUrl,
@JsonKey(name: "created_at") required final DateTime createdAt, @JsonKey(name: 'created_at') required final DateTime createdAt,
@JsonKey(name: "updated_at") required final DateTime updatedAt, @JsonKey(name: 'updated_at') required final DateTime updatedAt,
required final String title, required final String title,
required final String type, required final String type,
required final String slug, required final String slug,
@JsonKey(name: "comments_count") required final int commentsCount}) = _$RecipesImpl; @JsonKey(name: 'total_comments') required final int commentsCount,
@JsonKey(name: 'total_likes') required final int likesCount,
@JsonKey(name: 'total_views') required final int viewsCount}) =
_$RecipesImpl;
factory _Recipes.fromJson(Map<String, dynamic> json) = _$RecipesImpl.fromJson; factory _Recipes.fromJson(Map<String, dynamic> json) = _$RecipesImpl.fromJson;
@override @override
int get id; int get id;
@override @override
String get image; String get image;
@override @override
String get state; String get state;
@override @override
@JsonKey(name: "cooking_time") @JsonKey(name: 'cooking_time')
int get cookingTime; int get cookingTime;
@override @override
List<Ingredient> get ingredients; List<Ingredient> get ingredients;
@override @override
String get description; String get description;
@override @override
List<Step> get steps; List<Step> get steps;
@override @override
@JsonKey(name: "video_url") @JsonKey(name: 'video_url')
String get videoUrl; String get videoUrl;
@override @override
@JsonKey(name: "created_at") @JsonKey(name: 'created_at')
DateTime get createdAt; DateTime get createdAt;
@override @override
@JsonKey(name: "updated_at") @JsonKey(name: 'updated_at')
DateTime get updatedAt; DateTime get updatedAt;
@override @override
String get title; String get title;
@override @override
String get type; String get type;
@override @override
String get slug; String get slug;
@override @override
@JsonKey(name: "comments_count") @JsonKey(name: 'total_comments')
int get commentsCount; int get commentsCount;
@override
@JsonKey(name: 'total_likes')
int get likesCount;
@override
@JsonKey(name: 'total_views')
int get viewsCount;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith => throw _privateConstructorUsedError; _$$RecipesImplCopyWith<_$RecipesImpl> get copyWith =>
throw _privateConstructorUsedError;
} }
Ingredient _$IngredientFromJson(Map<String, dynamic> json) { Ingredient _$IngredientFromJson(Map<String, dynamic> json) {
@@ -469,32 +519,31 @@ Ingredient _$IngredientFromJson(Map<String, dynamic> json) {
/// @nodoc /// @nodoc
mixin _$Ingredient { mixin _$Ingredient {
String get name => throw _privateConstructorUsedError; String get name => throw _privateConstructorUsedError;
String? get unit => throw _privateConstructorUsedError; String? get unit => throw _privateConstructorUsedError;
String get portion => throw _privateConstructorUsedError; String get portion => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$IngredientCopyWith<Ingredient> get copyWith => throw _privateConstructorUsedError; $IngredientCopyWith<Ingredient> get copyWith =>
throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class $IngredientCopyWith<$Res> { abstract class $IngredientCopyWith<$Res> {
factory $IngredientCopyWith(Ingredient value, $Res Function(Ingredient) then) = _$IngredientCopyWithImpl<$Res, Ingredient>; factory $IngredientCopyWith(
Ingredient value, $Res Function(Ingredient) then) =
_$IngredientCopyWithImpl<$Res, Ingredient>;
@useResult @useResult
$Res call({String name, String? unit, String portion}); $Res call({String name, String? unit, String portion});
} }
/// @nodoc /// @nodoc
class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient> implements $IngredientCopyWith<$Res> { class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient>
implements $IngredientCopyWith<$Res> {
_$IngredientCopyWithImpl(this._value, this._then); _$IngredientCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -523,17 +572,23 @@ class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient> implements $Ingred
} }
/// @nodoc /// @nodoc
abstract class _$$IngredientImplCopyWith<$Res> implements $IngredientCopyWith<$Res> { abstract class _$$IngredientImplCopyWith<$Res>
factory _$$IngredientImplCopyWith(_$IngredientImpl value, $Res Function(_$IngredientImpl) then) = __$$IngredientImplCopyWithImpl<$Res>; implements $IngredientCopyWith<$Res> {
factory _$$IngredientImplCopyWith(
_$IngredientImpl value, $Res Function(_$IngredientImpl) then) =
__$$IngredientImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call({String name, String? unit, String portion}); $Res call({String name, String? unit, String portion});
} }
/// @nodoc /// @nodoc
class __$$IngredientImplCopyWithImpl<$Res> extends _$IngredientCopyWithImpl<$Res, _$IngredientImpl> implements _$$IngredientImplCopyWith<$Res> { class __$$IngredientImplCopyWithImpl<$Res>
__$$IngredientImplCopyWithImpl(_$IngredientImpl _value, $Res Function(_$IngredientImpl) _then) : super(_value, _then); extends _$IngredientCopyWithImpl<$Res, _$IngredientImpl>
implements _$$IngredientImplCopyWith<$Res> {
__$$IngredientImplCopyWithImpl(
_$IngredientImpl _value, $Res Function(_$IngredientImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -562,9 +617,11 @@ class __$$IngredientImplCopyWithImpl<$Res> extends _$IngredientCopyWithImpl<$Res
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$IngredientImpl implements _Ingredient { class _$IngredientImpl implements _Ingredient {
const _$IngredientImpl({required this.name, this.unit, required this.portion}); const _$IngredientImpl(
{required this.name, this.unit, required this.portion});
factory _$IngredientImpl.fromJson(Map<String, dynamic> json) => _$$IngredientImplFromJson(json); factory _$IngredientImpl.fromJson(Map<String, dynamic> json) =>
_$$IngredientImplFromJson(json);
@override @override
final String name; final String name;
@@ -595,7 +652,8 @@ class _$IngredientImpl implements _Ingredient {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith => __$$IngredientImplCopyWithImpl<_$IngredientImpl>(this, _$identity); _$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
__$$IngredientImplCopyWithImpl<_$IngredientImpl>(this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -606,22 +664,24 @@ class _$IngredientImpl implements _Ingredient {
} }
abstract class _Ingredient implements Ingredient { abstract class _Ingredient implements Ingredient {
const factory _Ingredient({required final String name, final String? unit, required final String portion}) = _$IngredientImpl; const factory _Ingredient(
{required final String name,
final String? unit,
required final String portion}) = _$IngredientImpl;
factory _Ingredient.fromJson(Map<String, dynamic> json) = _$IngredientImpl.fromJson; factory _Ingredient.fromJson(Map<String, dynamic> json) =
_$IngredientImpl.fromJson;
@override @override
String get name; String get name;
@override @override
String? get unit; String? get unit;
@override @override
String get portion; String get portion;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith => throw _privateConstructorUsedError; _$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
throw _privateConstructorUsedError;
} }
Step _$StepFromJson(Map<String, dynamic> json) { Step _$StepFromJson(Map<String, dynamic> json) {
@@ -631,30 +691,28 @@ Step _$StepFromJson(Map<String, dynamic> json) {
/// @nodoc /// @nodoc
mixin _$Step { mixin _$Step {
String get image => throw _privateConstructorUsedError; String get image => throw _privateConstructorUsedError;
String get description => throw _privateConstructorUsedError; String get description => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$StepCopyWith<Step> get copyWith => throw _privateConstructorUsedError; $StepCopyWith<Step> get copyWith => throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class $StepCopyWith<$Res> { abstract class $StepCopyWith<$Res> {
factory $StepCopyWith(Step value, $Res Function(Step) then) = _$StepCopyWithImpl<$Res, Step>; factory $StepCopyWith(Step value, $Res Function(Step) then) =
_$StepCopyWithImpl<$Res, Step>;
@useResult @useResult
$Res call({String image, String description}); $Res call({String image, String description});
} }
/// @nodoc /// @nodoc
class _$StepCopyWithImpl<$Res, $Val extends Step> implements $StepCopyWith<$Res> { class _$StepCopyWithImpl<$Res, $Val extends Step>
implements $StepCopyWith<$Res> {
_$StepCopyWithImpl(this._value, this._then); _$StepCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -679,16 +737,20 @@ class _$StepCopyWithImpl<$Res, $Val extends Step> implements $StepCopyWith<$Res>
/// @nodoc /// @nodoc
abstract class _$$StepImplCopyWith<$Res> implements $StepCopyWith<$Res> { abstract class _$$StepImplCopyWith<$Res> implements $StepCopyWith<$Res> {
factory _$$StepImplCopyWith(_$StepImpl value, $Res Function(_$StepImpl) then) = __$$StepImplCopyWithImpl<$Res>; factory _$$StepImplCopyWith(
_$StepImpl value, $Res Function(_$StepImpl) then) =
__$$StepImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call({String image, String description}); $Res call({String image, String description});
} }
/// @nodoc /// @nodoc
class __$$StepImplCopyWithImpl<$Res> extends _$StepCopyWithImpl<$Res, _$StepImpl> implements _$$StepImplCopyWith<$Res> { class __$$StepImplCopyWithImpl<$Res>
__$$StepImplCopyWithImpl(_$StepImpl _value, $Res Function(_$StepImpl) _then) : super(_value, _then); extends _$StepCopyWithImpl<$Res, _$StepImpl>
implements _$$StepImplCopyWith<$Res> {
__$$StepImplCopyWithImpl(_$StepImpl _value, $Res Function(_$StepImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -714,7 +776,8 @@ class __$$StepImplCopyWithImpl<$Res> extends _$StepCopyWithImpl<$Res, _$StepImpl
class _$StepImpl implements _Step { class _$StepImpl implements _Step {
const _$StepImpl({required this.image, required this.description}); const _$StepImpl({required this.image, required this.description});
factory _$StepImpl.fromJson(Map<String, dynamic> json) => _$$StepImplFromJson(json); factory _$StepImpl.fromJson(Map<String, dynamic> json) =>
_$$StepImplFromJson(json);
@override @override
final String image; final String image;
@@ -732,7 +795,8 @@ class _$StepImpl implements _Step {
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$StepImpl && other is _$StepImpl &&
(identical(other.image, image) || other.image == image) && (identical(other.image, image) || other.image == image) &&
(identical(other.description, description) || other.description == description)); (identical(other.description, description) ||
other.description == description));
} }
@JsonKey(ignore: true) @JsonKey(ignore: true)
@@ -742,7 +806,8 @@ class _$StepImpl implements _Step {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$StepImplCopyWith<_$StepImpl> get copyWith => __$$StepImplCopyWithImpl<_$StepImpl>(this, _$identity); _$$StepImplCopyWith<_$StepImpl> get copyWith =>
__$$StepImplCopyWithImpl<_$StepImpl>(this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -753,17 +818,18 @@ class _$StepImpl implements _Step {
} }
abstract class _Step implements Step { abstract class _Step implements Step {
const factory _Step({required final String image, required final String description}) = _$StepImpl; const factory _Step(
{required final String image,
required final String description}) = _$StepImpl;
factory _Step.fromJson(Map<String, dynamic> json) = _$StepImpl.fromJson; factory _Step.fromJson(Map<String, dynamic> json) = _$StepImpl.fromJson;
@override @override
String get image; String get image;
@override @override
String get description; String get description;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$StepImplCopyWith<_$StepImpl> get copyWith => throw _privateConstructorUsedError; _$$StepImplCopyWith<_$StepImpl> get copyWith =>
throw _privateConstructorUsedError;
} }

View File

@@ -6,24 +6,32 @@ part of 'recipes_model.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$RecipesImpl _$$RecipesImplFromJson(Map<String, dynamic> json) => _$RecipesImpl( _$RecipesImpl _$$RecipesImplFromJson(Map<String, dynamic> json) =>
_$RecipesImpl(
id: (json['id'] as num).toInt(), id: (json['id'] as num).toInt(),
image: json['image'] as String, image: json['image'] as String,
state: json['state'] as String, state: json['state'] as String,
cookingTime: (json['cooking_time'] as num).toInt(), cookingTime: (json['cooking_time'] as num).toInt(),
ingredients: (json['ingredients'] as List<dynamic>).map((e) => Ingredient.fromJson(e as Map<String, dynamic>)).toList(), ingredients: (json['ingredients'] as List<dynamic>)
.map((e) => Ingredient.fromJson(e as Map<String, dynamic>))
.toList(),
description: json['description'] as String, description: json['description'] as String,
steps: (json['steps'] as List<dynamic>).map((e) => Step.fromJson(e as Map<String, dynamic>)).toList(), steps: (json['steps'] as List<dynamic>)
.map((e) => Step.fromJson(e as Map<String, dynamic>))
.toList(),
videoUrl: json['video_url'] as String, videoUrl: json['video_url'] as String,
createdAt: DateTime.parse(json['created_at'] as String), createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String),
title: json['title'] as String, title: json['title'] as String,
type: json['type'] as String, type: json['type'] as String,
slug: json['slug'] as String, slug: json['slug'] as String,
commentsCount: (json['comments_count'] as num).toInt(), commentsCount: (json['total_comments'] as num).toInt(),
likesCount: (json['total_likes'] as num).toInt(),
viewsCount: (json['total_views'] as num).toInt(),
); );
Map<String, dynamic> _$$RecipesImplToJson(_$RecipesImpl instance) => <String, dynamic>{ Map<String, dynamic> _$$RecipesImplToJson(_$RecipesImpl instance) =>
<String, dynamic>{
'id': instance.id, 'id': instance.id,
'image': instance.image, 'image': instance.image,
'state': instance.state, 'state': instance.state,
@@ -37,16 +45,20 @@ Map<String, dynamic> _$$RecipesImplToJson(_$RecipesImpl instance) => <String, dy
'title': instance.title, 'title': instance.title,
'type': instance.type, 'type': instance.type,
'slug': instance.slug, 'slug': instance.slug,
'comments_count': instance.commentsCount, 'total_comments': instance.commentsCount,
'total_likes': instance.likesCount,
'total_views': instance.viewsCount,
}; };
_$IngredientImpl _$$IngredientImplFromJson(Map<String, dynamic> json) => _$IngredientImpl( _$IngredientImpl _$$IngredientImplFromJson(Map<String, dynamic> json) =>
_$IngredientImpl(
name: json['name'] as String, name: json['name'] as String,
unit: json['unit'] as String?, unit: json['unit'] as String?,
portion: json['portion'] as String, portion: json['portion'] as String,
); );
Map<String, dynamic> _$$IngredientImplToJson(_$IngredientImpl instance) => <String, dynamic>{ Map<String, dynamic> _$$IngredientImplToJson(_$IngredientImpl instance) =>
<String, dynamic>{
'name': instance.name, 'name': instance.name,
'unit': instance.unit, 'unit': instance.unit,
'portion': instance.portion, 'portion': instance.portion,
@@ -57,7 +69,8 @@ _$StepImpl _$$StepImplFromJson(Map<String, dynamic> json) => _$StepImpl(
description: json['description'] as String, description: json['description'] as String,
); );
Map<String, dynamic> _$$StepImplToJson(_$StepImpl instance) => <String, dynamic>{ Map<String, dynamic> _$$StepImplToJson(_$StepImpl instance) =>
<String, dynamic>{
'image': instance.image, 'image': instance.image,
'description': instance.description, 'description': instance.description,
}; };

View File

@@ -8,17 +8,17 @@ part 'recipes_pagination_model.g.dart';
class RecipesPagination with _$RecipesPagination { class RecipesPagination with _$RecipesPagination {
const factory RecipesPagination({ const factory RecipesPagination({
@JsonKey(name: 'data') required List<Recipes> recipesList, @JsonKey(name: 'data') required List<Recipes> recipesList,
@JsonKey(name: "current_page") required int currentPage, // @JsonKey(name: "current_page") required int currentPage,
@JsonKey(name: "first_page_url") required String firstPageUrl, // @JsonKey(name: "first_page_url") required String firstPageUrl,
required int from, // required int from,
@JsonKey(name: "last_page") required int lastPage, // @JsonKey(name: "last_page") required int lastPage,
@JsonKey(name: "last_page_url") required String lastPageUrl, // @JsonKey(name: "last_page_url") required String lastPageUrl,
@JsonKey(name: "next_page_url") required String nextPageUrl, // @JsonKey(name: "next_page_url") required String nextPageUrl,
required String path, // required String path,
@JsonKey(name: "per_page") required int perPage, // @JsonKey(name: "per_page") required int perPage,
@JsonKey(name: "prev_page_url") required dynamic prevPageUrl, // @JsonKey(name: "prev_page_url") required dynamic prevPageUrl,
required int to, // required int to,
required int total, // required int total,
}) = _RecipesPagination; }) = _RecipesPagination;
factory RecipesPagination.fromJson(Map<String, Object?> json) => _$RecipesPaginationFromJson(json); factory RecipesPagination.fromJson(Map<String, Object?> json) => _$RecipesPaginationFromJson(json);

View File

@@ -23,68 +23,28 @@ mixin _$RecipesPagination {
@JsonKey(name: 'data') @JsonKey(name: 'data')
List<Recipes> get recipesList => throw _privateConstructorUsedError; List<Recipes> get recipesList => throw _privateConstructorUsedError;
@JsonKey(name: "current_page")
int get currentPage => throw _privateConstructorUsedError;
@JsonKey(name: "first_page_url")
String get firstPageUrl => throw _privateConstructorUsedError;
int get from => throw _privateConstructorUsedError;
@JsonKey(name: "last_page")
int get lastPage => throw _privateConstructorUsedError;
@JsonKey(name: "last_page_url")
String get lastPageUrl => throw _privateConstructorUsedError;
@JsonKey(name: "next_page_url")
String get nextPageUrl => throw _privateConstructorUsedError;
String get path => throw _privateConstructorUsedError;
@JsonKey(name: "per_page")
int get perPage => throw _privateConstructorUsedError;
@JsonKey(name: "prev_page_url")
dynamic get prevPageUrl => throw _privateConstructorUsedError;
int get to => throw _privateConstructorUsedError;
int get total => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$RecipesPaginationCopyWith<RecipesPagination> get copyWith => throw _privateConstructorUsedError; $RecipesPaginationCopyWith<RecipesPagination> get copyWith =>
throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class $RecipesPaginationCopyWith<$Res> { abstract class $RecipesPaginationCopyWith<$Res> {
factory $RecipesPaginationCopyWith(RecipesPagination value, $Res Function(RecipesPagination) then) = _$RecipesPaginationCopyWithImpl<$Res, RecipesPagination>; factory $RecipesPaginationCopyWith(
RecipesPagination value, $Res Function(RecipesPagination) then) =
_$RecipesPaginationCopyWithImpl<$Res, RecipesPagination>;
@useResult @useResult
$Res call( $Res call({@JsonKey(name: 'data') List<Recipes> recipesList});
{@JsonKey(name: 'data') List<Recipes> recipesList,
@JsonKey(name: "current_page") int currentPage,
@JsonKey(name: "first_page_url") String firstPageUrl,
int from,
@JsonKey(name: "last_page") int lastPage,
@JsonKey(name: "last_page_url") String lastPageUrl,
@JsonKey(name: "next_page_url") String nextPageUrl,
String path,
@JsonKey(name: "per_page") int perPage,
@JsonKey(name: "prev_page_url") dynamic prevPageUrl,
int to,
int total});
} }
/// @nodoc /// @nodoc
class _$RecipesPaginationCopyWithImpl<$Res, $Val extends RecipesPagination> implements $RecipesPaginationCopyWith<$Res> { class _$RecipesPaginationCopyWithImpl<$Res, $Val extends RecipesPagination>
implements $RecipesPaginationCopyWith<$Res> {
_$RecipesPaginationCopyWithImpl(this._value, this._then); _$RecipesPaginationCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -92,163 +52,45 @@ class _$RecipesPaginationCopyWithImpl<$Res, $Val extends RecipesPagination> impl
@override @override
$Res call({ $Res call({
Object? recipesList = null, Object? recipesList = null,
Object? currentPage = null,
Object? firstPageUrl = null,
Object? from = null,
Object? lastPage = null,
Object? lastPageUrl = null,
Object? nextPageUrl = null,
Object? path = null,
Object? perPage = null,
Object? prevPageUrl = freezed,
Object? to = null,
Object? total = null,
}) { }) {
return _then(_value.copyWith( return _then(_value.copyWith(
recipesList: null == recipesList recipesList: null == recipesList
? _value.recipesList ? _value.recipesList
: recipesList // ignore: cast_nullable_to_non_nullable : recipesList // ignore: cast_nullable_to_non_nullable
as List<Recipes>, as List<Recipes>,
currentPage: null == currentPage
? _value.currentPage
: currentPage // ignore: cast_nullable_to_non_nullable
as int,
firstPageUrl: null == firstPageUrl
? _value.firstPageUrl
: firstPageUrl // ignore: cast_nullable_to_non_nullable
as String,
from: null == from
? _value.from
: from // ignore: cast_nullable_to_non_nullable
as int,
lastPage: null == lastPage
? _value.lastPage
: lastPage // ignore: cast_nullable_to_non_nullable
as int,
lastPageUrl: null == lastPageUrl
? _value.lastPageUrl
: lastPageUrl // ignore: cast_nullable_to_non_nullable
as String,
nextPageUrl: null == nextPageUrl
? _value.nextPageUrl
: nextPageUrl // ignore: cast_nullable_to_non_nullable
as String,
path: null == path
? _value.path
: path // ignore: cast_nullable_to_non_nullable
as String,
perPage: null == perPage
? _value.perPage
: perPage // ignore: cast_nullable_to_non_nullable
as int,
prevPageUrl: freezed == prevPageUrl
? _value.prevPageUrl
: prevPageUrl // ignore: cast_nullable_to_non_nullable
as dynamic,
to: null == to
? _value.to
: to // ignore: cast_nullable_to_non_nullable
as int,
total: null == total
? _value.total
: total // ignore: cast_nullable_to_non_nullable
as int,
) as $Val); ) as $Val);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$RecipesPaginationImplCopyWith<$Res> implements $RecipesPaginationCopyWith<$Res> { abstract class _$$RecipesPaginationImplCopyWith<$Res>
factory _$$RecipesPaginationImplCopyWith(_$RecipesPaginationImpl value, $Res Function(_$RecipesPaginationImpl) then) = implements $RecipesPaginationCopyWith<$Res> {
factory _$$RecipesPaginationImplCopyWith(_$RecipesPaginationImpl value,
$Res Function(_$RecipesPaginationImpl) then) =
__$$RecipesPaginationImplCopyWithImpl<$Res>; __$$RecipesPaginationImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call( $Res call({@JsonKey(name: 'data') List<Recipes> recipesList});
{@JsonKey(name: 'data') List<Recipes> recipesList,
@JsonKey(name: "current_page") int currentPage,
@JsonKey(name: "first_page_url") String firstPageUrl,
int from,
@JsonKey(name: "last_page") int lastPage,
@JsonKey(name: "last_page_url") String lastPageUrl,
@JsonKey(name: "next_page_url") String nextPageUrl,
String path,
@JsonKey(name: "per_page") int perPage,
@JsonKey(name: "prev_page_url") dynamic prevPageUrl,
int to,
int total});
} }
/// @nodoc /// @nodoc
class __$$RecipesPaginationImplCopyWithImpl<$Res> extends _$RecipesPaginationCopyWithImpl<$Res, _$RecipesPaginationImpl> class __$$RecipesPaginationImplCopyWithImpl<$Res>
extends _$RecipesPaginationCopyWithImpl<$Res, _$RecipesPaginationImpl>
implements _$$RecipesPaginationImplCopyWith<$Res> { implements _$$RecipesPaginationImplCopyWith<$Res> {
__$$RecipesPaginationImplCopyWithImpl(_$RecipesPaginationImpl _value, $Res Function(_$RecipesPaginationImpl) _then) : super(_value, _then); __$$RecipesPaginationImplCopyWithImpl(_$RecipesPaginationImpl _value,
$Res Function(_$RecipesPaginationImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
Object? recipesList = null, Object? recipesList = null,
Object? currentPage = null,
Object? firstPageUrl = null,
Object? from = null,
Object? lastPage = null,
Object? lastPageUrl = null,
Object? nextPageUrl = null,
Object? path = null,
Object? perPage = null,
Object? prevPageUrl = freezed,
Object? to = null,
Object? total = null,
}) { }) {
return _then(_$RecipesPaginationImpl( return _then(_$RecipesPaginationImpl(
recipesList: null == recipesList recipesList: null == recipesList
? _value._recipesList ? _value._recipesList
: recipesList // ignore: cast_nullable_to_non_nullable : recipesList // ignore: cast_nullable_to_non_nullable
as List<Recipes>, as List<Recipes>,
currentPage: null == currentPage
? _value.currentPage
: currentPage // ignore: cast_nullable_to_non_nullable
as int,
firstPageUrl: null == firstPageUrl
? _value.firstPageUrl
: firstPageUrl // ignore: cast_nullable_to_non_nullable
as String,
from: null == from
? _value.from
: from // ignore: cast_nullable_to_non_nullable
as int,
lastPage: null == lastPage
? _value.lastPage
: lastPage // ignore: cast_nullable_to_non_nullable
as int,
lastPageUrl: null == lastPageUrl
? _value.lastPageUrl
: lastPageUrl // ignore: cast_nullable_to_non_nullable
as String,
nextPageUrl: null == nextPageUrl
? _value.nextPageUrl
: nextPageUrl // ignore: cast_nullable_to_non_nullable
as String,
path: null == path
? _value.path
: path // ignore: cast_nullable_to_non_nullable
as String,
perPage: null == perPage
? _value.perPage
: perPage // ignore: cast_nullable_to_non_nullable
as int,
prevPageUrl: freezed == prevPageUrl
? _value.prevPageUrl
: prevPageUrl // ignore: cast_nullable_to_non_nullable
as dynamic,
to: null == to
? _value.to
: to // ignore: cast_nullable_to_non_nullable
as int,
total: null == total
? _value.total
: total // ignore: cast_nullable_to_non_nullable
as int,
)); ));
} }
} }
@@ -257,24 +99,13 @@ class __$$RecipesPaginationImplCopyWithImpl<$Res> extends _$RecipesPaginationCop
@JsonSerializable() @JsonSerializable()
class _$RecipesPaginationImpl implements _RecipesPagination { class _$RecipesPaginationImpl implements _RecipesPagination {
const _$RecipesPaginationImpl( const _$RecipesPaginationImpl(
{@JsonKey(name: 'data') required final List<Recipes> recipesList, {@JsonKey(name: 'data') required final List<Recipes> recipesList})
@JsonKey(name: "current_page") required this.currentPage,
@JsonKey(name: "first_page_url") required this.firstPageUrl,
required this.from,
@JsonKey(name: "last_page") required this.lastPage,
@JsonKey(name: "last_page_url") required this.lastPageUrl,
@JsonKey(name: "next_page_url") required this.nextPageUrl,
required this.path,
@JsonKey(name: "per_page") required this.perPage,
@JsonKey(name: "prev_page_url") required this.prevPageUrl,
required this.to,
required this.total})
: _recipesList = recipesList; : _recipesList = recipesList;
factory _$RecipesPaginationImpl.fromJson(Map<String, dynamic> json) => _$$RecipesPaginationImplFromJson(json); factory _$RecipesPaginationImpl.fromJson(Map<String, dynamic> json) =>
_$$RecipesPaginationImplFromJson(json);
final List<Recipes> _recipesList; final List<Recipes> _recipesList;
@override @override
@JsonKey(name: 'data') @JsonKey(name: 'data')
List<Recipes> get recipesList { List<Recipes> get recipesList {
@@ -283,39 +114,9 @@ class _$RecipesPaginationImpl implements _RecipesPagination {
return EqualUnmodifiableListView(_recipesList); return EqualUnmodifiableListView(_recipesList);
} }
@override
@JsonKey(name: "current_page")
final int currentPage;
@override
@JsonKey(name: "first_page_url")
final String firstPageUrl;
@override
final int from;
@override
@JsonKey(name: "last_page")
final int lastPage;
@override
@JsonKey(name: "last_page_url")
final String lastPageUrl;
@override
@JsonKey(name: "next_page_url")
final String nextPageUrl;
@override
final String path;
@override
@JsonKey(name: "per_page")
final int perPage;
@override
@JsonKey(name: "prev_page_url")
final dynamic prevPageUrl;
@override
final int to;
@override
final int total;
@override @override
String toString() { String toString() {
return 'RecipesPagination(recipesList: $recipesList, currentPage: $currentPage, firstPageUrl: $firstPageUrl, from: $from, lastPage: $lastPage, lastPageUrl: $lastPageUrl, nextPageUrl: $nextPageUrl, path: $path, perPage: $perPage, prevPageUrl: $prevPageUrl, to: $to, total: $total)'; return 'RecipesPagination(recipesList: $recipesList)';
} }
@override @override
@@ -323,29 +124,21 @@ class _$RecipesPaginationImpl implements _RecipesPagination {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$RecipesPaginationImpl && other is _$RecipesPaginationImpl &&
const DeepCollectionEquality().equals(other._recipesList, _recipesList) && const DeepCollectionEquality()
(identical(other.currentPage, currentPage) || other.currentPage == currentPage) && .equals(other._recipesList, _recipesList));
(identical(other.firstPageUrl, firstPageUrl) || other.firstPageUrl == firstPageUrl) &&
(identical(other.from, from) || other.from == from) &&
(identical(other.lastPage, lastPage) || other.lastPage == lastPage) &&
(identical(other.lastPageUrl, lastPageUrl) || other.lastPageUrl == lastPageUrl) &&
(identical(other.nextPageUrl, nextPageUrl) || other.nextPageUrl == nextPageUrl) &&
(identical(other.path, path) || other.path == path) &&
(identical(other.perPage, perPage) || other.perPage == perPage) &&
const DeepCollectionEquality().equals(other.prevPageUrl, prevPageUrl) &&
(identical(other.to, to) || other.to == to) &&
(identical(other.total, total) || other.total == total));
} }
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_recipesList), currentPage, firstPageUrl, from, lastPage, lastPageUrl, int get hashCode => Object.hash(
nextPageUrl, path, perPage, const DeepCollectionEquality().hash(prevPageUrl), to, total); runtimeType, const DeepCollectionEquality().hash(_recipesList));
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith => __$$RecipesPaginationImplCopyWithImpl<_$RecipesPaginationImpl>(this, _$identity); _$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith =>
__$$RecipesPaginationImplCopyWithImpl<_$RecipesPaginationImpl>(
this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -357,66 +150,17 @@ class _$RecipesPaginationImpl implements _RecipesPagination {
abstract class _RecipesPagination implements RecipesPagination { abstract class _RecipesPagination implements RecipesPagination {
const factory _RecipesPagination( const factory _RecipesPagination(
{@JsonKey(name: 'data') required final List<Recipes> recipesList, {@JsonKey(name: 'data') required final List<Recipes> recipesList}) =
@JsonKey(name: "current_page") required final int currentPage, _$RecipesPaginationImpl;
@JsonKey(name: "first_page_url") required final String firstPageUrl,
required final int from,
@JsonKey(name: "last_page") required final int lastPage,
@JsonKey(name: "last_page_url") required final String lastPageUrl,
@JsonKey(name: "next_page_url") required final String nextPageUrl,
required final String path,
@JsonKey(name: "per_page") required final int perPage,
@JsonKey(name: "prev_page_url") required final dynamic prevPageUrl,
required final int to,
required final int total}) = _$RecipesPaginationImpl;
factory _RecipesPagination.fromJson(Map<String, dynamic> json) = _$RecipesPaginationImpl.fromJson; factory _RecipesPagination.fromJson(Map<String, dynamic> json) =
_$RecipesPaginationImpl.fromJson;
@override @override
@JsonKey(name: 'data') @JsonKey(name: 'data')
List<Recipes> get recipesList; List<Recipes> get recipesList;
@override
@JsonKey(name: "current_page")
int get currentPage;
@override
@JsonKey(name: "first_page_url")
String get firstPageUrl;
@override
int get from;
@override
@JsonKey(name: "last_page")
int get lastPage;
@override
@JsonKey(name: "last_page_url")
String get lastPageUrl;
@override
@JsonKey(name: "next_page_url")
String get nextPageUrl;
@override
String get path;
@override
@JsonKey(name: "per_page")
int get perPage;
@override
@JsonKey(name: "prev_page_url")
dynamic get prevPageUrl;
@override
int get to;
@override
int get total;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith => throw _privateConstructorUsedError; _$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith =>
throw _privateConstructorUsedError;
} }

View File

@@ -6,32 +6,16 @@ part of 'recipes_pagination_model.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$RecipesPaginationImpl _$$RecipesPaginationImplFromJson(Map<String, dynamic> json) => _$RecipesPaginationImpl( _$RecipesPaginationImpl _$$RecipesPaginationImplFromJson(
recipesList: (json['data'] as List<dynamic>).map((e) => Recipes.fromJson(e as Map<String, dynamic>)).toList(), Map<String, dynamic> json) =>
currentPage: (json['current_page'] as num).toInt(), _$RecipesPaginationImpl(
firstPageUrl: json['first_page_url'] as String, recipesList: (json['data'] as List<dynamic>)
from: (json['from'] as num).toInt(), .map((e) => Recipes.fromJson(e as Map<String, dynamic>))
lastPage: (json['last_page'] as num).toInt(), .toList(),
lastPageUrl: json['last_page_url'] as String,
nextPageUrl: json['next_page_url'] as String,
path: json['path'] as String,
perPage: (json['per_page'] as num).toInt(),
prevPageUrl: json['prev_page_url'],
to: (json['to'] as num).toInt(),
total: (json['total'] as num).toInt(),
); );
Map<String, dynamic> _$$RecipesPaginationImplToJson(_$RecipesPaginationImpl instance) => <String, dynamic>{ Map<String, dynamic> _$$RecipesPaginationImplToJson(
_$RecipesPaginationImpl instance) =>
<String, dynamic>{
'data': instance.recipesList, 'data': instance.recipesList,
'current_page': instance.currentPage,
'first_page_url': instance.firstPageUrl,
'from': instance.from,
'last_page': instance.lastPage,
'last_page_url': instance.lastPageUrl,
'next_page_url': instance.nextPageUrl,
'path': instance.path,
'per_page': instance.perPage,
'prev_page_url': instance.prevPageUrl,
'to': instance.to,
'total': instance.total,
}; };

View File

@@ -24,7 +24,6 @@ mixin _$FeedState {
required TResult Function(String errorMessage) error, required TResult Function(String errorMessage) error,
}) => }) =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
@optionalTypeArgs @optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>( TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, { TResult? Function()? $default, {
@@ -71,28 +70,35 @@ mixin _$FeedState {
/// @nodoc /// @nodoc
abstract class $FeedStateCopyWith<$Res> { abstract class $FeedStateCopyWith<$Res> {
factory $FeedStateCopyWith(FeedState value, $Res Function(FeedState) then) = _$FeedStateCopyWithImpl<$Res, FeedState>; factory $FeedStateCopyWith(FeedState value, $Res Function(FeedState) then) =
_$FeedStateCopyWithImpl<$Res, FeedState>;
} }
/// @nodoc /// @nodoc
class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState> implements $FeedStateCopyWith<$Res> { class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState>
implements $FeedStateCopyWith<$Res> {
_$FeedStateCopyWithImpl(this._value, this._then); _$FeedStateCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
} }
/// @nodoc /// @nodoc
abstract class _$$FeedStateImplCopyWith<$Res> { abstract class _$$FeedStateImplCopyWith<$Res> {
factory _$$FeedStateImplCopyWith(_$FeedStateImpl value, $Res Function(_$FeedStateImpl) then) = __$$FeedStateImplCopyWithImpl<$Res>; factory _$$FeedStateImplCopyWith(
_$FeedStateImpl value, $Res Function(_$FeedStateImpl) then) =
__$$FeedStateImplCopyWithImpl<$Res>;
} }
/// @nodoc /// @nodoc
class __$$FeedStateImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateImpl> implements _$$FeedStateImplCopyWith<$Res> { class __$$FeedStateImplCopyWithImpl<$Res>
__$$FeedStateImplCopyWithImpl(_$FeedStateImpl _value, $Res Function(_$FeedStateImpl) _then) : super(_value, _then); extends _$FeedStateCopyWithImpl<$Res, _$FeedStateImpl>
implements _$$FeedStateImplCopyWith<$Res> {
__$$FeedStateImplCopyWithImpl(
_$FeedStateImpl _value, $Res Function(_$FeedStateImpl) _then)
: super(_value, _then);
} }
/// @nodoc /// @nodoc
@@ -107,7 +113,8 @@ class _$FeedStateImpl implements _FeedState {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType && other is _$FeedStateImpl); return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$FeedStateImpl);
} }
@override @override
@@ -194,14 +201,18 @@ abstract class _FeedState implements FeedState {
/// @nodoc /// @nodoc
abstract class _$$FeedStateLoadingImplCopyWith<$Res> { abstract class _$$FeedStateLoadingImplCopyWith<$Res> {
factory _$$FeedStateLoadingImplCopyWith(_$FeedStateLoadingImpl value, $Res Function(_$FeedStateLoadingImpl) then) = factory _$$FeedStateLoadingImplCopyWith(_$FeedStateLoadingImpl value,
$Res Function(_$FeedStateLoadingImpl) then) =
__$$FeedStateLoadingImplCopyWithImpl<$Res>; __$$FeedStateLoadingImplCopyWithImpl<$Res>;
} }
/// @nodoc /// @nodoc
class __$$FeedStateLoadingImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadingImpl> class __$$FeedStateLoadingImplCopyWithImpl<$Res>
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadingImpl>
implements _$$FeedStateLoadingImplCopyWith<$Res> { implements _$$FeedStateLoadingImplCopyWith<$Res> {
__$$FeedStateLoadingImplCopyWithImpl(_$FeedStateLoadingImpl _value, $Res Function(_$FeedStateLoadingImpl) _then) : super(_value, _then); __$$FeedStateLoadingImplCopyWithImpl(_$FeedStateLoadingImpl _value,
$Res Function(_$FeedStateLoadingImpl) _then)
: super(_value, _then);
} }
/// @nodoc /// @nodoc
@@ -216,7 +227,8 @@ class _$FeedStateLoadingImpl implements FeedStateLoading {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType && other is _$FeedStateLoadingImpl); return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$FeedStateLoadingImpl);
} }
@override @override
@@ -303,15 +315,20 @@ abstract class FeedStateLoading implements FeedState {
/// @nodoc /// @nodoc
abstract class _$$FeedStateLoadedImplCopyWith<$Res> { abstract class _$$FeedStateLoadedImplCopyWith<$Res> {
factory _$$FeedStateLoadedImplCopyWith(_$FeedStateLoadedImpl value, $Res Function(_$FeedStateLoadedImpl) then) = __$$FeedStateLoadedImplCopyWithImpl<$Res>; factory _$$FeedStateLoadedImplCopyWith(_$FeedStateLoadedImpl value,
$Res Function(_$FeedStateLoadedImpl) then) =
__$$FeedStateLoadedImplCopyWithImpl<$Res>;
@useResult @useResult
$Res call({List<FeedBlogPostModel> feedBlogPostList}); $Res call({List<FeedBlogPostModel> feedBlogPostList});
} }
/// @nodoc /// @nodoc
class __$$FeedStateLoadedImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadedImpl> implements _$$FeedStateLoadedImplCopyWith<$Res> { class __$$FeedStateLoadedImplCopyWithImpl<$Res>
__$$FeedStateLoadedImplCopyWithImpl(_$FeedStateLoadedImpl _value, $Res Function(_$FeedStateLoadedImpl) _then) : super(_value, _then); extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadedImpl>
implements _$$FeedStateLoadedImplCopyWith<$Res> {
__$$FeedStateLoadedImplCopyWithImpl(
_$FeedStateLoadedImpl _value, $Res Function(_$FeedStateLoadedImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -330,13 +347,15 @@ class __$$FeedStateLoadedImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<
/// @nodoc /// @nodoc
class _$FeedStateLoadedImpl implements FeedStateLoaded { class _$FeedStateLoadedImpl implements FeedStateLoaded {
const _$FeedStateLoadedImpl({required final List<FeedBlogPostModel> feedBlogPostList}) : _feedBlogPostList = feedBlogPostList; const _$FeedStateLoadedImpl(
{required final List<FeedBlogPostModel> feedBlogPostList})
: _feedBlogPostList = feedBlogPostList;
final List<FeedBlogPostModel> _feedBlogPostList; final List<FeedBlogPostModel> _feedBlogPostList;
@override @override
List<FeedBlogPostModel> get feedBlogPostList { List<FeedBlogPostModel> get feedBlogPostList {
if (_feedBlogPostList is EqualUnmodifiableListView) return _feedBlogPostList; if (_feedBlogPostList is EqualUnmodifiableListView)
return _feedBlogPostList;
// ignore: implicit_dynamic_type // ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_feedBlogPostList); return EqualUnmodifiableListView(_feedBlogPostList);
} }
@@ -351,16 +370,20 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$FeedStateLoadedImpl && other is _$FeedStateLoadedImpl &&
const DeepCollectionEquality().equals(other._feedBlogPostList, _feedBlogPostList)); const DeepCollectionEquality()
.equals(other._feedBlogPostList, _feedBlogPostList));
} }
@override @override
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_feedBlogPostList)); int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_feedBlogPostList));
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith => __$$FeedStateLoadedImplCopyWithImpl<_$FeedStateLoadedImpl>(this, _$identity); _$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith =>
__$$FeedStateLoadedImplCopyWithImpl<_$FeedStateLoadedImpl>(
this, _$identity);
@override @override
@optionalTypeArgs @optionalTypeArgs
@@ -438,25 +461,32 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
} }
abstract class FeedStateLoaded implements FeedState { abstract class FeedStateLoaded implements FeedState {
const factory FeedStateLoaded({required final List<FeedBlogPostModel> feedBlogPostList}) = _$FeedStateLoadedImpl; const factory FeedStateLoaded(
{required final List<FeedBlogPostModel> feedBlogPostList}) =
_$FeedStateLoadedImpl;
List<FeedBlogPostModel> get feedBlogPostList; List<FeedBlogPostModel> get feedBlogPostList;
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith => throw _privateConstructorUsedError; _$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class _$$FeedStateErrorImplCopyWith<$Res> { abstract class _$$FeedStateErrorImplCopyWith<$Res> {
factory _$$FeedStateErrorImplCopyWith(_$FeedStateErrorImpl value, $Res Function(_$FeedStateErrorImpl) then) = __$$FeedStateErrorImplCopyWithImpl<$Res>; factory _$$FeedStateErrorImplCopyWith(_$FeedStateErrorImpl value,
$Res Function(_$FeedStateErrorImpl) then) =
__$$FeedStateErrorImplCopyWithImpl<$Res>;
@useResult @useResult
$Res call({String errorMessage}); $Res call({String errorMessage});
} }
/// @nodoc /// @nodoc
class __$$FeedStateErrorImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateErrorImpl> implements _$$FeedStateErrorImplCopyWith<$Res> { class __$$FeedStateErrorImplCopyWithImpl<$Res>
__$$FeedStateErrorImplCopyWithImpl(_$FeedStateErrorImpl _value, $Res Function(_$FeedStateErrorImpl) _then) : super(_value, _then); extends _$FeedStateCopyWithImpl<$Res, _$FeedStateErrorImpl>
implements _$$FeedStateErrorImplCopyWith<$Res> {
__$$FeedStateErrorImplCopyWithImpl(
_$FeedStateErrorImpl _value, $Res Function(_$FeedStateErrorImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -490,7 +520,8 @@ class _$FeedStateErrorImpl implements FeedStateError {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$FeedStateErrorImpl && other is _$FeedStateErrorImpl &&
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)); (identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
} }
@override @override
@@ -499,7 +530,9 @@ class _$FeedStateErrorImpl implements FeedStateError {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith => __$$FeedStateErrorImplCopyWithImpl<_$FeedStateErrorImpl>(this, _$identity); _$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith =>
__$$FeedStateErrorImplCopyWithImpl<_$FeedStateErrorImpl>(
this, _$identity);
@override @override
@optionalTypeArgs @optionalTypeArgs
@@ -577,10 +610,11 @@ class _$FeedStateErrorImpl implements FeedStateError {
} }
abstract class FeedStateError implements FeedState { abstract class FeedStateError implements FeedState {
const factory FeedStateError({required final String errorMessage}) = _$FeedStateErrorImpl; const factory FeedStateError({required final String errorMessage}) =
_$FeedStateErrorImpl;
String get errorMessage; String get errorMessage;
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith => throw _privateConstructorUsedError; _$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
} }

View File

@@ -24,7 +24,6 @@ mixin _$RecipesState {
required TResult Function(String errorMessage) error, required TResult Function(String errorMessage) error,
}) => }) =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
@optionalTypeArgs @optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>( TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, { TResult? Function()? $default, {
@@ -71,28 +70,36 @@ mixin _$RecipesState {
/// @nodoc /// @nodoc
abstract class $RecipesStateCopyWith<$Res> { abstract class $RecipesStateCopyWith<$Res> {
factory $RecipesStateCopyWith(RecipesState value, $Res Function(RecipesState) then) = _$RecipesStateCopyWithImpl<$Res, RecipesState>; factory $RecipesStateCopyWith(
RecipesState value, $Res Function(RecipesState) then) =
_$RecipesStateCopyWithImpl<$Res, RecipesState>;
} }
/// @nodoc /// @nodoc
class _$RecipesStateCopyWithImpl<$Res, $Val extends RecipesState> implements $RecipesStateCopyWith<$Res> { class _$RecipesStateCopyWithImpl<$Res, $Val extends RecipesState>
implements $RecipesStateCopyWith<$Res> {
_$RecipesStateCopyWithImpl(this._value, this._then); _$RecipesStateCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
} }
/// @nodoc /// @nodoc
abstract class _$$RecipesStateImplCopyWith<$Res> { abstract class _$$RecipesStateImplCopyWith<$Res> {
factory _$$RecipesStateImplCopyWith(_$RecipesStateImpl value, $Res Function(_$RecipesStateImpl) then) = __$$RecipesStateImplCopyWithImpl<$Res>; factory _$$RecipesStateImplCopyWith(
_$RecipesStateImpl value, $Res Function(_$RecipesStateImpl) then) =
__$$RecipesStateImplCopyWithImpl<$Res>;
} }
/// @nodoc /// @nodoc
class __$$RecipesStateImplCopyWithImpl<$Res> extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateImpl> implements _$$RecipesStateImplCopyWith<$Res> { class __$$RecipesStateImplCopyWithImpl<$Res>
__$$RecipesStateImplCopyWithImpl(_$RecipesStateImpl _value, $Res Function(_$RecipesStateImpl) _then) : super(_value, _then); extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateImpl>
implements _$$RecipesStateImplCopyWith<$Res> {
__$$RecipesStateImplCopyWithImpl(
_$RecipesStateImpl _value, $Res Function(_$RecipesStateImpl) _then)
: super(_value, _then);
} }
/// @nodoc /// @nodoc
@@ -107,7 +114,8 @@ class _$RecipesStateImpl implements _RecipesState {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType && other is _$RecipesStateImpl); return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$RecipesStateImpl);
} }
@override @override
@@ -194,14 +202,18 @@ abstract class _RecipesState implements RecipesState {
/// @nodoc /// @nodoc
abstract class _$$RecipesStateLoadingImplCopyWith<$Res> { abstract class _$$RecipesStateLoadingImplCopyWith<$Res> {
factory _$$RecipesStateLoadingImplCopyWith(_$RecipesStateLoadingImpl value, $Res Function(_$RecipesStateLoadingImpl) then) = factory _$$RecipesStateLoadingImplCopyWith(_$RecipesStateLoadingImpl value,
$Res Function(_$RecipesStateLoadingImpl) then) =
__$$RecipesStateLoadingImplCopyWithImpl<$Res>; __$$RecipesStateLoadingImplCopyWithImpl<$Res>;
} }
/// @nodoc /// @nodoc
class __$$RecipesStateLoadingImplCopyWithImpl<$Res> extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateLoadingImpl> class __$$RecipesStateLoadingImplCopyWithImpl<$Res>
extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateLoadingImpl>
implements _$$RecipesStateLoadingImplCopyWith<$Res> { implements _$$RecipesStateLoadingImplCopyWith<$Res> {
__$$RecipesStateLoadingImplCopyWithImpl(_$RecipesStateLoadingImpl _value, $Res Function(_$RecipesStateLoadingImpl) _then) : super(_value, _then); __$$RecipesStateLoadingImplCopyWithImpl(_$RecipesStateLoadingImpl _value,
$Res Function(_$RecipesStateLoadingImpl) _then)
: super(_value, _then);
} }
/// @nodoc /// @nodoc
@@ -216,7 +228,9 @@ class _$RecipesStateLoadingImpl implements RecipesStateLoading {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType && other is _$RecipesStateLoadingImpl); return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$RecipesStateLoadingImpl);
} }
@override @override
@@ -303,17 +317,20 @@ abstract class RecipesStateLoading implements RecipesState {
/// @nodoc /// @nodoc
abstract class _$$RecipesStateLoadedImplCopyWith<$Res> { abstract class _$$RecipesStateLoadedImplCopyWith<$Res> {
factory _$$RecipesStateLoadedImplCopyWith(_$RecipesStateLoadedImpl value, $Res Function(_$RecipesStateLoadedImpl) then) = factory _$$RecipesStateLoadedImplCopyWith(_$RecipesStateLoadedImpl value,
$Res Function(_$RecipesStateLoadedImpl) then) =
__$$RecipesStateLoadedImplCopyWithImpl<$Res>; __$$RecipesStateLoadedImplCopyWithImpl<$Res>;
@useResult @useResult
$Res call({List<Recipes> recipesList}); $Res call({List<Recipes> recipesList});
} }
/// @nodoc /// @nodoc
class __$$RecipesStateLoadedImplCopyWithImpl<$Res> extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateLoadedImpl> class __$$RecipesStateLoadedImplCopyWithImpl<$Res>
extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateLoadedImpl>
implements _$$RecipesStateLoadedImplCopyWith<$Res> { implements _$$RecipesStateLoadedImplCopyWith<$Res> {
__$$RecipesStateLoadedImplCopyWithImpl(_$RecipesStateLoadedImpl _value, $Res Function(_$RecipesStateLoadedImpl) _then) : super(_value, _then); __$$RecipesStateLoadedImplCopyWithImpl(_$RecipesStateLoadedImpl _value,
$Res Function(_$RecipesStateLoadedImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -332,10 +349,10 @@ class __$$RecipesStateLoadedImplCopyWithImpl<$Res> extends _$RecipesStateCopyWit
/// @nodoc /// @nodoc
class _$RecipesStateLoadedImpl implements RecipesStateLoaded { class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
const _$RecipesStateLoadedImpl({required final List<Recipes> recipesList}) : _recipesList = recipesList; const _$RecipesStateLoadedImpl({required final List<Recipes> recipesList})
: _recipesList = recipesList;
final List<Recipes> _recipesList; final List<Recipes> _recipesList;
@override @override
List<Recipes> get recipesList { List<Recipes> get recipesList {
if (_recipesList is EqualUnmodifiableListView) return _recipesList; if (_recipesList is EqualUnmodifiableListView) return _recipesList;
@@ -351,17 +368,22 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$RecipesStateLoadedImpl && const DeepCollectionEquality().equals(other._recipesList, _recipesList)); (other.runtimeType == runtimeType &&
other is _$RecipesStateLoadedImpl &&
const DeepCollectionEquality()
.equals(other._recipesList, _recipesList));
} }
@override @override
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_recipesList)); int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_recipesList));
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith => _$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith =>
__$$RecipesStateLoadedImplCopyWithImpl<_$RecipesStateLoadedImpl>(this, _$identity); __$$RecipesStateLoadedImplCopyWithImpl<_$RecipesStateLoadedImpl>(
this, _$identity);
@override @override
@optionalTypeArgs @optionalTypeArgs
@@ -439,27 +461,31 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
} }
abstract class RecipesStateLoaded implements RecipesState { abstract class RecipesStateLoaded implements RecipesState {
const factory RecipesStateLoaded({required final List<Recipes> recipesList}) = _$RecipesStateLoadedImpl; const factory RecipesStateLoaded({required final List<Recipes> recipesList}) =
_$RecipesStateLoadedImpl;
List<Recipes> get recipesList; List<Recipes> get recipesList;
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith => throw _privateConstructorUsedError; _$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class _$$RecipesStateErrorImplCopyWith<$Res> { abstract class _$$RecipesStateErrorImplCopyWith<$Res> {
factory _$$RecipesStateErrorImplCopyWith(_$RecipesStateErrorImpl value, $Res Function(_$RecipesStateErrorImpl) then) = factory _$$RecipesStateErrorImplCopyWith(_$RecipesStateErrorImpl value,
$Res Function(_$RecipesStateErrorImpl) then) =
__$$RecipesStateErrorImplCopyWithImpl<$Res>; __$$RecipesStateErrorImplCopyWithImpl<$Res>;
@useResult @useResult
$Res call({String errorMessage}); $Res call({String errorMessage});
} }
/// @nodoc /// @nodoc
class __$$RecipesStateErrorImplCopyWithImpl<$Res> extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateErrorImpl> class __$$RecipesStateErrorImplCopyWithImpl<$Res>
extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateErrorImpl>
implements _$$RecipesStateErrorImplCopyWith<$Res> { implements _$$RecipesStateErrorImplCopyWith<$Res> {
__$$RecipesStateErrorImplCopyWithImpl(_$RecipesStateErrorImpl _value, $Res Function(_$RecipesStateErrorImpl) _then) : super(_value, _then); __$$RecipesStateErrorImplCopyWithImpl(_$RecipesStateErrorImpl _value,
$Res Function(_$RecipesStateErrorImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -493,7 +519,8 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$RecipesStateErrorImpl && other is _$RecipesStateErrorImpl &&
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)); (identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
} }
@override @override
@@ -502,7 +529,9 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith => __$$RecipesStateErrorImplCopyWithImpl<_$RecipesStateErrorImpl>(this, _$identity); _$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith =>
__$$RecipesStateErrorImplCopyWithImpl<_$RecipesStateErrorImpl>(
this, _$identity);
@override @override
@optionalTypeArgs @optionalTypeArgs
@@ -580,10 +609,11 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
} }
abstract class RecipesStateError implements RecipesState { abstract class RecipesStateError implements RecipesState {
const factory RecipesStateError({required final String errorMessage}) = _$RecipesStateErrorImpl; const factory RecipesStateError({required final String errorMessage}) =
_$RecipesStateErrorImpl;
String get errorMessage; String get errorMessage;
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith => throw _privateConstructorUsedError; _$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
} }

View File

@@ -55,7 +55,14 @@ class _FeedScreenState extends State<FeedScreen> {
), ),
]; ];
}, },
body: _selectedChipIndex == 0 ? _buildAllBlogPosts() : _buildAllRecipes(), body: Builder(
builder: (BuildContext context) {
if (_selectedChipIndex == 0)
return _buildAllBlogPosts();
else
return _buildAllRecipes();
},
),
), ),
); );
} }

View File

@@ -1,3 +1,4 @@
import 'package:eatvio_app/features/feed/models/diets_pagination_model.dart';
import 'package:eatvio_app/features/feed/models/feed_blog_post_model.dart'; import 'package:eatvio_app/features/feed/models/feed_blog_post_model.dart';
import 'package:eatvio_app/features/feed/models/recipes_model.dart'; import 'package:eatvio_app/features/feed/models/recipes_model.dart';
import 'package:eatvio_app/features/feed/services/feed_service.dart'; import 'package:eatvio_app/features/feed/services/feed_service.dart';
@@ -22,4 +23,12 @@ class FeedRepository {
rethrow; rethrow;
} }
} }
Future<DietsPagination> getDiets() async {
try {
return (await feedService.getDiets());
} catch (e) {
rethrow;
}
}
} }

View File

@@ -1,4 +1,5 @@
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:eatvio_app/features/feed/models/diets_pagination_model.dart';
import 'package:eatvio_app/features/feed/models/feed_blog_post_settings_model.dart'; import 'package:eatvio_app/features/feed/models/feed_blog_post_settings_model.dart';
import 'package:eatvio_app/features/feed/models/recipes_pagination_model.dart'; import 'package:eatvio_app/features/feed/models/recipes_pagination_model.dart';
import 'package:retrofit/retrofit.dart'; import 'package:retrofit/retrofit.dart';
@@ -14,4 +15,7 @@ abstract class FeedService {
@GET('/api/recipes/index') @GET('/api/recipes/index')
Future<RecipesPagination> getRecipes(); Future<RecipesPagination> getRecipes();
@GET('/api/diets/index')
Future<DietsPagination> getDiets();
} }

View File

@@ -24,22 +24,23 @@ class _FeedService implements FeedService {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{}; final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null; const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(_setStreamType<FeedBlogPostSettingsModel>(Options( final _result = await _dio.fetch<Map<String, dynamic>>(
_setStreamType<FeedBlogPostSettingsModel>(Options(
method: 'GET', method: 'GET',
headers: _headers, headers: _headers,
extra: _extra, extra: _extra,
) )
.compose( .compose(
_dio.options, _dio.options,
'/api/blogPosts/index', '/api/blogPosts/index',
queryParameters: queryParameters, queryParameters: queryParameters,
data: _data, data: _data,
) )
.copyWith( .copyWith(
baseUrl: _combineBaseUrls( baseUrl: _combineBaseUrls(
_dio.options.baseUrl, _dio.options.baseUrl,
baseUrl, baseUrl,
)))); ))));
final _value = FeedBlogPostSettingsModel.fromJson(_result.data!); final _value = FeedBlogPostSettingsModel.fromJson(_result.data!);
return _value; return _value;
} }
@@ -50,28 +51,58 @@ class _FeedService implements FeedService {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{}; final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null; const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(_setStreamType<RecipesPagination>(Options( final _result = await _dio
.fetch<Map<String, dynamic>>(_setStreamType<RecipesPagination>(Options(
method: 'GET', method: 'GET',
headers: _headers, headers: _headers,
extra: _extra, extra: _extra,
) )
.compose( .compose(
_dio.options, _dio.options,
'/api/recipes/index', '/api/recipes/index',
queryParameters: queryParameters, queryParameters: queryParameters,
data: _data, data: _data,
) )
.copyWith( .copyWith(
baseUrl: _combineBaseUrls( baseUrl: _combineBaseUrls(
_dio.options.baseUrl, _dio.options.baseUrl,
baseUrl, baseUrl,
)))); ))));
final _value = RecipesPagination.fromJson(_result.data!); final _value = RecipesPagination.fromJson(_result.data!);
return _value; return _value;
} }
@override
Future<DietsPagination> getDiets() async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null;
final _result = await _dio
.fetch<Map<String, dynamic>>(_setStreamType<DietsPagination>(Options(
method: 'GET',
headers: _headers,
extra: _extra,
)
.compose(
_dio.options,
'/api/diets/index',
queryParameters: queryParameters,
data: _data,
)
.copyWith(
baseUrl: _combineBaseUrls(
_dio.options.baseUrl,
baseUrl,
))));
final _value = DietsPagination.fromJson(_result.data!);
return _value;
}
RequestOptions _setStreamType<T>(RequestOptions requestOptions) { 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) { if (T == String) {
requestOptions.responseType = ResponseType.plain; requestOptions.responseType = ResponseType.plain;
} else { } else {

View File

@@ -65,14 +65,55 @@ class AboutRecipesScreen extends StatelessWidget {
imageUrl: baseUrl + '/storage/' + recipes.image, imageUrl: baseUrl + '/storage/' + recipes.image,
), ),
SizedBox(height: 12), SizedBox(height: 12),
Text(recipes.ingredients.toString()), Padding(
Text('Пошаговый рецепт'), 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( ListView.separated(
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, index) => itemBuilder: (context, index) => _step(recipes.steps[index], index + 1),
_step(recipes.steps[index], index + 1), separatorBuilder: (context, index) => Padding(
separatorBuilder: (context, index) => SizedBox(height: 16), padding: const EdgeInsets.all(16),
child: Container(
height: 0.4,
decoration: BoxDecoration(
color: Colors.grey,
borderRadius: BorderRadius.circular(16),
),
),
),
itemCount: recipes.steps.length, itemCount: recipes.steps.length,
), ),
], ],
@@ -81,14 +122,26 @@ class AboutRecipesScreen extends StatelessWidget {
); );
} }
_step(step.Step step, int stepNubmer) { _ingredient(Ingredient ingredient) {
return Text(
'• '+ ingredient.name + ' ' + ingredient.portion + ' ' + (ingredient.unit ?? ''),
style: TextStyle(
color: Colors.black,
fontSize: 14,
fontWeight: FontWeight.w400,
height: 1.2,
),
);
}
_step(step.Step step, int stepNumber) {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 16), padding: const EdgeInsets.symmetric(horizontal: 16),
child: Text( child: Text(
'Шаг ' + stepNubmer.toString(), 'Шаг ' + stepNumber.toString(),
style: TextStyle( style: TextStyle(
color: Colors.black54, color: Colors.black54,
fontSize: 14, fontSize: 14,
@@ -112,7 +165,13 @@ class AboutRecipesScreen extends StatelessWidget {
), ),
SizedBox(height: 8), SizedBox(height: 8),
if (step.image.length > 1) if (step.image.length > 1)
CachedNetworkImage(imageUrl: baseUrl + '/storage/' + step.image), Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: ClipRRect(
borderRadius: BorderRadius.circular(16),
child: CachedNetworkImage(imageUrl: baseUrl + '/storage/' + step.image),
),
)
], ],
); );
} }

View File

@@ -21,31 +21,33 @@ LocationModel _$LocationModelFromJson(Map<String, dynamic> json) {
/// @nodoc /// @nodoc
mixin _$LocationModel { mixin _$LocationModel {
List<String> get locations => throw _privateConstructorUsedError; List<String> get locations => throw _privateConstructorUsedError;
@JsonKey(name: 'response_body') @JsonKey(name: 'response_body')
String get responseBody => throw _privateConstructorUsedError; String get responseBody => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$LocationModelCopyWith<LocationModel> get copyWith => throw _privateConstructorUsedError; $LocationModelCopyWith<LocationModel> get copyWith =>
throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class $LocationModelCopyWith<$Res> { abstract class $LocationModelCopyWith<$Res> {
factory $LocationModelCopyWith(LocationModel value, $Res Function(LocationModel) then) = _$LocationModelCopyWithImpl<$Res, LocationModel>; factory $LocationModelCopyWith(
LocationModel value, $Res Function(LocationModel) then) =
_$LocationModelCopyWithImpl<$Res, LocationModel>;
@useResult @useResult
$Res call({List<String> locations, @JsonKey(name: 'response_body') String responseBody}); $Res call(
{List<String> locations,
@JsonKey(name: 'response_body') String responseBody});
} }
/// @nodoc /// @nodoc
class _$LocationModelCopyWithImpl<$Res, $Val extends LocationModel> implements $LocationModelCopyWith<$Res> { class _$LocationModelCopyWithImpl<$Res, $Val extends LocationModel>
implements $LocationModelCopyWith<$Res> {
_$LocationModelCopyWithImpl(this._value, this._then); _$LocationModelCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -69,17 +71,25 @@ class _$LocationModelCopyWithImpl<$Res, $Val extends LocationModel> implements $
} }
/// @nodoc /// @nodoc
abstract class _$$LocationModelImplCopyWith<$Res> implements $LocationModelCopyWith<$Res> { abstract class _$$LocationModelImplCopyWith<$Res>
factory _$$LocationModelImplCopyWith(_$LocationModelImpl value, $Res Function(_$LocationModelImpl) then) = __$$LocationModelImplCopyWithImpl<$Res>; implements $LocationModelCopyWith<$Res> {
factory _$$LocationModelImplCopyWith(
_$LocationModelImpl value, $Res Function(_$LocationModelImpl) then) =
__$$LocationModelImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call({List<String> locations, @JsonKey(name: 'response_body') String responseBody}); $Res call(
{List<String> locations,
@JsonKey(name: 'response_body') String responseBody});
} }
/// @nodoc /// @nodoc
class __$$LocationModelImplCopyWithImpl<$Res> extends _$LocationModelCopyWithImpl<$Res, _$LocationModelImpl> implements _$$LocationModelImplCopyWith<$Res> { class __$$LocationModelImplCopyWithImpl<$Res>
__$$LocationModelImplCopyWithImpl(_$LocationModelImpl _value, $Res Function(_$LocationModelImpl) _then) : super(_value, _then); extends _$LocationModelCopyWithImpl<$Res, _$LocationModelImpl>
implements _$$LocationModelImplCopyWith<$Res> {
__$$LocationModelImplCopyWithImpl(
_$LocationModelImpl _value, $Res Function(_$LocationModelImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -103,12 +113,15 @@ class __$$LocationModelImplCopyWithImpl<$Res> extends _$LocationModelCopyWithImp
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$LocationModelImpl implements _LocationModel { class _$LocationModelImpl implements _LocationModel {
const _$LocationModelImpl({required final List<String> locations, @JsonKey(name: 'response_body') required this.responseBody}) : _locations = locations; const _$LocationModelImpl(
{required final List<String> locations,
@JsonKey(name: 'response_body') required this.responseBody})
: _locations = locations;
factory _$LocationModelImpl.fromJson(Map<String, dynamic> json) => _$$LocationModelImplFromJson(json); factory _$LocationModelImpl.fromJson(Map<String, dynamic> json) =>
_$$LocationModelImplFromJson(json);
final List<String> _locations; final List<String> _locations;
@override @override
List<String> get locations { List<String> get locations {
if (_locations is EqualUnmodifiableListView) return _locations; if (_locations is EqualUnmodifiableListView) return _locations;
@@ -130,18 +143,22 @@ class _$LocationModelImpl implements _LocationModel {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$LocationModelImpl && other is _$LocationModelImpl &&
const DeepCollectionEquality().equals(other._locations, _locations) && const DeepCollectionEquality()
(identical(other.responseBody, responseBody) || other.responseBody == responseBody)); .equals(other._locations, _locations) &&
(identical(other.responseBody, responseBody) ||
other.responseBody == responseBody));
} }
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_locations), responseBody); int get hashCode => Object.hash(runtimeType,
const DeepCollectionEquality().hash(_locations), responseBody);
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$LocationModelImplCopyWith<_$LocationModelImpl> get copyWith => __$$LocationModelImplCopyWithImpl<_$LocationModelImpl>(this, _$identity); _$$LocationModelImplCopyWith<_$LocationModelImpl> get copyWith =>
__$$LocationModelImplCopyWithImpl<_$LocationModelImpl>(this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -152,19 +169,21 @@ class _$LocationModelImpl implements _LocationModel {
} }
abstract class _LocationModel implements LocationModel { abstract class _LocationModel implements LocationModel {
const factory _LocationModel({required final List<String> locations, @JsonKey(name: 'response_body') required final String responseBody}) = const factory _LocationModel(
{required final List<String> locations,
@JsonKey(name: 'response_body') required final String responseBody}) =
_$LocationModelImpl; _$LocationModelImpl;
factory _LocationModel.fromJson(Map<String, dynamic> json) = _$LocationModelImpl.fromJson; factory _LocationModel.fromJson(Map<String, dynamic> json) =
_$LocationModelImpl.fromJson;
@override @override
List<String> get locations; List<String> get locations;
@override @override
@JsonKey(name: 'response_body') @JsonKey(name: 'response_body')
String get responseBody; String get responseBody;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$LocationModelImplCopyWith<_$LocationModelImpl> get copyWith => throw _privateConstructorUsedError; _$$LocationModelImplCopyWith<_$LocationModelImpl> get copyWith =>
throw _privateConstructorUsedError;
} }

View File

@@ -6,12 +6,15 @@ part of 'location_model.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$LocationModelImpl _$$LocationModelImplFromJson(Map<String, dynamic> json) => _$LocationModelImpl( _$LocationModelImpl _$$LocationModelImplFromJson(Map<String, dynamic> json) =>
locations: (json['locations'] as List<dynamic>).map((e) => e as String).toList(), _$LocationModelImpl(
locations:
(json['locations'] as List<dynamic>).map((e) => e as String).toList(),
responseBody: json['response_body'] as String, responseBody: json['response_body'] as String,
); );
Map<String, dynamic> _$$LocationModelImplToJson(_$LocationModelImpl instance) => <String, dynamic>{ Map<String, dynamic> _$$LocationModelImplToJson(_$LocationModelImpl instance) =>
<String, dynamic>{
'locations': instance.locations, 'locations': instance.locations,
'response_body': instance.responseBody, 'response_body': instance.responseBody,
}; };

View File

@@ -19,13 +19,15 @@ mixin _$RegistrationState {
UserRegistrationSheet get sheet => throw _privateConstructorUsedError; UserRegistrationSheet get sheet => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$RegistrationStateCopyWith<RegistrationState> get copyWith => throw _privateConstructorUsedError; $RegistrationStateCopyWith<RegistrationState> get copyWith =>
throw _privateConstructorUsedError;
} }
/// @nodoc /// @nodoc
abstract class $RegistrationStateCopyWith<$Res> { abstract class $RegistrationStateCopyWith<$Res> {
factory $RegistrationStateCopyWith(RegistrationState value, $Res Function(RegistrationState) then) = _$RegistrationStateCopyWithImpl<$Res, RegistrationState>; factory $RegistrationStateCopyWith(
RegistrationState value, $Res Function(RegistrationState) then) =
_$RegistrationStateCopyWithImpl<$Res, RegistrationState>;
@useResult @useResult
$Res call({UserRegistrationSheet sheet}); $Res call({UserRegistrationSheet sheet});
@@ -33,12 +35,12 @@ abstract class $RegistrationStateCopyWith<$Res> {
} }
/// @nodoc /// @nodoc
class _$RegistrationStateCopyWithImpl<$Res, $Val extends RegistrationState> implements $RegistrationStateCopyWith<$Res> { class _$RegistrationStateCopyWithImpl<$Res, $Val extends RegistrationState>
implements $RegistrationStateCopyWith<$Res> {
_$RegistrationStateCopyWithImpl(this._value, this._then); _$RegistrationStateCopyWithImpl(this._value, this._then);
// ignore: unused_field // ignore: unused_field
final $Val _value; final $Val _value;
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
@@ -65,10 +67,11 @@ class _$RegistrationStateCopyWithImpl<$Res, $Val extends RegistrationState> impl
} }
/// @nodoc /// @nodoc
abstract class _$$RegistrationStateImplCopyWith<$Res> implements $RegistrationStateCopyWith<$Res> { abstract class _$$RegistrationStateImplCopyWith<$Res>
factory _$$RegistrationStateImplCopyWith(_$RegistrationStateImpl value, $Res Function(_$RegistrationStateImpl) then) = implements $RegistrationStateCopyWith<$Res> {
factory _$$RegistrationStateImplCopyWith(_$RegistrationStateImpl value,
$Res Function(_$RegistrationStateImpl) then) =
__$$RegistrationStateImplCopyWithImpl<$Res>; __$$RegistrationStateImplCopyWithImpl<$Res>;
@override @override
@useResult @useResult
$Res call({UserRegistrationSheet sheet}); $Res call({UserRegistrationSheet sheet});
@@ -78,9 +81,12 @@ abstract class _$$RegistrationStateImplCopyWith<$Res> implements $RegistrationSt
} }
/// @nodoc /// @nodoc
class __$$RegistrationStateImplCopyWithImpl<$Res> extends _$RegistrationStateCopyWithImpl<$Res, _$RegistrationStateImpl> class __$$RegistrationStateImplCopyWithImpl<$Res>
extends _$RegistrationStateCopyWithImpl<$Res, _$RegistrationStateImpl>
implements _$$RegistrationStateImplCopyWith<$Res> { implements _$$RegistrationStateImplCopyWith<$Res> {
__$$RegistrationStateImplCopyWithImpl(_$RegistrationStateImpl _value, $Res Function(_$RegistrationStateImpl) _then) : super(_value, _then); __$$RegistrationStateImplCopyWithImpl(_$RegistrationStateImpl _value,
$Res Function(_$RegistrationStateImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
@@ -112,7 +118,9 @@ class _$RegistrationStateImpl implements _RegistrationState {
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$RegistrationStateImpl && (identical(other.sheet, sheet) || other.sheet == sheet)); (other.runtimeType == runtimeType &&
other is _$RegistrationStateImpl &&
(identical(other.sheet, sheet) || other.sheet == sheet));
} }
@override @override
@@ -121,16 +129,19 @@ class _$RegistrationStateImpl implements _RegistrationState {
@JsonKey(ignore: true) @JsonKey(ignore: true)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$RegistrationStateImplCopyWith<_$RegistrationStateImpl> get copyWith => __$$RegistrationStateImplCopyWithImpl<_$RegistrationStateImpl>(this, _$identity); _$$RegistrationStateImplCopyWith<_$RegistrationStateImpl> get copyWith =>
__$$RegistrationStateImplCopyWithImpl<_$RegistrationStateImpl>(
this, _$identity);
} }
abstract class _RegistrationState implements RegistrationState { abstract class _RegistrationState implements RegistrationState {
const factory _RegistrationState({required final UserRegistrationSheet sheet}) = _$RegistrationStateImpl; const factory _RegistrationState(
{required final UserRegistrationSheet sheet}) = _$RegistrationStateImpl;
@override @override
UserRegistrationSheet get sheet; UserRegistrationSheet get sheet;
@override @override
@JsonKey(ignore: true) @JsonKey(ignore: true)
_$$RegistrationStateImplCopyWith<_$RegistrationStateImpl> get copyWith => throw _privateConstructorUsedError; _$$RegistrationStateImplCopyWith<_$RegistrationStateImpl> get copyWith =>
throw _privateConstructorUsedError;
} }

View File

@@ -19,28 +19,30 @@ class _RegistrationService implements RegistrationService {
String? baseUrl; String? baseUrl;
@override @override
Future<Map<String, String>> register({required Map<String, dynamic> sheet}) async { Future<Map<String, String>> register(
{required Map<String, dynamic> sheet}) async {
final _extra = <String, dynamic>{}; final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{}; final _headers = <String, dynamic>{};
final _data = <String, dynamic>{}; final _data = <String, dynamic>{};
_data.addAll(sheet); _data.addAll(sheet);
final _result = await _dio.fetch<Map<String, dynamic>>(_setStreamType<Map<String, String>>(Options( final _result = await _dio.fetch<Map<String, dynamic>>(
_setStreamType<Map<String, String>>(Options(
method: 'POST', method: 'POST',
headers: _headers, headers: _headers,
extra: _extra, extra: _extra,
) )
.compose( .compose(
_dio.options, _dio.options,
'/api/register', '/api/register',
queryParameters: queryParameters, queryParameters: queryParameters,
data: _data, data: _data,
) )
.copyWith( .copyWith(
baseUrl: _combineBaseUrls( baseUrl: _combineBaseUrls(
_dio.options.baseUrl, _dio.options.baseUrl,
baseUrl, baseUrl,
)))); ))));
final _value = _result.data!.cast<String, String>(); final _value = _result.data!.cast<String, String>();
return _value; return _value;
} }
@@ -51,22 +53,23 @@ class _RegistrationService implements RegistrationService {
final queryParameters = <String, dynamic>{r'user_address': query}; final queryParameters = <String, dynamic>{r'user_address': query};
final _headers = <String, dynamic>{}; final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null; const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(_setStreamType<LocationModel>(Options( final _result = await _dio
.fetch<Map<String, dynamic>>(_setStreamType<LocationModel>(Options(
method: 'GET', method: 'GET',
headers: _headers, headers: _headers,
extra: _extra, extra: _extra,
) )
.compose( .compose(
_dio.options, _dio.options,
'/api/location_by_address', '/api/location_by_address',
queryParameters: queryParameters, queryParameters: queryParameters,
data: _data, data: _data,
) )
.copyWith( .copyWith(
baseUrl: _combineBaseUrls( baseUrl: _combineBaseUrls(
_dio.options.baseUrl, _dio.options.baseUrl,
baseUrl, baseUrl,
)))); ))));
final _value = LocationModel.fromJson(_result.data!); final _value = LocationModel.fromJson(_result.data!);
return _value; return _value;
} }
@@ -83,28 +86,31 @@ class _RegistrationService implements RegistrationService {
}; };
final _headers = <String, dynamic>{}; final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null; const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(_setStreamType<LocationModel>(Options( final _result = await _dio
.fetch<Map<String, dynamic>>(_setStreamType<LocationModel>(Options(
method: 'GET', method: 'GET',
headers: _headers, headers: _headers,
extra: _extra, extra: _extra,
) )
.compose( .compose(
_dio.options, _dio.options,
'/api/location_by_coordinate', '/api/location_by_coordinate',
queryParameters: queryParameters, queryParameters: queryParameters,
data: _data, data: _data,
) )
.copyWith( .copyWith(
baseUrl: _combineBaseUrls( baseUrl: _combineBaseUrls(
_dio.options.baseUrl, _dio.options.baseUrl,
baseUrl, baseUrl,
)))); ))));
final _value = LocationModel.fromJson(_result.data!); final _value = LocationModel.fromJson(_result.data!);
return _value; return _value;
} }
RequestOptions _setStreamType<T>(RequestOptions requestOptions) { 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) { if (T == String) {
requestOptions.responseType = ResponseType.plain; requestOptions.responseType = ResponseType.plain;
} else { } else {

View File

@@ -2,7 +2,7 @@ import 'dart:convert';
import 'dart:math'; import 'dart:math';
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import 'package:carousel_slider/carousel_slider.dart'; import 'package:carousel_slider_plus/carousel_slider_plus.dart';
import 'package:eatvio_app/core/app_export.dart'; import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/widgets/app_bar/appbar_subtitle.dart'; import 'package:eatvio_app/widgets/app_bar/appbar_subtitle.dart';
import 'package:eatvio_app/widgets/custom_text_form_field.dart'; import 'package:eatvio_app/widgets/custom_text_form_field.dart';

View File

@@ -91,10 +91,14 @@ class ThemeHelper {
colorScheme: colorScheme, colorScheme: colorScheme,
scaffoldBackgroundColor: colorScheme.onPrimary, scaffoldBackgroundColor: colorScheme.onPrimary,
appBarTheme: AppBarTheme( appBarTheme: AppBarTheme(
scrolledUnderElevation: 0,
elevation: 0,
systemOverlayStyle: SystemUiOverlayStyle( systemOverlayStyle: SystemUiOverlayStyle(
statusBarIconBrightness: Brightness.dark, statusBarIconBrightness: Brightness.dark,
statusBarBrightness: Brightness.light, statusBarBrightness: Brightness.light,
systemNavigationBarColor: Colors.white, systemNavigationBarColor: Colors.white,
statusBarColor: Colors.white,
systemNavigationBarIconBrightness: Brightness.dark,
), ),
), ),
outlinedButtonTheme: OutlinedButtonThemeData( outlinedButtonTheme: OutlinedButtonThemeData(

View File

@@ -27,7 +27,7 @@ dependencies:
path_provider: ^2.1.3 path_provider: ^2.1.3
fl_chart: ^0.68.0 fl_chart: ^0.68.0
flutter_spinkit: ^5.2.1 flutter_spinkit: ^5.2.1
carousel_slider: ^4.2.1 carousel_slider_plus: ^7.0.0
flutter_form_builder: ^9.3.0 flutter_form_builder: ^9.3.0
image_picker: ^1.1.2 image_picker: ^1.1.2
flutter_typeahead: ^5.2.0 flutter_typeahead: ^5.2.0
@@ -36,7 +36,7 @@ dependencies:
retrofit: ^4.1.0 retrofit: ^4.1.0
get_it: ^7.7.0 get_it: ^7.7.0
dio: ^5.5.0 dio: ^5.5.0
dart_pusher_channels: ^1.2.2 dart_pusher_channels: ^1.2.2+1
photo_view: ^0.15.0 photo_view: ^0.15.0
dismissible_page: ^1.0.2 dismissible_page: ^1.0.2
url_launcher: ^6.3.0 url_launcher: ^6.3.0
@@ -45,7 +45,7 @@ dependencies:
badges: ^3.1.2 badges: ^3.1.2
google_fonts: ^6.2.1 google_fonts: ^6.2.1
location: ^7.0.0 location: ^7.0.0
syncfusion_flutter_charts: ^26.1.42 syncfusion_flutter_charts: ^26.2.8
table_calendar: ^3.1.2 table_calendar: ^3.1.2
dev_dependencies: dev_dependencies: