forked from eatvio/eatvio_app
feat(feed): add recipes screen
This commit is contained in:
@@ -8,7 +8,9 @@ import 'package:eatvio_app/features/chat/presentation/pages/chat_screen.dart';
|
||||
import 'package:eatvio_app/features/chat/presentation/pages/chat_select_screen/chat_select_screen.dart';
|
||||
import 'package:eatvio_app/features/chat/presentation/pages/photo_view_screen.dart';
|
||||
import 'package:eatvio_app/features/diary/presentation/pages/diary_screen.dart';
|
||||
import 'package:eatvio_app/features/feed/models/recipes_model.dart';
|
||||
import 'package:eatvio_app/features/feed/presentation/pages/feed_screen.dart';
|
||||
import 'package:eatvio_app/features/recipes/presentation/pages/about_recipes_screen.dart';
|
||||
import 'package:eatvio_app/features/registration/presentation/pages/registration_screen.dart';
|
||||
import 'package:eatvio_app/presentation/auth/auth_screen/auth_screen.dart';
|
||||
import 'package:eatvio_app/presentation/diets/diet_create_screen/diet_create_screen.dart';
|
||||
@@ -79,6 +81,13 @@ class AppRouter {
|
||||
),
|
||||
],
|
||||
),
|
||||
GoRoute(
|
||||
path: '/about-recipes-screen',
|
||||
name: 'aboutRecipesScreen',
|
||||
builder: (context, state) => AboutRecipesScreen(
|
||||
recipes: state.extra as Recipes,
|
||||
),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/blog-post-create-screen',
|
||||
name: 'blogPostCreateScreen',
|
||||
|
||||
@@ -24,6 +24,7 @@ mixin _$InitializationState {
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
@@ -70,36 +71,31 @@ mixin _$InitializationState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $InitializationStateCopyWith<$Res> {
|
||||
factory $InitializationStateCopyWith(
|
||||
InitializationState value, $Res Function(InitializationState) then) =
|
||||
factory $InitializationStateCopyWith(InitializationState value, $Res Function(InitializationState) then) =
|
||||
_$InitializationStateCopyWithImpl<$Res, InitializationState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$InitializationStateCopyWithImpl<$Res, $Val extends InitializationState>
|
||||
implements $InitializationStateCopyWith<$Res> {
|
||||
class _$InitializationStateCopyWithImpl<$Res, $Val extends InitializationState> implements $InitializationStateCopyWith<$Res> {
|
||||
_$InitializationStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$InitializationStateImplCopyWith<$Res> {
|
||||
factory _$$InitializationStateImplCopyWith(_$InitializationStateImpl value,
|
||||
$Res Function(_$InitializationStateImpl) then) =
|
||||
factory _$$InitializationStateImplCopyWith(_$InitializationStateImpl value, $Res Function(_$InitializationStateImpl) then) =
|
||||
__$$InitializationStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$InitializationStateImplCopyWithImpl<$Res>
|
||||
extends _$InitializationStateCopyWithImpl<$Res, _$InitializationStateImpl>
|
||||
class __$$InitializationStateImplCopyWithImpl<$Res> extends _$InitializationStateCopyWithImpl<$Res, _$InitializationStateImpl>
|
||||
implements _$$InitializationStateImplCopyWith<$Res> {
|
||||
__$$InitializationStateImplCopyWithImpl(_$InitializationStateImpl _value,
|
||||
$Res Function(_$InitializationStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$InitializationStateImplCopyWithImpl(_$InitializationStateImpl _value, $Res Function(_$InitializationStateImpl) _then) : super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -114,9 +110,7 @@ class _$InitializationStateImpl implements _InitializationState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$InitializationStateImpl);
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$InitializationStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -203,20 +197,14 @@ abstract class _InitializationState implements InitializationState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$InitializationStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$InitializationStateLoadingImplCopyWith(
|
||||
_$InitializationStateLoadingImpl value,
|
||||
$Res Function(_$InitializationStateLoadingImpl) then) =
|
||||
factory _$$InitializationStateLoadingImplCopyWith(_$InitializationStateLoadingImpl value, $Res Function(_$InitializationStateLoadingImpl) then) =
|
||||
__$$InitializationStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$InitializationStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$InitializationStateCopyWithImpl<$Res,
|
||||
_$InitializationStateLoadingImpl>
|
||||
class __$$InitializationStateLoadingImplCopyWithImpl<$Res> extends _$InitializationStateCopyWithImpl<$Res, _$InitializationStateLoadingImpl>
|
||||
implements _$$InitializationStateLoadingImplCopyWith<$Res> {
|
||||
__$$InitializationStateLoadingImplCopyWithImpl(
|
||||
_$InitializationStateLoadingImpl _value,
|
||||
$Res Function(_$InitializationStateLoadingImpl) _then)
|
||||
__$$InitializationStateLoadingImplCopyWithImpl(_$InitializationStateLoadingImpl _value, $Res Function(_$InitializationStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
}
|
||||
|
||||
@@ -232,9 +220,7 @@ class _$InitializationStateLoadingImpl implements InitializationStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$InitializationStateLoadingImpl);
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$InitializationStateLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -321,22 +307,17 @@ abstract class InitializationStateLoading implements InitializationState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$InitializationStateSuccessImplCopyWith<$Res> {
|
||||
factory _$$InitializationStateSuccessImplCopyWith(
|
||||
_$InitializationStateSuccessImpl value,
|
||||
$Res Function(_$InitializationStateSuccessImpl) then) =
|
||||
factory _$$InitializationStateSuccessImplCopyWith(_$InitializationStateSuccessImpl value, $Res Function(_$InitializationStateSuccessImpl) then) =
|
||||
__$$InitializationStateSuccessImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({PusherChannelsClient client});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$InitializationStateSuccessImplCopyWithImpl<$Res>
|
||||
extends _$InitializationStateCopyWithImpl<$Res,
|
||||
_$InitializationStateSuccessImpl>
|
||||
class __$$InitializationStateSuccessImplCopyWithImpl<$Res> extends _$InitializationStateCopyWithImpl<$Res, _$InitializationStateSuccessImpl>
|
||||
implements _$$InitializationStateSuccessImplCopyWith<$Res> {
|
||||
__$$InitializationStateSuccessImplCopyWithImpl(
|
||||
_$InitializationStateSuccessImpl _value,
|
||||
$Res Function(_$InitializationStateSuccessImpl) _then)
|
||||
__$$InitializationStateSuccessImplCopyWithImpl(_$InitializationStateSuccessImpl _value, $Res Function(_$InitializationStateSuccessImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@@ -369,9 +350,7 @@ class _$InitializationStateSuccessImpl implements InitializationStateSuccess {
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$InitializationStateSuccessImpl &&
|
||||
(identical(other.client, client) || other.client == client));
|
||||
(other.runtimeType == runtimeType && other is _$InitializationStateSuccessImpl && (identical(other.client, client) || other.client == client));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -380,9 +359,8 @@ class _$InitializationStateSuccessImpl implements InitializationStateSuccess {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl>
|
||||
get copyWith => __$$InitializationStateSuccessImplCopyWithImpl<
|
||||
_$InitializationStateSuccessImpl>(this, _$identity);
|
||||
_$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl> get copyWith =>
|
||||
__$$InitializationStateSuccessImplCopyWithImpl<_$InitializationStateSuccessImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -460,34 +438,27 @@ class _$InitializationStateSuccessImpl implements InitializationStateSuccess {
|
||||
}
|
||||
|
||||
abstract class InitializationStateSuccess implements InitializationState {
|
||||
const factory InitializationStateSuccess(
|
||||
{required final PusherChannelsClient client}) =
|
||||
_$InitializationStateSuccessImpl;
|
||||
const factory InitializationStateSuccess({required final PusherChannelsClient client}) = _$InitializationStateSuccessImpl;
|
||||
|
||||
PusherChannelsClient get client;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
_$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
_$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$InitializationStateErrorImplCopyWith<$Res> {
|
||||
factory _$$InitializationStateErrorImplCopyWith(
|
||||
_$InitializationStateErrorImpl value,
|
||||
$Res Function(_$InitializationStateErrorImpl) then) =
|
||||
factory _$$InitializationStateErrorImplCopyWith(_$InitializationStateErrorImpl value, $Res Function(_$InitializationStateErrorImpl) then) =
|
||||
__$$InitializationStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$InitializationStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$InitializationStateCopyWithImpl<$Res,
|
||||
_$InitializationStateErrorImpl>
|
||||
class __$$InitializationStateErrorImplCopyWithImpl<$Res> extends _$InitializationStateCopyWithImpl<$Res, _$InitializationStateErrorImpl>
|
||||
implements _$$InitializationStateErrorImplCopyWith<$Res> {
|
||||
__$$InitializationStateErrorImplCopyWithImpl(
|
||||
_$InitializationStateErrorImpl _value,
|
||||
$Res Function(_$InitializationStateErrorImpl) _then)
|
||||
__$$InitializationStateErrorImplCopyWithImpl(_$InitializationStateErrorImpl _value, $Res Function(_$InitializationStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@@ -522,8 +493,7 @@ class _$InitializationStateErrorImpl implements InitializationStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$InitializationStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -532,9 +502,8 @@ class _$InitializationStateErrorImpl implements InitializationStateError {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl>
|
||||
get copyWith => __$$InitializationStateErrorImplCopyWithImpl<
|
||||
_$InitializationStateErrorImpl>(this, _$identity);
|
||||
_$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl> get copyWith =>
|
||||
__$$InitializationStateErrorImplCopyWithImpl<_$InitializationStateErrorImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -612,11 +581,10 @@ class _$InitializationStateErrorImpl implements InitializationStateError {
|
||||
}
|
||||
|
||||
abstract class InitializationStateError implements InitializationState {
|
||||
const factory InitializationStateError({required final String errorMessage}) =
|
||||
_$InitializationStateErrorImpl;
|
||||
const factory InitializationStateError({required final String errorMessage}) = _$InitializationStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
_$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
_$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ class ImageConstant {
|
||||
static String imageNotFound = 'assets/images/image_not_found.png';
|
||||
|
||||
static String imaGlass = 'assets/images/image_glass.svg';
|
||||
|
||||
// Настройки images
|
||||
|
||||
static String imgClose = '$imagePath/img_close.svg';
|
||||
|
||||
@@ -17,31 +17,33 @@ final _privateConstructorUsedError = UnsupportedError(
|
||||
/// @nodoc
|
||||
mixin _$SelectionPopupModel {
|
||||
int? get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get title => throw _privateConstructorUsedError;
|
||||
|
||||
dynamic get value => throw _privateConstructorUsedError;
|
||||
|
||||
bool get isSelected => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$SelectionPopupModelCopyWith<SelectionPopupModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$SelectionPopupModelCopyWith<SelectionPopupModel> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $SelectionPopupModelCopyWith<$Res> {
|
||||
factory $SelectionPopupModelCopyWith(
|
||||
SelectionPopupModel value, $Res Function(SelectionPopupModel) then) =
|
||||
factory $SelectionPopupModelCopyWith(SelectionPopupModel value, $Res Function(SelectionPopupModel) then) =
|
||||
_$SelectionPopupModelCopyWithImpl<$Res, SelectionPopupModel>;
|
||||
|
||||
@useResult
|
||||
$Res call({int? id, String title, dynamic value, bool isSelected});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$SelectionPopupModelCopyWithImpl<$Res, $Val extends SelectionPopupModel>
|
||||
implements $SelectionPopupModelCopyWith<$Res> {
|
||||
class _$SelectionPopupModelCopyWithImpl<$Res, $Val extends SelectionPopupModel> implements $SelectionPopupModelCopyWith<$Res> {
|
||||
_$SelectionPopupModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -75,23 +77,19 @@ class _$SelectionPopupModelCopyWithImpl<$Res, $Val extends SelectionPopupModel>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$SelectionPopupModelImplCopyWith<$Res>
|
||||
implements $SelectionPopupModelCopyWith<$Res> {
|
||||
factory _$$SelectionPopupModelImplCopyWith(_$SelectionPopupModelImpl value,
|
||||
$Res Function(_$SelectionPopupModelImpl) then) =
|
||||
abstract class _$$SelectionPopupModelImplCopyWith<$Res> implements $SelectionPopupModelCopyWith<$Res> {
|
||||
factory _$$SelectionPopupModelImplCopyWith(_$SelectionPopupModelImpl value, $Res Function(_$SelectionPopupModelImpl) then) =
|
||||
__$$SelectionPopupModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int? id, String title, dynamic value, bool isSelected});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$SelectionPopupModelImplCopyWithImpl<$Res>
|
||||
extends _$SelectionPopupModelCopyWithImpl<$Res, _$SelectionPopupModelImpl>
|
||||
class __$$SelectionPopupModelImplCopyWithImpl<$Res> extends _$SelectionPopupModelCopyWithImpl<$Res, _$SelectionPopupModelImpl>
|
||||
implements _$$SelectionPopupModelImplCopyWith<$Res> {
|
||||
__$$SelectionPopupModelImplCopyWithImpl(_$SelectionPopupModelImpl _value,
|
||||
$Res Function(_$SelectionPopupModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$SelectionPopupModelImplCopyWithImpl(_$SelectionPopupModelImpl _value, $Res Function(_$SelectionPopupModelImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -125,8 +123,7 @@ class __$$SelectionPopupModelImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
|
||||
class _$SelectionPopupModelImpl implements _SelectionPopupModel {
|
||||
const _$SelectionPopupModelImpl(
|
||||
{this.id, required this.title, this.value, this.isSelected = false});
|
||||
const _$SelectionPopupModelImpl({this.id, required this.title, this.value, this.isSelected = false});
|
||||
|
||||
@override
|
||||
final int? id;
|
||||
@@ -151,39 +148,35 @@ class _$SelectionPopupModelImpl implements _SelectionPopupModel {
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.title, title) || other.title == title) &&
|
||||
const DeepCollectionEquality().equals(other.value, value) &&
|
||||
(identical(other.isSelected, isSelected) ||
|
||||
other.isSelected == isSelected));
|
||||
(identical(other.isSelected, isSelected) || other.isSelected == isSelected));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, title,
|
||||
const DeepCollectionEquality().hash(value), isSelected);
|
||||
int get hashCode => Object.hash(runtimeType, id, title, const DeepCollectionEquality().hash(value), isSelected);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith =>
|
||||
__$$SelectionPopupModelImplCopyWithImpl<_$SelectionPopupModelImpl>(
|
||||
this, _$identity);
|
||||
__$$SelectionPopupModelImplCopyWithImpl<_$SelectionPopupModelImpl>(this, _$identity);
|
||||
}
|
||||
|
||||
abstract class _SelectionPopupModel implements SelectionPopupModel {
|
||||
const factory _SelectionPopupModel(
|
||||
{final int? id,
|
||||
required final String title,
|
||||
final dynamic value,
|
||||
final bool isSelected}) = _$SelectionPopupModelImpl;
|
||||
const factory _SelectionPopupModel({final int? id, required final String title, final dynamic value, final bool isSelected}) = _$SelectionPopupModelImpl;
|
||||
|
||||
@override
|
||||
int? get id;
|
||||
|
||||
@override
|
||||
String get title;
|
||||
|
||||
@override
|
||||
dynamic get value;
|
||||
|
||||
@override
|
||||
bool get isSelected;
|
||||
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -15,8 +15,7 @@ class UserRegistrationSheet with _$UserRegistrationSheet {
|
||||
required String birthdate,
|
||||
required String gender,
|
||||
required String location,
|
||||
@JsonKey(name: 'response_body')
|
||||
required String responseBody,
|
||||
@JsonKey(name: 'response_body') required String responseBody,
|
||||
required String lang,
|
||||
required int weight,
|
||||
required int height,
|
||||
|
||||
@@ -14,8 +14,7 @@ T _$identity<T>(T value) => value;
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
UserRegistrationSheet _$UserRegistrationSheetFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
UserRegistrationSheet _$UserRegistrationSheetFromJson(Map<String, dynamic> json) {
|
||||
return _UserRegistrationSheet.fromJson(json);
|
||||
}
|
||||
|
||||
@@ -23,62 +22,88 @@ UserRegistrationSheet _$UserRegistrationSheetFromJson(
|
||||
mixin _$UserRegistrationSheet {
|
||||
@JsonKey(name: 'first_name')
|
||||
String get firstName => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'last_name')
|
||||
String get lastName => throw _privateConstructorUsedError;
|
||||
|
||||
String get email => throw _privateConstructorUsedError;
|
||||
|
||||
String get password => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'password_confirmation')
|
||||
String get passwordConfirmation => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'terms')
|
||||
String get termsAccepted => throw _privateConstructorUsedError;
|
||||
|
||||
String get birthdate => throw _privateConstructorUsedError;
|
||||
|
||||
String get gender => throw _privateConstructorUsedError;
|
||||
|
||||
String get location => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'response_body')
|
||||
String get responseBody => throw _privateConstructorUsedError;
|
||||
|
||||
String get lang => throw _privateConstructorUsedError;
|
||||
|
||||
int get weight => throw _privateConstructorUsedError;
|
||||
|
||||
int get height => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'chest_circumference')
|
||||
int get chestCircumference => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'waist_circumference')
|
||||
int get waistCircumference => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'hip_circumference')
|
||||
int get hipCircumference => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'blood_pressure_up')
|
||||
int get bloodPressureUp => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'blood_pressure_down')
|
||||
int get bloodPressureDown => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'has_hypo')
|
||||
int get hasHypo => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'has_hyper')
|
||||
int get hasHyper => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'about_alergy')
|
||||
String get aboutAllergy => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'about_taking_pils')
|
||||
String get aboutTakingPils => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'about_sport_hobbies')
|
||||
String get aboutSportHobbies => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'favorite_foods')
|
||||
String get favoriteFoods => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'unfavorite_foods')
|
||||
String get unfavoriteFoods => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'additional_info')
|
||||
String get additionalInfo => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'activity_coefficient')
|
||||
double get activityCoefficient => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$UserRegistrationSheetCopyWith<UserRegistrationSheet> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$UserRegistrationSheetCopyWith<UserRegistrationSheet> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $UserRegistrationSheetCopyWith<$Res> {
|
||||
factory $UserRegistrationSheetCopyWith(UserRegistrationSheet value,
|
||||
$Res Function(UserRegistrationSheet) then) =
|
||||
factory $UserRegistrationSheetCopyWith(UserRegistrationSheet value, $Res Function(UserRegistrationSheet) then) =
|
||||
_$UserRegistrationSheetCopyWithImpl<$Res, UserRegistrationSheet>;
|
||||
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: 'first_name') String firstName,
|
||||
@@ -111,13 +136,12 @@ abstract class $UserRegistrationSheetCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$UserRegistrationSheetCopyWithImpl<$Res,
|
||||
$Val extends UserRegistrationSheet>
|
||||
implements $UserRegistrationSheetCopyWith<$Res> {
|
||||
class _$UserRegistrationSheetCopyWithImpl<$Res, $Val extends UserRegistrationSheet> implements $UserRegistrationSheetCopyWith<$Res> {
|
||||
_$UserRegistrationSheetCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -266,12 +290,10 @@ class _$UserRegistrationSheetCopyWithImpl<$Res,
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$UserRegistrationSheetImplCopyWith<$Res>
|
||||
implements $UserRegistrationSheetCopyWith<$Res> {
|
||||
factory _$$UserRegistrationSheetImplCopyWith(
|
||||
_$UserRegistrationSheetImpl value,
|
||||
$Res Function(_$UserRegistrationSheetImpl) then) =
|
||||
abstract class _$$UserRegistrationSheetImplCopyWith<$Res> implements $UserRegistrationSheetCopyWith<$Res> {
|
||||
factory _$$UserRegistrationSheetImplCopyWith(_$UserRegistrationSheetImpl value, $Res Function(_$UserRegistrationSheetImpl) then) =
|
||||
__$$UserRegistrationSheetImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -305,13 +327,9 @@ abstract class _$$UserRegistrationSheetImplCopyWith<$Res>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$UserRegistrationSheetImplCopyWithImpl<$Res>
|
||||
extends _$UserRegistrationSheetCopyWithImpl<$Res,
|
||||
_$UserRegistrationSheetImpl>
|
||||
class __$$UserRegistrationSheetImplCopyWithImpl<$Res> extends _$UserRegistrationSheetCopyWithImpl<$Res, _$UserRegistrationSheetImpl>
|
||||
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')
|
||||
@override
|
||||
@@ -465,8 +483,7 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
|
||||
@JsonKey(name: 'last_name') required this.lastName,
|
||||
required this.email,
|
||||
required this.password,
|
||||
@JsonKey(name: 'password_confirmation')
|
||||
required this.passwordConfirmation,
|
||||
@JsonKey(name: 'password_confirmation') required this.passwordConfirmation,
|
||||
@JsonKey(name: 'terms') this.termsAccepted = 'accepted',
|
||||
required this.birthdate,
|
||||
required this.gender,
|
||||
@@ -490,8 +507,7 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
|
||||
@JsonKey(name: 'additional_info') required this.additionalInfo,
|
||||
@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
|
||||
@JsonKey(name: 'first_name')
|
||||
@@ -577,54 +593,33 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$UserRegistrationSheetImpl &&
|
||||
(identical(other.firstName, firstName) ||
|
||||
other.firstName == firstName) &&
|
||||
(identical(other.lastName, lastName) ||
|
||||
other.lastName == lastName) &&
|
||||
(identical(other.firstName, firstName) || other.firstName == firstName) &&
|
||||
(identical(other.lastName, lastName) || other.lastName == lastName) &&
|
||||
(identical(other.email, email) || other.email == email) &&
|
||||
(identical(other.password, password) ||
|
||||
other.password == password) &&
|
||||
(identical(other.passwordConfirmation, passwordConfirmation) ||
|
||||
other.passwordConfirmation == passwordConfirmation) &&
|
||||
(identical(other.termsAccepted, termsAccepted) ||
|
||||
other.termsAccepted == termsAccepted) &&
|
||||
(identical(other.birthdate, birthdate) ||
|
||||
other.birthdate == birthdate) &&
|
||||
(identical(other.password, password) || other.password == password) &&
|
||||
(identical(other.passwordConfirmation, passwordConfirmation) || 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.location, location) ||
|
||||
other.location == location) &&
|
||||
(identical(other.responseBody, responseBody) ||
|
||||
other.responseBody == responseBody) &&
|
||||
(identical(other.location, location) || other.location == location) &&
|
||||
(identical(other.responseBody, responseBody) || other.responseBody == responseBody) &&
|
||||
(identical(other.lang, lang) || other.lang == lang) &&
|
||||
(identical(other.weight, weight) || other.weight == weight) &&
|
||||
(identical(other.height, height) || other.height == height) &&
|
||||
(identical(other.chestCircumference, chestCircumference) ||
|
||||
other.chestCircumference == chestCircumference) &&
|
||||
(identical(other.waistCircumference, waistCircumference) ||
|
||||
other.waistCircumference == waistCircumference) &&
|
||||
(identical(other.hipCircumference, hipCircumference) ||
|
||||
other.hipCircumference == hipCircumference) &&
|
||||
(identical(other.bloodPressureUp, bloodPressureUp) ||
|
||||
other.bloodPressureUp == bloodPressureUp) &&
|
||||
(identical(other.bloodPressureDown, bloodPressureDown) ||
|
||||
other.bloodPressureDown == bloodPressureDown) &&
|
||||
(identical(other.chestCircumference, chestCircumference) || other.chestCircumference == chestCircumference) &&
|
||||
(identical(other.waistCircumference, waistCircumference) || other.waistCircumference == waistCircumference) &&
|
||||
(identical(other.hipCircumference, hipCircumference) || other.hipCircumference == hipCircumference) &&
|
||||
(identical(other.bloodPressureUp, bloodPressureUp) || other.bloodPressureUp == bloodPressureUp) &&
|
||||
(identical(other.bloodPressureDown, bloodPressureDown) || other.bloodPressureDown == bloodPressureDown) &&
|
||||
(identical(other.hasHypo, hasHypo) || other.hasHypo == hasHypo) &&
|
||||
(identical(other.hasHyper, hasHyper) ||
|
||||
other.hasHyper == hasHyper) &&
|
||||
(identical(other.aboutAllergy, aboutAllergy) ||
|
||||
other.aboutAllergy == aboutAllergy) &&
|
||||
(identical(other.aboutTakingPils, aboutTakingPils) ||
|
||||
other.aboutTakingPils == aboutTakingPils) &&
|
||||
(identical(other.aboutSportHobbies, aboutSportHobbies) ||
|
||||
other.aboutSportHobbies == aboutSportHobbies) &&
|
||||
(identical(other.favoriteFoods, favoriteFoods) ||
|
||||
other.favoriteFoods == favoriteFoods) &&
|
||||
(identical(other.unfavoriteFoods, unfavoriteFoods) ||
|
||||
other.unfavoriteFoods == unfavoriteFoods) &&
|
||||
(identical(other.additionalInfo, additionalInfo) ||
|
||||
other.additionalInfo == additionalInfo) &&
|
||||
(identical(other.activityCoefficient, activityCoefficient) ||
|
||||
other.activityCoefficient == activityCoefficient));
|
||||
(identical(other.hasHyper, hasHyper) || other.hasHyper == hasHyper) &&
|
||||
(identical(other.aboutAllergy, aboutAllergy) || other.aboutAllergy == aboutAllergy) &&
|
||||
(identical(other.aboutTakingPils, aboutTakingPils) || other.aboutTakingPils == aboutTakingPils) &&
|
||||
(identical(other.aboutSportHobbies, aboutSportHobbies) || other.aboutSportHobbies == aboutSportHobbies) &&
|
||||
(identical(other.favoriteFoods, favoriteFoods) || other.favoriteFoods == favoriteFoods) &&
|
||||
(identical(other.unfavoriteFoods, unfavoriteFoods) || other.unfavoriteFoods == unfavoriteFoods) &&
|
||||
(identical(other.additionalInfo, additionalInfo) || other.additionalInfo == additionalInfo) &&
|
||||
(identical(other.activityCoefficient, activityCoefficient) || other.activityCoefficient == activityCoefficient));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@@ -663,9 +658,8 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl>
|
||||
get copyWith => __$$UserRegistrationSheetImplCopyWithImpl<
|
||||
_$UserRegistrationSheetImpl>(this, _$identity);
|
||||
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl> get copyWith =>
|
||||
__$$UserRegistrationSheetImplCopyWithImpl<_$UserRegistrationSheetImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -681,8 +675,7 @@ abstract class _UserRegistrationSheet implements UserRegistrationSheet {
|
||||
@JsonKey(name: 'last_name') required final String lastName,
|
||||
required final String email,
|
||||
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,
|
||||
required final String birthdate,
|
||||
required final String gender,
|
||||
@@ -691,104 +684,124 @@ abstract class _UserRegistrationSheet implements UserRegistrationSheet {
|
||||
required final String lang,
|
||||
required final int weight,
|
||||
required final int height,
|
||||
@JsonKey(name: 'chest_circumference')
|
||||
required final int chestCircumference,
|
||||
@JsonKey(name: 'waist_circumference')
|
||||
required final int waistCircumference,
|
||||
@JsonKey(name: 'chest_circumference') required final int chestCircumference,
|
||||
@JsonKey(name: 'waist_circumference') required final int waistCircumference,
|
||||
@JsonKey(name: 'hip_circumference') required final int hipCircumference,
|
||||
@JsonKey(name: 'blood_pressure_up') required final int bloodPressureUp,
|
||||
@JsonKey(name: 'blood_pressure_down')
|
||||
required final int bloodPressureDown,
|
||||
@JsonKey(name: 'blood_pressure_down') required final int bloodPressureDown,
|
||||
@JsonKey(name: 'has_hypo') required final int hasHypo,
|
||||
@JsonKey(name: 'has_hyper') required final int hasHyper,
|
||||
@JsonKey(name: 'about_alergy') required final String aboutAllergy,
|
||||
@JsonKey(name: 'about_taking_pils') required final String aboutTakingPils,
|
||||
@JsonKey(name: 'about_sport_hobbies')
|
||||
required final String aboutSportHobbies,
|
||||
@JsonKey(name: 'about_sport_hobbies') required final String aboutSportHobbies,
|
||||
@JsonKey(name: 'favorite_foods') required final String favoriteFoods,
|
||||
@JsonKey(name: 'unfavorite_foods') required final String unfavoriteFoods,
|
||||
@JsonKey(name: 'additional_info') required final String additionalInfo,
|
||||
@JsonKey(name: '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
|
||||
@JsonKey(name: 'first_name')
|
||||
String get firstName;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'last_name')
|
||||
String get lastName;
|
||||
|
||||
@override
|
||||
String get email;
|
||||
|
||||
@override
|
||||
String get password;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'password_confirmation')
|
||||
String get passwordConfirmation;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'terms')
|
||||
String get termsAccepted;
|
||||
|
||||
@override
|
||||
String get birthdate;
|
||||
|
||||
@override
|
||||
String get gender;
|
||||
|
||||
@override
|
||||
String get location;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'response_body')
|
||||
String get responseBody;
|
||||
|
||||
@override
|
||||
String get lang;
|
||||
|
||||
@override
|
||||
int get weight;
|
||||
|
||||
@override
|
||||
int get height;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'chest_circumference')
|
||||
int get chestCircumference;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'waist_circumference')
|
||||
int get waistCircumference;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'hip_circumference')
|
||||
int get hipCircumference;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'blood_pressure_up')
|
||||
int get bloodPressureUp;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'blood_pressure_down')
|
||||
int get bloodPressureDown;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'has_hypo')
|
||||
int get hasHypo;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'has_hyper')
|
||||
int get hasHyper;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'about_alergy')
|
||||
String get aboutAllergy;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'about_taking_pils')
|
||||
String get aboutTakingPils;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'about_sport_hobbies')
|
||||
String get aboutSportHobbies;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'favorite_foods')
|
||||
String get favoriteFoods;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'unfavorite_foods')
|
||||
String get unfavoriteFoods;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'additional_info')
|
||||
String get additionalInfo;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'activity_coefficient')
|
||||
double get activityCoefficient;
|
||||
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,9 +6,7 @@ part of 'user_registration_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$UserRegistrationSheetImpl _$$UserRegistrationSheetImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$UserRegistrationSheetImpl(
|
||||
_$UserRegistrationSheetImpl _$$UserRegistrationSheetImplFromJson(Map<String, dynamic> json) => _$UserRegistrationSheetImpl(
|
||||
firstName: json['first_name'] as String,
|
||||
lastName: json['last_name'] as String,
|
||||
email: json['email'] as String,
|
||||
@@ -35,13 +33,10 @@ _$UserRegistrationSheetImpl _$$UserRegistrationSheetImplFromJson(
|
||||
favoriteFoods: json['favorite_foods'] as String,
|
||||
unfavoriteFoods: json['unfavorite_foods'] 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,
|
||||
'last_name': instance.lastName,
|
||||
'email': instance.email,
|
||||
|
||||
@@ -21,30 +21,38 @@ BlogPostModel _$BlogPostModelFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$BlogPostModel {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get state => throw _privateConstructorUsedError;
|
||||
|
||||
String? get image => throw _privateConstructorUsedError;
|
||||
|
||||
String get description => throw _privateConstructorUsedError;
|
||||
|
||||
String? get author_name => throw _privateConstructorUsedError;
|
||||
|
||||
String? get author_avatar_path => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "youtube_url")
|
||||
String get youtubeUrl => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt => throw _privateConstructorUsedError;
|
||||
|
||||
String get title => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$BlogPostModelCopyWith<BlogPostModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$BlogPostModelCopyWith<BlogPostModel> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
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
|
||||
$Res call(
|
||||
{int id,
|
||||
@@ -60,12 +68,12 @@ abstract class $BlogPostModelCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$BlogPostModelCopyWithImpl<$Res, $Val extends BlogPostModel>
|
||||
implements $BlogPostModelCopyWith<$Res> {
|
||||
class _$BlogPostModelCopyWithImpl<$Res, $Val extends BlogPostModel> implements $BlogPostModelCopyWith<$Res> {
|
||||
_$BlogPostModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -129,11 +137,9 @@ class _$BlogPostModelCopyWithImpl<$Res, $Val extends BlogPostModel>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$BlogPostModelImplCopyWith<$Res>
|
||||
implements $BlogPostModelCopyWith<$Res> {
|
||||
factory _$$BlogPostModelImplCopyWith(
|
||||
_$BlogPostModelImpl value, $Res Function(_$BlogPostModelImpl) then) =
|
||||
__$$BlogPostModelImplCopyWithImpl<$Res>;
|
||||
abstract class _$$BlogPostModelImplCopyWith<$Res> implements $BlogPostModelCopyWith<$Res> {
|
||||
factory _$$BlogPostModelImplCopyWith(_$BlogPostModelImpl value, $Res Function(_$BlogPostModelImpl) then) = __$$BlogPostModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -150,12 +156,8 @@ abstract class _$$BlogPostModelImplCopyWith<$Res>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$BlogPostModelImplCopyWithImpl<$Res>
|
||||
extends _$BlogPostModelCopyWithImpl<$Res, _$BlogPostModelImpl>
|
||||
implements _$$BlogPostModelImplCopyWith<$Res> {
|
||||
__$$BlogPostModelImplCopyWithImpl(
|
||||
_$BlogPostModelImpl _value, $Res Function(_$BlogPostModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$BlogPostModelImplCopyWithImpl<$Res> extends _$BlogPostModelCopyWithImpl<$Res, _$BlogPostModelImpl> implements _$$BlogPostModelImplCopyWith<$Res> {
|
||||
__$$BlogPostModelImplCopyWithImpl(_$BlogPostModelImpl _value, $Res Function(_$BlogPostModelImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -231,8 +233,7 @@ class _$BlogPostModelImpl implements _BlogPostModel {
|
||||
@JsonKey(name: "updated_at") required this.updatedAt,
|
||||
required this.title});
|
||||
|
||||
factory _$BlogPostModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$BlogPostModelImplFromJson(json);
|
||||
factory _$BlogPostModelImpl.fromJson(Map<String, dynamic> json) => _$$BlogPostModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -271,31 +272,23 @@ class _$BlogPostModelImpl implements _BlogPostModel {
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.state, state) || other.state == state) &&
|
||||
(identical(other.image, image) || other.image == image) &&
|
||||
(identical(other.description, description) ||
|
||||
other.description == description) &&
|
||||
(identical(other.author_name, author_name) ||
|
||||
other.author_name == author_name) &&
|
||||
(identical(other.author_avatar_path, author_avatar_path) ||
|
||||
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.description, description) || other.description == description) &&
|
||||
(identical(other.author_name, author_name) || other.author_name == author_name) &&
|
||||
(identical(other.author_avatar_path, author_avatar_path) || 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));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@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)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$BlogPostModelImplCopyWith<_$BlogPostModelImpl> get copyWith =>
|
||||
__$$BlogPostModelImplCopyWithImpl<_$BlogPostModelImpl>(this, _$identity);
|
||||
_$$BlogPostModelImplCopyWith<_$BlogPostModelImpl> get copyWith => __$$BlogPostModelImplCopyWithImpl<_$BlogPostModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -318,34 +311,42 @@ abstract class _BlogPostModel implements BlogPostModel {
|
||||
@JsonKey(name: "updated_at") required final DateTime updatedAt,
|
||||
required final String title}) = _$BlogPostModelImpl;
|
||||
|
||||
factory _BlogPostModel.fromJson(Map<String, dynamic> json) =
|
||||
_$BlogPostModelImpl.fromJson;
|
||||
factory _BlogPostModel.fromJson(Map<String, dynamic> json) = _$BlogPostModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
String get state;
|
||||
|
||||
@override
|
||||
String? get image;
|
||||
|
||||
@override
|
||||
String get description;
|
||||
|
||||
@override
|
||||
String? get author_name;
|
||||
|
||||
@override
|
||||
String? get author_avatar_path;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "youtube_url")
|
||||
String get youtubeUrl;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt;
|
||||
|
||||
@override
|
||||
String get title;
|
||||
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$BlogPostModelImplCopyWith<_$BlogPostModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$BlogPostModelImplCopyWith<_$BlogPostModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,8 +6,7 @@ part of 'blog_post_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$BlogPostModelImpl _$$BlogPostModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$BlogPostModelImpl(
|
||||
_$BlogPostModelImpl _$$BlogPostModelImplFromJson(Map<String, dynamic> json) => _$BlogPostModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
state: json['state'] as String,
|
||||
image: json['image'] as String?,
|
||||
@@ -20,8 +19,7 @@ _$BlogPostModelImpl _$$BlogPostModelImplFromJson(Map<String, dynamic> json) =>
|
||||
title: json['title'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$BlogPostModelImplToJson(_$BlogPostModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$$BlogPostModelImplToJson(_$BlogPostModelImpl instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'state': instance.state,
|
||||
'image': instance.image,
|
||||
|
||||
@@ -24,6 +24,7 @@ mixin _$BlogPostState {
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
@@ -70,36 +71,28 @@ mixin _$BlogPostState {
|
||||
|
||||
/// @nodoc
|
||||
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
|
||||
class _$BlogPostStateCopyWithImpl<$Res, $Val extends BlogPostState>
|
||||
implements $BlogPostStateCopyWith<$Res> {
|
||||
class _$BlogPostStateCopyWithImpl<$Res, $Val extends BlogPostState> implements $BlogPostStateCopyWith<$Res> {
|
||||
_$BlogPostStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
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
|
||||
class __$$BlogPostStateImplCopyWithImpl<$Res>
|
||||
extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateImpl>
|
||||
implements _$$BlogPostStateImplCopyWith<$Res> {
|
||||
__$$BlogPostStateImplCopyWithImpl(
|
||||
_$BlogPostStateImpl _value, $Res Function(_$BlogPostStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$BlogPostStateImplCopyWithImpl<$Res> extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateImpl> implements _$$BlogPostStateImplCopyWith<$Res> {
|
||||
__$$BlogPostStateImplCopyWithImpl(_$BlogPostStateImpl _value, $Res Function(_$BlogPostStateImpl) _then) : super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -114,8 +107,7 @@ class _$BlogPostStateImpl implements _BlogPostState {
|
||||
|
||||
@override
|
||||
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
|
||||
@@ -202,18 +194,14 @@ abstract class _BlogPostState implements BlogPostState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$BlogPostStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$BlogPostStateLoadingImplCopyWith(_$BlogPostStateLoadingImpl value,
|
||||
$Res Function(_$BlogPostStateLoadingImpl) then) =
|
||||
factory _$$BlogPostStateLoadingImplCopyWith(_$BlogPostStateLoadingImpl value, $Res Function(_$BlogPostStateLoadingImpl) then) =
|
||||
__$$BlogPostStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$BlogPostStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateLoadingImpl>
|
||||
class __$$BlogPostStateLoadingImplCopyWithImpl<$Res> extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateLoadingImpl>
|
||||
implements _$$BlogPostStateLoadingImplCopyWith<$Res> {
|
||||
__$$BlogPostStateLoadingImplCopyWithImpl(_$BlogPostStateLoadingImpl _value,
|
||||
$Res Function(_$BlogPostStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$BlogPostStateLoadingImplCopyWithImpl(_$BlogPostStateLoadingImpl _value, $Res Function(_$BlogPostStateLoadingImpl) _then) : super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -228,9 +216,7 @@ class _$BlogPostStateLoadingImpl implements BlogPostStateLoading {
|
||||
|
||||
@override
|
||||
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
|
||||
@@ -317,9 +303,9 @@ abstract class BlogPostStateLoading implements BlogPostState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$BlogPostStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$BlogPostStateLoadedImplCopyWith(_$BlogPostStateLoadedImpl value,
|
||||
$Res Function(_$BlogPostStateLoadedImpl) then) =
|
||||
factory _$$BlogPostStateLoadedImplCopyWith(_$BlogPostStateLoadedImpl value, $Res Function(_$BlogPostStateLoadedImpl) then) =
|
||||
__$$BlogPostStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({BlogPostModel blogPost});
|
||||
|
||||
@@ -327,12 +313,9 @@ abstract class _$$BlogPostStateLoadedImplCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$BlogPostStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateLoadedImpl>
|
||||
class __$$BlogPostStateLoadedImplCopyWithImpl<$Res> extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateLoadedImpl>
|
||||
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')
|
||||
@override
|
||||
@@ -372,10 +355,7 @@ class _$BlogPostStateLoadedImpl implements BlogPostStateLoaded {
|
||||
@override
|
||||
bool operator ==(Object 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
|
||||
@@ -385,8 +365,7 @@ class _$BlogPostStateLoadedImpl implements BlogPostStateLoaded {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$BlogPostStateLoadedImplCopyWith<_$BlogPostStateLoadedImpl> get copyWith =>
|
||||
__$$BlogPostStateLoadedImplCopyWithImpl<_$BlogPostStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
__$$BlogPostStateLoadedImplCopyWithImpl<_$BlogPostStateLoadedImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -464,31 +443,27 @@ class _$BlogPostStateLoadedImpl implements BlogPostStateLoaded {
|
||||
}
|
||||
|
||||
abstract class BlogPostStateLoaded implements BlogPostState {
|
||||
const factory BlogPostStateLoaded({required final BlogPostModel blogPost}) =
|
||||
_$BlogPostStateLoadedImpl;
|
||||
const factory BlogPostStateLoaded({required final BlogPostModel blogPost}) = _$BlogPostStateLoadedImpl;
|
||||
|
||||
BlogPostModel get blogPost;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
_$$BlogPostStateLoadedImplCopyWith<_$BlogPostStateLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$BlogPostStateLoadedImplCopyWith<_$BlogPostStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$BlogPostStateErrorImplCopyWith<$Res> {
|
||||
factory _$$BlogPostStateErrorImplCopyWith(_$BlogPostStateErrorImpl value,
|
||||
$Res Function(_$BlogPostStateErrorImpl) then) =
|
||||
factory _$$BlogPostStateErrorImplCopyWith(_$BlogPostStateErrorImpl value, $Res Function(_$BlogPostStateErrorImpl) then) =
|
||||
__$$BlogPostStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$BlogPostStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateErrorImpl>
|
||||
class __$$BlogPostStateErrorImplCopyWithImpl<$Res> extends _$BlogPostStateCopyWithImpl<$Res, _$BlogPostStateErrorImpl>
|
||||
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')
|
||||
@override
|
||||
@@ -522,8 +497,7 @@ class _$BlogPostStateErrorImpl implements BlogPostStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$BlogPostStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -533,8 +507,7 @@ class _$BlogPostStateErrorImpl implements BlogPostStateError {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$BlogPostStateErrorImplCopyWith<_$BlogPostStateErrorImpl> get copyWith =>
|
||||
__$$BlogPostStateErrorImplCopyWithImpl<_$BlogPostStateErrorImpl>(
|
||||
this, _$identity);
|
||||
__$$BlogPostStateErrorImplCopyWithImpl<_$BlogPostStateErrorImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -612,11 +585,10 @@ class _$BlogPostStateErrorImpl implements BlogPostStateError {
|
||||
}
|
||||
|
||||
abstract class BlogPostStateError implements BlogPostState {
|
||||
const factory BlogPostStateError({required final String errorMessage}) =
|
||||
_$BlogPostStateErrorImpl;
|
||||
const factory BlogPostStateError({required final String errorMessage}) = _$BlogPostStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
_$$BlogPostStateErrorImplCopyWith<_$BlogPostStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$BlogPostStateErrorImplCopyWith<_$BlogPostStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ class BlogPostScreen extends StatelessWidget {
|
||||
final String blogPostID;
|
||||
|
||||
const BlogPostScreen({super.key, required this.blogPostID});
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
return BlocProvider<BlogPostCubit>(
|
||||
create: (context) => sl<BlogPostCubit>()..loadBlogPost(blogPostID),
|
||||
|
||||
@@ -24,31 +24,28 @@ class _BlogPostService implements BlogPostService {
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
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',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/blogPosts/show/${id}',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/blogPosts/show/${id}',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
final _value = BlogPostModel.fromJson(_result.data!);
|
||||
return _value;
|
||||
}
|
||||
|
||||
RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
|
||||
if (T != dynamic &&
|
||||
!(requestOptions.responseType == ResponseType.bytes ||
|
||||
requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T != dynamic && !(requestOptions.responseType == ResponseType.bytes || requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T == String) {
|
||||
requestOptions.responseType = ResponseType.plain;
|
||||
} else {
|
||||
|
||||
@@ -18,4 +18,4 @@ class BlogRepository {
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
@@ -13,4 +13,4 @@ abstract class BlogService {
|
||||
Future<BlogPostCreateCredentialsModel> createBlogPost(
|
||||
BlogPostCreateCredentialsModel model);
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
@@ -24,6 +24,7 @@ mixin _$NewMessagesState {
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
@@ -70,36 +71,30 @@ mixin _$NewMessagesState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $NewMessagesStateCopyWith<$Res> {
|
||||
factory $NewMessagesStateCopyWith(
|
||||
NewMessagesState value, $Res Function(NewMessagesState) then) =
|
||||
_$NewMessagesStateCopyWithImpl<$Res, NewMessagesState>;
|
||||
factory $NewMessagesStateCopyWith(NewMessagesState value, $Res Function(NewMessagesState) then) = _$NewMessagesStateCopyWithImpl<$Res, NewMessagesState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$NewMessagesStateCopyWithImpl<$Res, $Val extends NewMessagesState>
|
||||
implements $NewMessagesStateCopyWith<$Res> {
|
||||
class _$NewMessagesStateCopyWithImpl<$Res, $Val extends NewMessagesState> implements $NewMessagesStateCopyWith<$Res> {
|
||||
_$NewMessagesStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NewMessagesStateImplCopyWith<$Res> {
|
||||
factory _$$NewMessagesStateImplCopyWith(_$NewMessagesStateImpl value,
|
||||
$Res Function(_$NewMessagesStateImpl) then) =
|
||||
factory _$$NewMessagesStateImplCopyWith(_$NewMessagesStateImpl value, $Res Function(_$NewMessagesStateImpl) then) =
|
||||
__$$NewMessagesStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NewMessagesStateImplCopyWithImpl<$Res>
|
||||
extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateImpl>
|
||||
class __$$NewMessagesStateImplCopyWithImpl<$Res> extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateImpl>
|
||||
implements _$$NewMessagesStateImplCopyWith<$Res> {
|
||||
__$$NewMessagesStateImplCopyWithImpl(_$NewMessagesStateImpl _value,
|
||||
$Res Function(_$NewMessagesStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$NewMessagesStateImplCopyWithImpl(_$NewMessagesStateImpl _value, $Res Function(_$NewMessagesStateImpl) _then) : super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -114,8 +109,7 @@ class _$NewMessagesStateImpl implements _NewMessagesState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$NewMessagesStateImpl);
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$NewMessagesStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -202,19 +196,14 @@ abstract class _NewMessagesState implements NewMessagesState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NewMessagesStateEmptyImplCopyWith<$Res> {
|
||||
factory _$$NewMessagesStateEmptyImplCopyWith(
|
||||
_$NewMessagesStateEmptyImpl value,
|
||||
$Res Function(_$NewMessagesStateEmptyImpl) then) =
|
||||
factory _$$NewMessagesStateEmptyImplCopyWith(_$NewMessagesStateEmptyImpl value, $Res Function(_$NewMessagesStateEmptyImpl) then) =
|
||||
__$$NewMessagesStateEmptyImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NewMessagesStateEmptyImplCopyWithImpl<$Res>
|
||||
extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateEmptyImpl>
|
||||
class __$$NewMessagesStateEmptyImplCopyWithImpl<$Res> extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateEmptyImpl>
|
||||
implements _$$NewMessagesStateEmptyImplCopyWith<$Res> {
|
||||
__$$NewMessagesStateEmptyImplCopyWithImpl(_$NewMessagesStateEmptyImpl _value,
|
||||
$Res Function(_$NewMessagesStateEmptyImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$NewMessagesStateEmptyImplCopyWithImpl(_$NewMessagesStateEmptyImpl _value, $Res Function(_$NewMessagesStateEmptyImpl) _then) : super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -229,9 +218,7 @@ class _$NewMessagesStateEmptyImpl implements NewMessagesStateEmpty {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$NewMessagesStateEmptyImpl);
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$NewMessagesStateEmptyImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -318,22 +305,17 @@ abstract class NewMessagesStateEmpty implements NewMessagesState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NewMessagesStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$NewMessagesStateLoadedImplCopyWith(
|
||||
_$NewMessagesStateLoadedImpl value,
|
||||
$Res Function(_$NewMessagesStateLoadedImpl) then) =
|
||||
factory _$$NewMessagesStateLoadedImplCopyWith(_$NewMessagesStateLoadedImpl value, $Res Function(_$NewMessagesStateLoadedImpl) then) =
|
||||
__$$NewMessagesStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({int messagesCount});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NewMessagesStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateLoadedImpl>
|
||||
class __$$NewMessagesStateLoadedImplCopyWithImpl<$Res> extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateLoadedImpl>
|
||||
implements _$$NewMessagesStateLoadedImplCopyWith<$Res> {
|
||||
__$$NewMessagesStateLoadedImplCopyWithImpl(
|
||||
_$NewMessagesStateLoadedImpl _value,
|
||||
$Res Function(_$NewMessagesStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$NewMessagesStateLoadedImplCopyWithImpl(_$NewMessagesStateLoadedImpl _value, $Res Function(_$NewMessagesStateLoadedImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -367,8 +349,7 @@ class _$NewMessagesStateLoadedImpl implements NewMessagesStateLoaded {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$NewMessagesStateLoadedImpl &&
|
||||
(identical(other.messagesCount, messagesCount) ||
|
||||
other.messagesCount == messagesCount));
|
||||
(identical(other.messagesCount, messagesCount) || other.messagesCount == messagesCount));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -377,9 +358,8 @@ class _$NewMessagesStateLoadedImpl implements NewMessagesStateLoaded {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl>
|
||||
get copyWith => __$$NewMessagesStateLoadedImplCopyWithImpl<
|
||||
_$NewMessagesStateLoadedImpl>(this, _$identity);
|
||||
_$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl> get copyWith =>
|
||||
__$$NewMessagesStateLoadedImplCopyWithImpl<_$NewMessagesStateLoadedImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -457,32 +437,27 @@ class _$NewMessagesStateLoadedImpl implements NewMessagesStateLoaded {
|
||||
}
|
||||
|
||||
abstract class NewMessagesStateLoaded implements NewMessagesState {
|
||||
const factory NewMessagesStateLoaded({required final int messagesCount}) =
|
||||
_$NewMessagesStateLoadedImpl;
|
||||
const factory NewMessagesStateLoaded({required final int messagesCount}) = _$NewMessagesStateLoadedImpl;
|
||||
|
||||
int get messagesCount;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
_$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
_$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NewMessagesStateErrorImplCopyWith<$Res> {
|
||||
factory _$$NewMessagesStateErrorImplCopyWith(
|
||||
_$NewMessagesStateErrorImpl value,
|
||||
$Res Function(_$NewMessagesStateErrorImpl) then) =
|
||||
factory _$$NewMessagesStateErrorImplCopyWith(_$NewMessagesStateErrorImpl value, $Res Function(_$NewMessagesStateErrorImpl) then) =
|
||||
__$$NewMessagesStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NewMessagesStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateErrorImpl>
|
||||
class __$$NewMessagesStateErrorImplCopyWithImpl<$Res> extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateErrorImpl>
|
||||
implements _$$NewMessagesStateErrorImplCopyWith<$Res> {
|
||||
__$$NewMessagesStateErrorImplCopyWithImpl(_$NewMessagesStateErrorImpl _value,
|
||||
$Res Function(_$NewMessagesStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$NewMessagesStateErrorImplCopyWithImpl(_$NewMessagesStateErrorImpl _value, $Res Function(_$NewMessagesStateErrorImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -516,8 +491,7 @@ class _$NewMessagesStateErrorImpl implements NewMessagesStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$NewMessagesStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -526,9 +500,8 @@ class _$NewMessagesStateErrorImpl implements NewMessagesStateError {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl>
|
||||
get copyWith => __$$NewMessagesStateErrorImplCopyWithImpl<
|
||||
_$NewMessagesStateErrorImpl>(this, _$identity);
|
||||
_$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl> get copyWith =>
|
||||
__$$NewMessagesStateErrorImplCopyWithImpl<_$NewMessagesStateErrorImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -606,11 +579,10 @@ class _$NewMessagesStateErrorImpl implements NewMessagesStateError {
|
||||
}
|
||||
|
||||
abstract class NewMessagesStateError implements NewMessagesState {
|
||||
const factory NewMessagesStateError({required final String errorMessage}) =
|
||||
_$NewMessagesStateErrorImpl;
|
||||
const factory NewMessagesStateError({required final String errorMessage}) = _$NewMessagesStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
_$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
_$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ mixin _$NotificationsState {
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
@@ -70,36 +71,31 @@ mixin _$NotificationsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $NotificationsStateCopyWith<$Res> {
|
||||
factory $NotificationsStateCopyWith(
|
||||
NotificationsState value, $Res Function(NotificationsState) then) =
|
||||
factory $NotificationsStateCopyWith(NotificationsState value, $Res Function(NotificationsState) then) =
|
||||
_$NotificationsStateCopyWithImpl<$Res, NotificationsState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$NotificationsStateCopyWithImpl<$Res, $Val extends NotificationsState>
|
||||
implements $NotificationsStateCopyWith<$Res> {
|
||||
class _$NotificationsStateCopyWithImpl<$Res, $Val extends NotificationsState> implements $NotificationsStateCopyWith<$Res> {
|
||||
_$NotificationsStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NotificationsStateImplCopyWith<$Res> {
|
||||
factory _$$NotificationsStateImplCopyWith(_$NotificationsStateImpl value,
|
||||
$Res Function(_$NotificationsStateImpl) then) =
|
||||
factory _$$NotificationsStateImplCopyWith(_$NotificationsStateImpl value, $Res Function(_$NotificationsStateImpl) then) =
|
||||
__$$NotificationsStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NotificationsStateImplCopyWithImpl<$Res>
|
||||
extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateImpl>
|
||||
class __$$NotificationsStateImplCopyWithImpl<$Res> extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateImpl>
|
||||
implements _$$NotificationsStateImplCopyWith<$Res> {
|
||||
__$$NotificationsStateImplCopyWithImpl(_$NotificationsStateImpl _value,
|
||||
$Res Function(_$NotificationsStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$NotificationsStateImplCopyWithImpl(_$NotificationsStateImpl _value, $Res Function(_$NotificationsStateImpl) _then) : super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -114,8 +110,7 @@ class _$NotificationsStateImpl implements _NotificationsState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$NotificationsStateImpl);
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$NotificationsStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -202,21 +197,14 @@ abstract class _NotificationsState implements NotificationsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NotificationsStateEmptyImplCopyWith<$Res> {
|
||||
factory _$$NotificationsStateEmptyImplCopyWith(
|
||||
_$NotificationsStateEmptyImpl value,
|
||||
$Res Function(_$NotificationsStateEmptyImpl) then) =
|
||||
factory _$$NotificationsStateEmptyImplCopyWith(_$NotificationsStateEmptyImpl value, $Res Function(_$NotificationsStateEmptyImpl) then) =
|
||||
__$$NotificationsStateEmptyImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NotificationsStateEmptyImplCopyWithImpl<$Res>
|
||||
extends _$NotificationsStateCopyWithImpl<$Res,
|
||||
_$NotificationsStateEmptyImpl>
|
||||
class __$$NotificationsStateEmptyImplCopyWithImpl<$Res> extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateEmptyImpl>
|
||||
implements _$$NotificationsStateEmptyImplCopyWith<$Res> {
|
||||
__$$NotificationsStateEmptyImplCopyWithImpl(
|
||||
_$NotificationsStateEmptyImpl _value,
|
||||
$Res Function(_$NotificationsStateEmptyImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$NotificationsStateEmptyImplCopyWithImpl(_$NotificationsStateEmptyImpl _value, $Res Function(_$NotificationsStateEmptyImpl) _then) : super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -231,9 +219,7 @@ class _$NotificationsStateEmptyImpl implements NotificationsStateEmpty {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$NotificationsStateEmptyImpl);
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$NotificationsStateEmptyImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -320,22 +306,17 @@ abstract class NotificationsStateEmpty implements NotificationsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NotificationsStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$NotificationsStateLoadedImplCopyWith(
|
||||
_$NotificationsStateLoadedImpl value,
|
||||
$Res Function(_$NotificationsStateLoadedImpl) then) =
|
||||
factory _$$NotificationsStateLoadedImplCopyWith(_$NotificationsStateLoadedImpl value, $Res Function(_$NotificationsStateLoadedImpl) then) =
|
||||
__$$NotificationsStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({int notificationsCount});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NotificationsStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$NotificationsStateCopyWithImpl<$Res,
|
||||
_$NotificationsStateLoadedImpl>
|
||||
class __$$NotificationsStateLoadedImplCopyWithImpl<$Res> extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateLoadedImpl>
|
||||
implements _$$NotificationsStateLoadedImplCopyWith<$Res> {
|
||||
__$$NotificationsStateLoadedImplCopyWithImpl(
|
||||
_$NotificationsStateLoadedImpl _value,
|
||||
$Res Function(_$NotificationsStateLoadedImpl) _then)
|
||||
__$$NotificationsStateLoadedImplCopyWithImpl(_$NotificationsStateLoadedImpl _value, $Res Function(_$NotificationsStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@@ -370,8 +351,7 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$NotificationsStateLoadedImpl &&
|
||||
(identical(other.notificationsCount, notificationsCount) ||
|
||||
other.notificationsCount == notificationsCount));
|
||||
(identical(other.notificationsCount, notificationsCount) || other.notificationsCount == notificationsCount));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -380,9 +360,8 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl>
|
||||
get copyWith => __$$NotificationsStateLoadedImplCopyWithImpl<
|
||||
_$NotificationsStateLoadedImpl>(this, _$identity);
|
||||
_$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl> get copyWith =>
|
||||
__$$NotificationsStateLoadedImplCopyWithImpl<_$NotificationsStateLoadedImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -460,34 +439,27 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
|
||||
}
|
||||
|
||||
abstract class NotificationsStateLoaded implements NotificationsState {
|
||||
const factory NotificationsStateLoaded(
|
||||
{required final int notificationsCount}) = _$NotificationsStateLoadedImpl;
|
||||
const factory NotificationsStateLoaded({required final int notificationsCount}) = _$NotificationsStateLoadedImpl;
|
||||
|
||||
int get notificationsCount;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
_$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
_$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NotificationsStateErrorImplCopyWith<$Res> {
|
||||
factory _$$NotificationsStateErrorImplCopyWith(
|
||||
_$NotificationsStateErrorImpl value,
|
||||
$Res Function(_$NotificationsStateErrorImpl) then) =
|
||||
factory _$$NotificationsStateErrorImplCopyWith(_$NotificationsStateErrorImpl value, $Res Function(_$NotificationsStateErrorImpl) then) =
|
||||
__$$NotificationsStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NotificationsStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$NotificationsStateCopyWithImpl<$Res,
|
||||
_$NotificationsStateErrorImpl>
|
||||
class __$$NotificationsStateErrorImplCopyWithImpl<$Res> extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateErrorImpl>
|
||||
implements _$$NotificationsStateErrorImplCopyWith<$Res> {
|
||||
__$$NotificationsStateErrorImplCopyWithImpl(
|
||||
_$NotificationsStateErrorImpl _value,
|
||||
$Res Function(_$NotificationsStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$NotificationsStateErrorImplCopyWithImpl(_$NotificationsStateErrorImpl _value, $Res Function(_$NotificationsStateErrorImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -521,8 +493,7 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$NotificationsStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -531,9 +502,8 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl>
|
||||
get copyWith => __$$NotificationsStateErrorImplCopyWithImpl<
|
||||
_$NotificationsStateErrorImpl>(this, _$identity);
|
||||
_$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl> get copyWith =>
|
||||
__$$NotificationsStateErrorImplCopyWithImpl<_$NotificationsStateErrorImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -611,11 +581,10 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
|
||||
}
|
||||
|
||||
abstract class NotificationsStateError implements NotificationsState {
|
||||
const factory NotificationsStateError({required final String errorMessage}) =
|
||||
_$NotificationsStateErrorImpl;
|
||||
const factory NotificationsStateError({required final String errorMessage}) = _$NotificationsStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
_$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
_$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -21,25 +21,28 @@ ChatMessageModel _$ChatMessageModelFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$ChatMessageModel {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get data => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'media_data')
|
||||
List<dynamic>? get mediaData => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'author_id')
|
||||
int get authorId => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'updated_at')
|
||||
String get updatedAt => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$ChatMessageModelCopyWith<ChatMessageModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$ChatMessageModelCopyWith<ChatMessageModel> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatMessageModelCopyWith<$Res> {
|
||||
factory $ChatMessageModelCopyWith(
|
||||
ChatMessageModel value, $Res Function(ChatMessageModel) then) =
|
||||
_$ChatMessageModelCopyWithImpl<$Res, ChatMessageModel>;
|
||||
factory $ChatMessageModelCopyWith(ChatMessageModel value, $Res Function(ChatMessageModel) then) = _$ChatMessageModelCopyWithImpl<$Res, ChatMessageModel>;
|
||||
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
@@ -50,12 +53,12 @@ abstract class $ChatMessageModelCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatMessageModelCopyWithImpl<$Res, $Val extends ChatMessageModel>
|
||||
implements $ChatMessageModelCopyWith<$Res> {
|
||||
class _$ChatMessageModelCopyWithImpl<$Res, $Val extends ChatMessageModel> implements $ChatMessageModelCopyWith<$Res> {
|
||||
_$ChatMessageModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -94,11 +97,10 @@ class _$ChatMessageModelCopyWithImpl<$Res, $Val extends ChatMessageModel>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatMessageModelImplCopyWith<$Res>
|
||||
implements $ChatMessageModelCopyWith<$Res> {
|
||||
factory _$$ChatMessageModelImplCopyWith(_$ChatMessageModelImpl value,
|
||||
$Res Function(_$ChatMessageModelImpl) then) =
|
||||
abstract class _$$ChatMessageModelImplCopyWith<$Res> implements $ChatMessageModelCopyWith<$Res> {
|
||||
factory _$$ChatMessageModelImplCopyWith(_$ChatMessageModelImpl value, $Res Function(_$ChatMessageModelImpl) then) =
|
||||
__$$ChatMessageModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -110,12 +112,9 @@ abstract class _$$ChatMessageModelImplCopyWith<$Res>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatMessageModelImplCopyWithImpl<$Res>
|
||||
extends _$ChatMessageModelCopyWithImpl<$Res, _$ChatMessageModelImpl>
|
||||
class __$$ChatMessageModelImplCopyWithImpl<$Res> extends _$ChatMessageModelCopyWithImpl<$Res, _$ChatMessageModelImpl>
|
||||
implements _$$ChatMessageModelImplCopyWith<$Res> {
|
||||
__$$ChatMessageModelImplCopyWithImpl(_$ChatMessageModelImpl _value,
|
||||
$Res Function(_$ChatMessageModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$ChatMessageModelImplCopyWithImpl(_$ChatMessageModelImpl _value, $Res Function(_$ChatMessageModelImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -162,14 +161,14 @@ class _$ChatMessageModelImpl implements _ChatMessageModel {
|
||||
@JsonKey(name: 'updated_at') required this.updatedAt})
|
||||
: _mediaData = mediaData;
|
||||
|
||||
factory _$ChatMessageModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatMessageModelImplFromJson(json);
|
||||
factory _$ChatMessageModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatMessageModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@override
|
||||
final String data;
|
||||
final List<dynamic>? _mediaData;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'media_data')
|
||||
List<dynamic>? get mediaData {
|
||||
@@ -199,25 +198,19 @@ class _$ChatMessageModelImpl implements _ChatMessageModel {
|
||||
other is _$ChatMessageModelImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.data, data) || other.data == data) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._mediaData, _mediaData) &&
|
||||
(identical(other.authorId, authorId) ||
|
||||
other.authorId == authorId) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt));
|
||||
const DeepCollectionEquality().equals(other._mediaData, _mediaData) &&
|
||||
(identical(other.authorId, authorId) || other.authorId == authorId) &&
|
||||
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@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)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith =>
|
||||
__$$ChatMessageModelImplCopyWithImpl<_$ChatMessageModelImpl>(
|
||||
this, _$identity);
|
||||
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith => __$$ChatMessageModelImplCopyWithImpl<_$ChatMessageModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -229,31 +222,33 @@ class _$ChatMessageModelImpl implements _ChatMessageModel {
|
||||
|
||||
abstract class _ChatMessageModel implements ChatMessageModel {
|
||||
const factory _ChatMessageModel(
|
||||
{required final int id,
|
||||
required final String data,
|
||||
@JsonKey(name: 'media_data') required final List<dynamic>? mediaData,
|
||||
@JsonKey(name: 'author_id') required final int authorId,
|
||||
@JsonKey(name: 'updated_at') required final String updatedAt}) =
|
||||
_$ChatMessageModelImpl;
|
||||
{required final int id,
|
||||
required final String data,
|
||||
@JsonKey(name: 'media_data') required final List<dynamic>? mediaData,
|
||||
@JsonKey(name: 'author_id') required final int authorId,
|
||||
@JsonKey(name: 'updated_at') required final String updatedAt}) = _$ChatMessageModelImpl;
|
||||
|
||||
factory _ChatMessageModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatMessageModelImpl.fromJson;
|
||||
factory _ChatMessageModel.fromJson(Map<String, dynamic> json) = _$ChatMessageModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
String get data;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'media_data')
|
||||
List<dynamic>? get mediaData;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'author_id')
|
||||
int get authorId;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'updated_at')
|
||||
String get updatedAt;
|
||||
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,9 +6,7 @@ part of 'chat_message_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatMessageModelImpl _$$ChatMessageModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ChatMessageModelImpl(
|
||||
_$ChatMessageModelImpl _$$ChatMessageModelImplFromJson(Map<String, dynamic> json) => _$ChatMessageModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
data: json['data'] as String,
|
||||
mediaData: json['media_data'] as List<dynamic>?,
|
||||
@@ -16,9 +14,7 @@ _$ChatMessageModelImpl _$$ChatMessageModelImplFromJson(
|
||||
updatedAt: json['updated_at'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatMessageModelImplToJson(
|
||||
_$ChatMessageModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$$ChatMessageModelImplToJson(_$ChatMessageModelImpl instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'data': instance.data,
|
||||
'media_data': instance.mediaData,
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'package:eatvio_app/features/chat/models/chat_meta_model.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'chat_messages_model.freezed.dart';
|
||||
|
||||
part 'chat_messages_model.g.dart';
|
||||
|
||||
@freezed
|
||||
|
||||
@@ -22,34 +22,32 @@ ChatMessagesModel _$ChatMessagesModelFromJson(Map<String, dynamic> json) {
|
||||
mixin _$ChatMessagesModel {
|
||||
@JsonKey(name: 'data')
|
||||
List<ChatMessageModel> get messagesList => throw _privateConstructorUsedError;
|
||||
|
||||
ChatMetaModel get meta => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$ChatMessagesModelCopyWith<ChatMessagesModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$ChatMessagesModelCopyWith<ChatMessagesModel> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatMessagesModelCopyWith<$Res> {
|
||||
factory $ChatMessagesModelCopyWith(
|
||||
ChatMessagesModel value, $Res Function(ChatMessagesModel) then) =
|
||||
_$ChatMessagesModelCopyWithImpl<$Res, ChatMessagesModel>;
|
||||
factory $ChatMessagesModelCopyWith(ChatMessagesModel value, $Res Function(ChatMessagesModel) then) = _$ChatMessagesModelCopyWithImpl<$Res, ChatMessagesModel>;
|
||||
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: 'data') List<ChatMessageModel> messagesList,
|
||||
ChatMetaModel meta});
|
||||
$Res call({@JsonKey(name: 'data') List<ChatMessageModel> messagesList, ChatMetaModel meta});
|
||||
|
||||
$ChatMetaModelCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatMessagesModelCopyWithImpl<$Res, $Val extends ChatMessagesModel>
|
||||
implements $ChatMessagesModelCopyWith<$Res> {
|
||||
class _$ChatMessagesModelCopyWithImpl<$Res, $Val extends ChatMessagesModel> implements $ChatMessagesModelCopyWith<$Res> {
|
||||
_$ChatMessagesModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -81,28 +79,22 @@ class _$ChatMessagesModelCopyWithImpl<$Res, $Val extends ChatMessagesModel>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatMessagesModelImplCopyWith<$Res>
|
||||
implements $ChatMessagesModelCopyWith<$Res> {
|
||||
factory _$$ChatMessagesModelImplCopyWith(_$ChatMessagesModelImpl value,
|
||||
$Res Function(_$ChatMessagesModelImpl) then) =
|
||||
abstract class _$$ChatMessagesModelImplCopyWith<$Res> implements $ChatMessagesModelCopyWith<$Res> {
|
||||
factory _$$ChatMessagesModelImplCopyWith(_$ChatMessagesModelImpl value, $Res Function(_$ChatMessagesModelImpl) then) =
|
||||
__$$ChatMessagesModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: 'data') List<ChatMessageModel> messagesList,
|
||||
ChatMetaModel meta});
|
||||
$Res call({@JsonKey(name: 'data') List<ChatMessageModel> messagesList, ChatMetaModel meta});
|
||||
|
||||
@override
|
||||
$ChatMetaModelCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatMessagesModelImplCopyWithImpl<$Res>
|
||||
extends _$ChatMessagesModelCopyWithImpl<$Res, _$ChatMessagesModelImpl>
|
||||
class __$$ChatMessagesModelImplCopyWithImpl<$Res> extends _$ChatMessagesModelCopyWithImpl<$Res, _$ChatMessagesModelImpl>
|
||||
implements _$$ChatMessagesModelImplCopyWith<$Res> {
|
||||
__$$ChatMessagesModelImplCopyWithImpl(_$ChatMessagesModelImpl _value,
|
||||
$Res Function(_$ChatMessagesModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$ChatMessagesModelImplCopyWithImpl(_$ChatMessagesModelImpl _value, $Res Function(_$ChatMessagesModelImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -126,16 +118,12 @@ class __$$ChatMessagesModelImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$ChatMessagesModelImpl implements _ChatMessagesModel {
|
||||
const _$ChatMessagesModelImpl(
|
||||
{@JsonKey(name: 'data')
|
||||
required final List<ChatMessageModel> messagesList,
|
||||
required this.meta})
|
||||
: _messagesList = messagesList;
|
||||
const _$ChatMessagesModelImpl({@JsonKey(name: 'data') required final List<ChatMessageModel> messagesList, required this.meta}) : _messagesList = messagesList;
|
||||
|
||||
factory _$ChatMessagesModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatMessagesModelImplFromJson(json);
|
||||
factory _$ChatMessagesModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatMessagesModelImplFromJson(json);
|
||||
|
||||
final List<ChatMessageModel> _messagesList;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'data')
|
||||
List<ChatMessageModel> get messagesList {
|
||||
@@ -157,22 +145,18 @@ class _$ChatMessagesModelImpl implements _ChatMessagesModel {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatMessagesModelImpl &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._messagesList, _messagesList) &&
|
||||
const DeepCollectionEquality().equals(other._messagesList, _messagesList) &&
|
||||
(identical(other.meta, meta) || other.meta == meta));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@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)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith =>
|
||||
__$$ChatMessagesModelImplCopyWithImpl<_$ChatMessagesModelImpl>(
|
||||
this, _$identity);
|
||||
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith => __$$ChatMessagesModelImplCopyWithImpl<_$ChatMessagesModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -183,21 +167,19 @@ class _$ChatMessagesModelImpl implements _ChatMessagesModel {
|
||||
}
|
||||
|
||||
abstract class _ChatMessagesModel implements ChatMessagesModel {
|
||||
const factory _ChatMessagesModel(
|
||||
{@JsonKey(name: 'data')
|
||||
required final List<ChatMessageModel> messagesList,
|
||||
required final ChatMetaModel meta}) = _$ChatMessagesModelImpl;
|
||||
const factory _ChatMessagesModel({@JsonKey(name: 'data') required final List<ChatMessageModel> messagesList, required final ChatMetaModel meta}) =
|
||||
_$ChatMessagesModelImpl;
|
||||
|
||||
factory _ChatMessagesModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatMessagesModelImpl.fromJson;
|
||||
factory _ChatMessagesModel.fromJson(Map<String, dynamic> json) = _$ChatMessagesModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'data')
|
||||
List<ChatMessageModel> get messagesList;
|
||||
|
||||
@override
|
||||
ChatMetaModel get meta;
|
||||
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,18 +6,12 @@ part of 'chat_messages_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatMessagesModelImpl _$$ChatMessagesModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ChatMessagesModelImpl(
|
||||
messagesList: (json['data'] as List<dynamic>)
|
||||
.map((e) => ChatMessageModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
_$ChatMessagesModelImpl _$$ChatMessagesModelImplFromJson(Map<String, dynamic> json) => _$ChatMessagesModelImpl(
|
||||
messagesList: (json['data'] as List<dynamic>).map((e) => ChatMessageModel.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
meta: ChatMetaModel.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatMessagesModelImplToJson(
|
||||
_$ChatMessagesModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$$ChatMessagesModelImplToJson(_$ChatMessagesModelImpl instance) => <String, dynamic>{
|
||||
'data': instance.messagesList,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
@@ -24,27 +24,26 @@ mixin _$ChatMetaModel {
|
||||
int get lastPage => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$ChatMetaModelCopyWith<ChatMetaModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$ChatMetaModelCopyWith<ChatMetaModel> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatMetaModelCopyWith<$Res> {
|
||||
factory $ChatMetaModelCopyWith(
|
||||
ChatMetaModel value, $Res Function(ChatMetaModel) then) =
|
||||
_$ChatMetaModelCopyWithImpl<$Res, ChatMetaModel>;
|
||||
factory $ChatMetaModelCopyWith(ChatMetaModel value, $Res Function(ChatMetaModel) then) = _$ChatMetaModelCopyWithImpl<$Res, ChatMetaModel>;
|
||||
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "last_page") int lastPage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatMetaModelCopyWithImpl<$Res, $Val extends ChatMetaModel>
|
||||
implements $ChatMetaModelCopyWith<$Res> {
|
||||
class _$ChatMetaModelCopyWithImpl<$Res, $Val extends ChatMetaModel> implements $ChatMetaModelCopyWith<$Res> {
|
||||
_$ChatMetaModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -63,23 +62,17 @@ class _$ChatMetaModelCopyWithImpl<$Res, $Val extends ChatMetaModel>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatMetaModelImplCopyWith<$Res>
|
||||
implements $ChatMetaModelCopyWith<$Res> {
|
||||
factory _$$ChatMetaModelImplCopyWith(
|
||||
_$ChatMetaModelImpl value, $Res Function(_$ChatMetaModelImpl) then) =
|
||||
__$$ChatMetaModelImplCopyWithImpl<$Res>;
|
||||
abstract class _$$ChatMetaModelImplCopyWith<$Res> implements $ChatMetaModelCopyWith<$Res> {
|
||||
factory _$$ChatMetaModelImplCopyWith(_$ChatMetaModelImpl value, $Res Function(_$ChatMetaModelImpl) then) = __$$ChatMetaModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "last_page") int lastPage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatMetaModelImplCopyWithImpl<$Res>
|
||||
extends _$ChatMetaModelCopyWithImpl<$Res, _$ChatMetaModelImpl>
|
||||
implements _$$ChatMetaModelImplCopyWith<$Res> {
|
||||
__$$ChatMetaModelImplCopyWithImpl(
|
||||
_$ChatMetaModelImpl _value, $Res Function(_$ChatMetaModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$ChatMetaModelImplCopyWithImpl<$Res> extends _$ChatMetaModelCopyWithImpl<$Res, _$ChatMetaModelImpl> implements _$$ChatMetaModelImplCopyWith<$Res> {
|
||||
__$$ChatMetaModelImplCopyWithImpl(_$ChatMetaModelImpl _value, $Res Function(_$ChatMetaModelImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -98,11 +91,9 @@ class __$$ChatMetaModelImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$ChatMetaModelImpl implements _ChatMetaModel {
|
||||
const _$ChatMetaModelImpl(
|
||||
{@JsonKey(name: "last_page") required this.lastPage});
|
||||
const _$ChatMetaModelImpl({@JsonKey(name: "last_page") required this.lastPage});
|
||||
|
||||
factory _$ChatMetaModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatMetaModelImplFromJson(json);
|
||||
factory _$ChatMetaModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatMetaModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "last_page")
|
||||
@@ -116,10 +107,7 @@ class _$ChatMetaModelImpl implements _ChatMetaModel {
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatMetaModelImpl &&
|
||||
(identical(other.lastPage, lastPage) ||
|
||||
other.lastPage == lastPage));
|
||||
(other.runtimeType == runtimeType && other is _$ChatMetaModelImpl && (identical(other.lastPage, lastPage) || other.lastPage == lastPage));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@@ -129,8 +117,7 @@ class _$ChatMetaModelImpl implements _ChatMetaModel {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith =>
|
||||
__$$ChatMetaModelImplCopyWithImpl<_$ChatMetaModelImpl>(this, _$identity);
|
||||
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith => __$$ChatMetaModelImplCopyWithImpl<_$ChatMetaModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -141,18 +128,15 @@ class _$ChatMetaModelImpl implements _ChatMetaModel {
|
||||
}
|
||||
|
||||
abstract class _ChatMetaModel implements ChatMetaModel {
|
||||
const factory _ChatMetaModel(
|
||||
{@JsonKey(name: "last_page") required final int lastPage}) =
|
||||
_$ChatMetaModelImpl;
|
||||
const factory _ChatMetaModel({@JsonKey(name: "last_page") required final int lastPage}) = _$ChatMetaModelImpl;
|
||||
|
||||
factory _ChatMetaModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatMetaModelImpl.fromJson;
|
||||
factory _ChatMetaModel.fromJson(Map<String, dynamic> json) = _$ChatMetaModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "last_page")
|
||||
int get lastPage;
|
||||
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,12 +6,10 @@ part of 'chat_meta_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatMetaModelImpl _$$ChatMetaModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ChatMetaModelImpl(
|
||||
_$ChatMetaModelImpl _$$ChatMetaModelImplFromJson(Map<String, dynamic> json) => _$ChatMetaModelImpl(
|
||||
lastPage: (json['last_page'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatMetaModelImplToJson(_$ChatMetaModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$$ChatMetaModelImplToJson(_$ChatMetaModelImpl instance) => <String, dynamic>{
|
||||
'last_page': instance.lastPage,
|
||||
};
|
||||
|
||||
@@ -21,39 +21,35 @@ ChatRoomModel _$ChatRoomModelFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$ChatRoomModel {
|
||||
String get id => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'chat_room_setting')
|
||||
ChatRoomSettingsModel get chatRoomSettings =>
|
||||
throw _privateConstructorUsedError;
|
||||
ChatRoomSettingsModel get chatRoomSettings => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, ChatUserModel> get users => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$ChatRoomModelCopyWith<ChatRoomModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$ChatRoomModelCopyWith<ChatRoomModel> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatRoomModelCopyWith<$Res> {
|
||||
factory $ChatRoomModelCopyWith(
|
||||
ChatRoomModel value, $Res Function(ChatRoomModel) then) =
|
||||
_$ChatRoomModelCopyWithImpl<$Res, ChatRoomModel>;
|
||||
factory $ChatRoomModelCopyWith(ChatRoomModel value, $Res Function(ChatRoomModel) then) = _$ChatRoomModelCopyWithImpl<$Res, ChatRoomModel>;
|
||||
|
||||
@useResult
|
||||
$Res call(
|
||||
{String id,
|
||||
@JsonKey(name: 'chat_room_setting')
|
||||
ChatRoomSettingsModel chatRoomSettings,
|
||||
Map<String, ChatUserModel> users});
|
||||
$Res call({String id, @JsonKey(name: 'chat_room_setting') ChatRoomSettingsModel chatRoomSettings, Map<String, ChatUserModel> users});
|
||||
|
||||
$ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel>
|
||||
implements $ChatRoomModelCopyWith<$Res> {
|
||||
class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel> implements $ChatRoomModelCopyWith<$Res> {
|
||||
_$ChatRoomModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -83,38 +79,27 @@ class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel>
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings {
|
||||
return $ChatRoomSettingsModelCopyWith<$Res>(_value.chatRoomSettings,
|
||||
(value) {
|
||||
return $ChatRoomSettingsModelCopyWith<$Res>(_value.chatRoomSettings, (value) {
|
||||
return _then(_value.copyWith(chatRoomSettings: value) as $Val);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomModelImplCopyWith<$Res>
|
||||
implements $ChatRoomModelCopyWith<$Res> {
|
||||
factory _$$ChatRoomModelImplCopyWith(
|
||||
_$ChatRoomModelImpl value, $Res Function(_$ChatRoomModelImpl) then) =
|
||||
__$$ChatRoomModelImplCopyWithImpl<$Res>;
|
||||
abstract class _$$ChatRoomModelImplCopyWith<$Res> implements $ChatRoomModelCopyWith<$Res> {
|
||||
factory _$$ChatRoomModelImplCopyWith(_$ChatRoomModelImpl value, $Res Function(_$ChatRoomModelImpl) then) = __$$ChatRoomModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{String id,
|
||||
@JsonKey(name: 'chat_room_setting')
|
||||
ChatRoomSettingsModel chatRoomSettings,
|
||||
Map<String, ChatUserModel> users});
|
||||
$Res call({String id, @JsonKey(name: 'chat_room_setting') ChatRoomSettingsModel chatRoomSettings, Map<String, ChatUserModel> users});
|
||||
|
||||
@override
|
||||
$ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomModelImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomModelCopyWithImpl<$Res, _$ChatRoomModelImpl>
|
||||
implements _$$ChatRoomModelImplCopyWith<$Res> {
|
||||
__$$ChatRoomModelImplCopyWithImpl(
|
||||
_$ChatRoomModelImpl _value, $Res Function(_$ChatRoomModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$ChatRoomModelImplCopyWithImpl<$Res> extends _$ChatRoomModelCopyWithImpl<$Res, _$ChatRoomModelImpl> implements _$$ChatRoomModelImplCopyWith<$Res> {
|
||||
__$$ChatRoomModelImplCopyWithImpl(_$ChatRoomModelImpl _value, $Res Function(_$ChatRoomModelImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -144,13 +129,10 @@ class __$$ChatRoomModelImplCopyWithImpl<$Res>
|
||||
@JsonSerializable()
|
||||
class _$ChatRoomModelImpl implements _ChatRoomModel {
|
||||
const _$ChatRoomModelImpl(
|
||||
{required this.id,
|
||||
@JsonKey(name: 'chat_room_setting') required this.chatRoomSettings,
|
||||
required final Map<String, ChatUserModel> users})
|
||||
{required this.id, @JsonKey(name: 'chat_room_setting') required this.chatRoomSettings, required final Map<String, ChatUserModel> users})
|
||||
: _users = users;
|
||||
|
||||
factory _$ChatRoomModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatRoomModelImplFromJson(json);
|
||||
factory _$ChatRoomModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatRoomModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String id;
|
||||
@@ -158,6 +140,7 @@ class _$ChatRoomModelImpl implements _ChatRoomModel {
|
||||
@JsonKey(name: 'chat_room_setting')
|
||||
final ChatRoomSettingsModel chatRoomSettings;
|
||||
final Map<String, ChatUserModel> _users;
|
||||
|
||||
@override
|
||||
Map<String, ChatUserModel> get users {
|
||||
if (_users is EqualUnmodifiableMapView) return _users;
|
||||
@@ -176,21 +159,18 @@ class _$ChatRoomModelImpl implements _ChatRoomModel {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatRoomModelImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.chatRoomSettings, chatRoomSettings) ||
|
||||
other.chatRoomSettings == chatRoomSettings) &&
|
||||
(identical(other.chatRoomSettings, chatRoomSettings) || other.chatRoomSettings == chatRoomSettings) &&
|
||||
const DeepCollectionEquality().equals(other._users, _users));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@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)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith =>
|
||||
__$$ChatRoomModelImplCopyWithImpl<_$ChatRoomModelImpl>(this, _$identity);
|
||||
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith => __$$ChatRoomModelImplCopyWithImpl<_$ChatRoomModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -203,22 +183,22 @@ class _$ChatRoomModelImpl implements _ChatRoomModel {
|
||||
abstract class _ChatRoomModel implements ChatRoomModel {
|
||||
const factory _ChatRoomModel(
|
||||
{required final String id,
|
||||
@JsonKey(name: 'chat_room_setting')
|
||||
required final ChatRoomSettingsModel chatRoomSettings,
|
||||
@JsonKey(name: 'chat_room_setting') required final ChatRoomSettingsModel chatRoomSettings,
|
||||
required final Map<String, ChatUserModel> users}) = _$ChatRoomModelImpl;
|
||||
|
||||
factory _ChatRoomModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatRoomModelImpl.fromJson;
|
||||
factory _ChatRoomModel.fromJson(Map<String, dynamic> json) = _$ChatRoomModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get id;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'chat_room_setting')
|
||||
ChatRoomSettingsModel get chatRoomSettings;
|
||||
|
||||
@override
|
||||
Map<String, ChatUserModel> get users;
|
||||
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,19 +6,15 @@ part of 'chat_room_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatRoomModelImpl _$$ChatRoomModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ChatRoomModelImpl(
|
||||
_$ChatRoomModelImpl _$$ChatRoomModelImplFromJson(Map<String, dynamic> json) => _$ChatRoomModelImpl(
|
||||
id: json['id'] as String,
|
||||
chatRoomSettings: ChatRoomSettingsModel.fromJson(
|
||||
json['chat_room_setting'] as Map<String, dynamic>),
|
||||
chatRoomSettings: ChatRoomSettingsModel.fromJson(json['chat_room_setting'] as Map<String, dynamic>),
|
||||
users: (json['users'] as Map<String, dynamic>).map(
|
||||
(k, e) =>
|
||||
MapEntry(k, ChatUserModel.fromJson(e as Map<String, dynamic>)),
|
||||
(k, e) => MapEntry(k, ChatUserModel.fromJson(e as Map<String, dynamic>)),
|
||||
),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatRoomModelImplToJson(_$ChatRoomModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$$ChatRoomModelImplToJson(_$ChatRoomModelImpl instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'chat_room_setting': instance.chatRoomSettings,
|
||||
'users': instance.users,
|
||||
|
||||
@@ -14,33 +14,36 @@ T _$identity<T>(T value) => value;
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
ChatRoomSettingsModel _$ChatRoomSettingsModelFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
ChatRoomSettingsModel _$ChatRoomSettingsModelFromJson(Map<String, dynamic> json) {
|
||||
return _ChatRoomSettingsModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$ChatRoomSettingsModel {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'room_name')
|
||||
String get roomName => throw _privateConstructorUsedError;
|
||||
|
||||
String get state => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'access_level')
|
||||
String get accessLevel => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'updated_at')
|
||||
String get updatedAt => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$ChatRoomSettingsModelCopyWith<ChatRoomSettingsModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$ChatRoomSettingsModelCopyWith<ChatRoomSettingsModel> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatRoomSettingsModelCopyWith<$Res> {
|
||||
factory $ChatRoomSettingsModelCopyWith(ChatRoomSettingsModel value,
|
||||
$Res Function(ChatRoomSettingsModel) then) =
|
||||
factory $ChatRoomSettingsModelCopyWith(ChatRoomSettingsModel value, $Res Function(ChatRoomSettingsModel) then) =
|
||||
_$ChatRoomSettingsModelCopyWithImpl<$Res, ChatRoomSettingsModel>;
|
||||
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
@@ -51,13 +54,12 @@ abstract class $ChatRoomSettingsModelCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatRoomSettingsModelCopyWithImpl<$Res,
|
||||
$Val extends ChatRoomSettingsModel>
|
||||
implements $ChatRoomSettingsModelCopyWith<$Res> {
|
||||
class _$ChatRoomSettingsModelCopyWithImpl<$Res, $Val extends ChatRoomSettingsModel> implements $ChatRoomSettingsModelCopyWith<$Res> {
|
||||
_$ChatRoomSettingsModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -96,12 +98,10 @@ class _$ChatRoomSettingsModelCopyWithImpl<$Res,
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomSettingsModelImplCopyWith<$Res>
|
||||
implements $ChatRoomSettingsModelCopyWith<$Res> {
|
||||
factory _$$ChatRoomSettingsModelImplCopyWith(
|
||||
_$ChatRoomSettingsModelImpl value,
|
||||
$Res Function(_$ChatRoomSettingsModelImpl) then) =
|
||||
abstract class _$$ChatRoomSettingsModelImplCopyWith<$Res> implements $ChatRoomSettingsModelCopyWith<$Res> {
|
||||
factory _$$ChatRoomSettingsModelImplCopyWith(_$ChatRoomSettingsModelImpl value, $Res Function(_$ChatRoomSettingsModelImpl) then) =
|
||||
__$$ChatRoomSettingsModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -113,13 +113,9 @@ abstract class _$$ChatRoomSettingsModelImplCopyWith<$Res>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomSettingsModelImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomSettingsModelCopyWithImpl<$Res,
|
||||
_$ChatRoomSettingsModelImpl>
|
||||
class __$$ChatRoomSettingsModelImplCopyWithImpl<$Res> extends _$ChatRoomSettingsModelCopyWithImpl<$Res, _$ChatRoomSettingsModelImpl>
|
||||
implements _$$ChatRoomSettingsModelImplCopyWith<$Res> {
|
||||
__$$ChatRoomSettingsModelImplCopyWithImpl(_$ChatRoomSettingsModelImpl _value,
|
||||
$Res Function(_$ChatRoomSettingsModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$ChatRoomSettingsModelImplCopyWithImpl(_$ChatRoomSettingsModelImpl _value, $Res Function(_$ChatRoomSettingsModelImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -165,8 +161,7 @@ class _$ChatRoomSettingsModelImpl implements _ChatRoomSettingsModel {
|
||||
@JsonKey(name: 'access_level') required this.accessLevel,
|
||||
@JsonKey(name: 'updated_at') required this.updatedAt});
|
||||
|
||||
factory _$ChatRoomSettingsModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatRoomSettingsModelImplFromJson(json);
|
||||
factory _$ChatRoomSettingsModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatRoomSettingsModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -193,26 +188,21 @@ class _$ChatRoomSettingsModelImpl implements _ChatRoomSettingsModel {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatRoomSettingsModelImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.roomName, roomName) ||
|
||||
other.roomName == roomName) &&
|
||||
(identical(other.roomName, roomName) || other.roomName == roomName) &&
|
||||
(identical(other.state, state) || other.state == state) &&
|
||||
(identical(other.accessLevel, accessLevel) ||
|
||||
other.accessLevel == accessLevel) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt));
|
||||
(identical(other.accessLevel, accessLevel) || other.accessLevel == accessLevel) &&
|
||||
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@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)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl>
|
||||
get copyWith => __$$ChatRoomSettingsModelImplCopyWithImpl<
|
||||
_$ChatRoomSettingsModelImpl>(this, _$identity);
|
||||
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl> get copyWith =>
|
||||
__$$ChatRoomSettingsModelImplCopyWithImpl<_$ChatRoomSettingsModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -224,31 +214,33 @@ class _$ChatRoomSettingsModelImpl implements _ChatRoomSettingsModel {
|
||||
|
||||
abstract class _ChatRoomSettingsModel implements ChatRoomSettingsModel {
|
||||
const factory _ChatRoomSettingsModel(
|
||||
{required final int id,
|
||||
@JsonKey(name: 'room_name') required final String roomName,
|
||||
required final String state,
|
||||
@JsonKey(name: 'access_level') required final String accessLevel,
|
||||
@JsonKey(name: 'updated_at') required final String updatedAt}) =
|
||||
_$ChatRoomSettingsModelImpl;
|
||||
{required final int id,
|
||||
@JsonKey(name: 'room_name') required final String roomName,
|
||||
required final String state,
|
||||
@JsonKey(name: 'access_level') required final String accessLevel,
|
||||
@JsonKey(name: 'updated_at') required final String updatedAt}) = _$ChatRoomSettingsModelImpl;
|
||||
|
||||
factory _ChatRoomSettingsModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatRoomSettingsModelImpl.fromJson;
|
||||
factory _ChatRoomSettingsModel.fromJson(Map<String, dynamic> json) = _$ChatRoomSettingsModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'room_name')
|
||||
String get roomName;
|
||||
|
||||
@override
|
||||
String get state;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'access_level')
|
||||
String get accessLevel;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'updated_at')
|
||||
String get updatedAt;
|
||||
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,9 +6,7 @@ part of 'chat_room_settings_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatRoomSettingsModelImpl _$$ChatRoomSettingsModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ChatRoomSettingsModelImpl(
|
||||
_$ChatRoomSettingsModelImpl _$$ChatRoomSettingsModelImplFromJson(Map<String, dynamic> json) => _$ChatRoomSettingsModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
roomName: json['room_name'] as String,
|
||||
state: json['state'] as String,
|
||||
@@ -16,9 +14,7 @@ _$ChatRoomSettingsModelImpl _$$ChatRoomSettingsModelImplFromJson(
|
||||
updatedAt: json['updated_at'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatRoomSettingsModelImplToJson(
|
||||
_$ChatRoomSettingsModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$$ChatRoomSettingsModelImplToJson(_$ChatRoomSettingsModelImpl instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'room_name': instance.roomName,
|
||||
'state': instance.state,
|
||||
|
||||
@@ -21,38 +21,36 @@ ChatUserModel _$ChatUserModelFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$ChatUserModel {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'profile_photo_path')
|
||||
String? get profilePhotoPath => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'profile_photo_url')
|
||||
String? get profilePhotoUrl => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$ChatUserModelCopyWith<ChatUserModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$ChatUserModelCopyWith<ChatUserModel> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatUserModelCopyWith<$Res> {
|
||||
factory $ChatUserModelCopyWith(
|
||||
ChatUserModel value, $Res Function(ChatUserModel) then) =
|
||||
_$ChatUserModelCopyWithImpl<$Res, ChatUserModel>;
|
||||
factory $ChatUserModelCopyWith(ChatUserModel value, $Res Function(ChatUserModel) then) = _$ChatUserModelCopyWithImpl<$Res, ChatUserModel>;
|
||||
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
String name,
|
||||
@JsonKey(name: 'profile_photo_path') String? profilePhotoPath,
|
||||
@JsonKey(name: 'profile_photo_url') String? profilePhotoUrl});
|
||||
$Res call({int id, String name, @JsonKey(name: 'profile_photo_path') String? profilePhotoPath, @JsonKey(name: 'profile_photo_url') String? profilePhotoUrl});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatUserModelCopyWithImpl<$Res, $Val extends ChatUserModel>
|
||||
implements $ChatUserModelCopyWith<$Res> {
|
||||
class _$ChatUserModelCopyWithImpl<$Res, $Val extends ChatUserModel> implements $ChatUserModelCopyWith<$Res> {
|
||||
_$ChatUserModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -86,27 +84,17 @@ class _$ChatUserModelCopyWithImpl<$Res, $Val extends ChatUserModel>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatUserModelImplCopyWith<$Res>
|
||||
implements $ChatUserModelCopyWith<$Res> {
|
||||
factory _$$ChatUserModelImplCopyWith(
|
||||
_$ChatUserModelImpl value, $Res Function(_$ChatUserModelImpl) then) =
|
||||
__$$ChatUserModelImplCopyWithImpl<$Res>;
|
||||
abstract class _$$ChatUserModelImplCopyWith<$Res> implements $ChatUserModelCopyWith<$Res> {
|
||||
factory _$$ChatUserModelImplCopyWith(_$ChatUserModelImpl value, $Res Function(_$ChatUserModelImpl) then) = __$$ChatUserModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
String name,
|
||||
@JsonKey(name: 'profile_photo_path') String? profilePhotoPath,
|
||||
@JsonKey(name: 'profile_photo_url') String? profilePhotoUrl});
|
||||
$Res call({int id, String name, @JsonKey(name: 'profile_photo_path') String? profilePhotoPath, @JsonKey(name: 'profile_photo_url') String? profilePhotoUrl});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatUserModelImplCopyWithImpl<$Res>
|
||||
extends _$ChatUserModelCopyWithImpl<$Res, _$ChatUserModelImpl>
|
||||
implements _$$ChatUserModelImplCopyWith<$Res> {
|
||||
__$$ChatUserModelImplCopyWithImpl(
|
||||
_$ChatUserModelImpl _value, $Res Function(_$ChatUserModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$ChatUserModelImplCopyWithImpl<$Res> extends _$ChatUserModelCopyWithImpl<$Res, _$ChatUserModelImpl> implements _$$ChatUserModelImplCopyWith<$Res> {
|
||||
__$$ChatUserModelImplCopyWithImpl(_$ChatUserModelImpl _value, $Res Function(_$ChatUserModelImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -146,8 +134,7 @@ class _$ChatUserModelImpl implements _ChatUserModel {
|
||||
@JsonKey(name: 'profile_photo_path') this.profilePhotoPath,
|
||||
@JsonKey(name: 'profile_photo_url') this.profilePhotoUrl});
|
||||
|
||||
factory _$ChatUserModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatUserModelImplFromJson(json);
|
||||
factory _$ChatUserModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatUserModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -172,22 +159,18 @@ class _$ChatUserModelImpl implements _ChatUserModel {
|
||||
other is _$ChatUserModelImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
(identical(other.profilePhotoPath, profilePhotoPath) ||
|
||||
other.profilePhotoPath == profilePhotoPath) &&
|
||||
(identical(other.profilePhotoUrl, profilePhotoUrl) ||
|
||||
other.profilePhotoUrl == profilePhotoUrl));
|
||||
(identical(other.profilePhotoPath, profilePhotoPath) || other.profilePhotoPath == profilePhotoPath) &&
|
||||
(identical(other.profilePhotoUrl, profilePhotoUrl) || other.profilePhotoUrl == profilePhotoUrl));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl);
|
||||
int get hashCode => Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith =>
|
||||
__$$ChatUserModelImplCopyWithImpl<_$ChatUserModelImpl>(this, _$identity);
|
||||
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith => __$$ChatUserModelImplCopyWithImpl<_$ChatUserModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -199,27 +182,28 @@ class _$ChatUserModelImpl implements _ChatUserModel {
|
||||
|
||||
abstract class _ChatUserModel implements ChatUserModel {
|
||||
const factory _ChatUserModel(
|
||||
{required final int id,
|
||||
required final String name,
|
||||
@JsonKey(name: 'profile_photo_path') final String? profilePhotoPath,
|
||||
@JsonKey(name: 'profile_photo_url') final String? profilePhotoUrl}) =
|
||||
_$ChatUserModelImpl;
|
||||
{required final int id,
|
||||
required final String name,
|
||||
@JsonKey(name: 'profile_photo_path') final String? profilePhotoPath,
|
||||
@JsonKey(name: 'profile_photo_url') final String? profilePhotoUrl}) = _$ChatUserModelImpl;
|
||||
|
||||
factory _ChatUserModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatUserModelImpl.fromJson;
|
||||
factory _ChatUserModel.fromJson(Map<String, dynamic> json) = _$ChatUserModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
String get name;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'profile_photo_path')
|
||||
String? get profilePhotoPath;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'profile_photo_url')
|
||||
String? get profilePhotoUrl;
|
||||
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,16 +6,14 @@ part of 'chat_user_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatUserModelImpl _$$ChatUserModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ChatUserModelImpl(
|
||||
_$ChatUserModelImpl _$$ChatUserModelImplFromJson(Map<String, dynamic> json) => _$ChatUserModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
name: json['name'] as String,
|
||||
profilePhotoPath: json['profile_photo_path'] as String?,
|
||||
profilePhotoUrl: json['profile_photo_url'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatUserModelImplToJson(_$ChatUserModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$$ChatUserModelImplToJson(_$ChatUserModelImpl instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'profile_photo_path': instance.profilePhotoPath,
|
||||
|
||||
@@ -21,39 +21,38 @@ WebsocketInfoModel _$WebsocketInfoModelFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$WebsocketInfoModel {
|
||||
String get key => throw _privateConstructorUsedError;
|
||||
|
||||
String get host => throw _privateConstructorUsedError;
|
||||
|
||||
String get port => throw _privateConstructorUsedError;
|
||||
|
||||
String get cluster => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'user_id')
|
||||
int get userId => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$WebsocketInfoModelCopyWith<WebsocketInfoModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$WebsocketInfoModelCopyWith<WebsocketInfoModel> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $WebsocketInfoModelCopyWith<$Res> {
|
||||
factory $WebsocketInfoModelCopyWith(
|
||||
WebsocketInfoModel value, $Res Function(WebsocketInfoModel) then) =
|
||||
factory $WebsocketInfoModelCopyWith(WebsocketInfoModel value, $Res Function(WebsocketInfoModel) then) =
|
||||
_$WebsocketInfoModelCopyWithImpl<$Res, WebsocketInfoModel>;
|
||||
|
||||
@useResult
|
||||
$Res call(
|
||||
{String key,
|
||||
String host,
|
||||
String port,
|
||||
String cluster,
|
||||
@JsonKey(name: 'user_id') int userId});
|
||||
$Res call({String key, String host, String port, String cluster, @JsonKey(name: 'user_id') int userId});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$WebsocketInfoModelCopyWithImpl<$Res, $Val extends WebsocketInfoModel>
|
||||
implements $WebsocketInfoModelCopyWith<$Res> {
|
||||
class _$WebsocketInfoModelCopyWithImpl<$Res, $Val extends WebsocketInfoModel> implements $WebsocketInfoModelCopyWith<$Res> {
|
||||
_$WebsocketInfoModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -92,28 +91,19 @@ class _$WebsocketInfoModelCopyWithImpl<$Res, $Val extends WebsocketInfoModel>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$WebsocketInfoModelImplCopyWith<$Res>
|
||||
implements $WebsocketInfoModelCopyWith<$Res> {
|
||||
factory _$$WebsocketInfoModelImplCopyWith(_$WebsocketInfoModelImpl value,
|
||||
$Res Function(_$WebsocketInfoModelImpl) then) =
|
||||
abstract class _$$WebsocketInfoModelImplCopyWith<$Res> implements $WebsocketInfoModelCopyWith<$Res> {
|
||||
factory _$$WebsocketInfoModelImplCopyWith(_$WebsocketInfoModelImpl value, $Res Function(_$WebsocketInfoModelImpl) then) =
|
||||
__$$WebsocketInfoModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{String key,
|
||||
String host,
|
||||
String port,
|
||||
String cluster,
|
||||
@JsonKey(name: 'user_id') int userId});
|
||||
$Res call({String key, String host, String port, String cluster, @JsonKey(name: 'user_id') int userId});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$WebsocketInfoModelImplCopyWithImpl<$Res>
|
||||
extends _$WebsocketInfoModelCopyWithImpl<$Res, _$WebsocketInfoModelImpl>
|
||||
class __$$WebsocketInfoModelImplCopyWithImpl<$Res> extends _$WebsocketInfoModelCopyWithImpl<$Res, _$WebsocketInfoModelImpl>
|
||||
implements _$$WebsocketInfoModelImplCopyWith<$Res> {
|
||||
__$$WebsocketInfoModelImplCopyWithImpl(_$WebsocketInfoModelImpl _value,
|
||||
$Res Function(_$WebsocketInfoModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$WebsocketInfoModelImplCopyWithImpl(_$WebsocketInfoModelImpl _value, $Res Function(_$WebsocketInfoModelImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -153,14 +143,9 @@ class __$$WebsocketInfoModelImplCopyWithImpl<$Res>
|
||||
@JsonSerializable()
|
||||
class _$WebsocketInfoModelImpl implements _WebsocketInfoModel {
|
||||
const _$WebsocketInfoModelImpl(
|
||||
{required this.key,
|
||||
required this.host,
|
||||
required this.port,
|
||||
required this.cluster,
|
||||
@JsonKey(name: 'user_id') required this.userId});
|
||||
{required this.key, required this.host, required this.port, required this.cluster, @JsonKey(name: 'user_id') required this.userId});
|
||||
|
||||
factory _$WebsocketInfoModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$WebsocketInfoModelImplFromJson(json);
|
||||
factory _$WebsocketInfoModelImpl.fromJson(Map<String, dynamic> json) => _$$WebsocketInfoModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String key;
|
||||
@@ -193,15 +178,13 @@ class _$WebsocketInfoModelImpl implements _WebsocketInfoModel {
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@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)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith =>
|
||||
__$$WebsocketInfoModelImplCopyWithImpl<_$WebsocketInfoModelImpl>(
|
||||
this, _$identity);
|
||||
__$$WebsocketInfoModelImplCopyWithImpl<_$WebsocketInfoModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -213,29 +196,31 @@ class _$WebsocketInfoModelImpl implements _WebsocketInfoModel {
|
||||
|
||||
abstract class _WebsocketInfoModel implements WebsocketInfoModel {
|
||||
const factory _WebsocketInfoModel(
|
||||
{required final String key,
|
||||
required final String host,
|
||||
required final String port,
|
||||
required final String cluster,
|
||||
@JsonKey(name: 'user_id') required final int userId}) =
|
||||
_$WebsocketInfoModelImpl;
|
||||
{required final String key,
|
||||
required final String host,
|
||||
required final String port,
|
||||
required final String cluster,
|
||||
@JsonKey(name: 'user_id') required final int userId}) = _$WebsocketInfoModelImpl;
|
||||
|
||||
factory _WebsocketInfoModel.fromJson(Map<String, dynamic> json) =
|
||||
_$WebsocketInfoModelImpl.fromJson;
|
||||
factory _WebsocketInfoModel.fromJson(Map<String, dynamic> json) = _$WebsocketInfoModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get key;
|
||||
|
||||
@override
|
||||
String get host;
|
||||
|
||||
@override
|
||||
String get port;
|
||||
|
||||
@override
|
||||
String get cluster;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'user_id')
|
||||
int get userId;
|
||||
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,9 +6,7 @@ part of 'websocket_info_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$WebsocketInfoModelImpl _$$WebsocketInfoModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$WebsocketInfoModelImpl(
|
||||
_$WebsocketInfoModelImpl _$$WebsocketInfoModelImplFromJson(Map<String, dynamic> json) => _$WebsocketInfoModelImpl(
|
||||
key: json['key'] as String,
|
||||
host: json['host'] as String,
|
||||
port: json['port'] as String,
|
||||
@@ -16,9 +14,7 @@ _$WebsocketInfoModelImpl _$$WebsocketInfoModelImplFromJson(
|
||||
userId: (json['user_id'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$WebsocketInfoModelImplToJson(
|
||||
_$WebsocketInfoModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$$WebsocketInfoModelImplToJson(_$WebsocketInfoModelImpl instance) => <String, dynamic>{
|
||||
'key': instance.key,
|
||||
'host': instance.host,
|
||||
'port': instance.port,
|
||||
|
||||
@@ -20,19 +20,16 @@ mixin _$ChatRoomState {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading) loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@@ -40,9 +37,7 @@ mixin _$ChatRoomState {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
@@ -76,36 +71,28 @@ mixin _$ChatRoomState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatRoomStateCopyWith<$Res> {
|
||||
factory $ChatRoomStateCopyWith(
|
||||
ChatRoomState value, $Res Function(ChatRoomState) then) =
|
||||
_$ChatRoomStateCopyWithImpl<$Res, ChatRoomState>;
|
||||
factory $ChatRoomStateCopyWith(ChatRoomState value, $Res Function(ChatRoomState) then) = _$ChatRoomStateCopyWithImpl<$Res, ChatRoomState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatRoomStateCopyWithImpl<$Res, $Val extends ChatRoomState>
|
||||
implements $ChatRoomStateCopyWith<$Res> {
|
||||
class _$ChatRoomStateCopyWithImpl<$Res, $Val extends ChatRoomState> implements $ChatRoomStateCopyWith<$Res> {
|
||||
_$ChatRoomStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomStateImplCopyWith<$Res> {
|
||||
factory _$$ChatRoomStateImplCopyWith(
|
||||
_$ChatRoomStateImpl value, $Res Function(_$ChatRoomStateImpl) then) =
|
||||
__$$ChatRoomStateImplCopyWithImpl<$Res>;
|
||||
factory _$$ChatRoomStateImplCopyWith(_$ChatRoomStateImpl value, $Res Function(_$ChatRoomStateImpl) then) = __$$ChatRoomStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomStateImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateImpl>
|
||||
implements _$$ChatRoomStateImplCopyWith<$Res> {
|
||||
__$$ChatRoomStateImplCopyWithImpl(
|
||||
_$ChatRoomStateImpl _value, $Res Function(_$ChatRoomStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$ChatRoomStateImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateImpl> implements _$$ChatRoomStateImplCopyWith<$Res> {
|
||||
__$$ChatRoomStateImplCopyWithImpl(_$ChatRoomStateImpl _value, $Res Function(_$ChatRoomStateImpl) _then) : super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -120,8 +107,7 @@ class _$ChatRoomStateImpl implements _ChatRoomState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$ChatRoomStateImpl);
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChatRoomStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -132,9 +118,7 @@ class _$ChatRoomStateImpl implements _ChatRoomState {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading) loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return $default();
|
||||
@@ -145,9 +129,7 @@ class _$ChatRoomStateImpl implements _ChatRoomState {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return $default?.call();
|
||||
@@ -158,9 +140,7 @@ class _$ChatRoomStateImpl implements _ChatRoomState {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -214,18 +194,14 @@ abstract class _ChatRoomState implements ChatRoomState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$ChatRoomStateLoadingImplCopyWith(_$ChatRoomStateLoadingImpl value,
|
||||
$Res Function(_$ChatRoomStateLoadingImpl) then) =
|
||||
factory _$$ChatRoomStateLoadingImplCopyWith(_$ChatRoomStateLoadingImpl value, $Res Function(_$ChatRoomStateLoadingImpl) then) =
|
||||
__$$ChatRoomStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateLoadingImpl>
|
||||
class __$$ChatRoomStateLoadingImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateLoadingImpl>
|
||||
implements _$$ChatRoomStateLoadingImplCopyWith<$Res> {
|
||||
__$$ChatRoomStateLoadingImplCopyWithImpl(_$ChatRoomStateLoadingImpl _value,
|
||||
$Res Function(_$ChatRoomStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$ChatRoomStateLoadingImplCopyWithImpl(_$ChatRoomStateLoadingImpl _value, $Res Function(_$ChatRoomStateLoadingImpl) _then) : super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -240,9 +216,7 @@ class _$ChatRoomStateLoadingImpl implements ChatRoomStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatRoomStateLoadingImpl);
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChatRoomStateLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -253,9 +227,7 @@ class _$ChatRoomStateLoadingImpl implements ChatRoomStateLoading {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading) loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loading();
|
||||
@@ -266,9 +238,7 @@ class _$ChatRoomStateLoadingImpl implements ChatRoomStateLoading {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loading?.call();
|
||||
@@ -279,9 +249,7 @@ class _$ChatRoomStateLoadingImpl implements ChatRoomStateLoading {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -335,26 +303,19 @@ abstract class ChatRoomStateLoading implements ChatRoomState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$ChatRoomStateLoadedImplCopyWith(_$ChatRoomStateLoadedImpl value,
|
||||
$Res Function(_$ChatRoomStateLoadedImpl) then) =
|
||||
factory _$$ChatRoomStateLoadedImplCopyWith(_$ChatRoomStateLoadedImpl value, $Res Function(_$ChatRoomStateLoadedImpl) then) =
|
||||
__$$ChatRoomStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call(
|
||||
{ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool isTyping,
|
||||
bool isLoading});
|
||||
$Res call({ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading});
|
||||
|
||||
$ChatRoomModelCopyWith<$Res> get chatRoom;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateLoadedImpl>
|
||||
class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateLoadedImpl>
|
||||
implements _$$ChatRoomStateLoadedImplCopyWith<$Res> {
|
||||
__$$ChatRoomStateLoadedImplCopyWithImpl(_$ChatRoomStateLoadedImpl _value,
|
||||
$Res Function(_$ChatRoomStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$ChatRoomStateLoadedImplCopyWithImpl(_$ChatRoomStateLoadedImpl _value, $Res Function(_$ChatRoomStateLoadedImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -396,16 +357,13 @@ class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
|
||||
class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
|
||||
const _$ChatRoomStateLoadedImpl(
|
||||
{required this.chatRoom,
|
||||
required final List<ChatMessageModel> chatMessages,
|
||||
required this.isTyping,
|
||||
required this.isLoading})
|
||||
const _$ChatRoomStateLoadedImpl({required this.chatRoom, required final List<ChatMessageModel> chatMessages, required this.isTyping, required this.isLoading})
|
||||
: _chatMessages = chatMessages;
|
||||
|
||||
@override
|
||||
final ChatRoomModel chatRoom;
|
||||
final List<ChatMessageModel> _chatMessages;
|
||||
|
||||
@override
|
||||
List<ChatMessageModel> get chatMessages {
|
||||
if (_chatMessages is EqualUnmodifiableListView) return _chatMessages;
|
||||
@@ -428,35 +386,27 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatRoomStateLoadedImpl &&
|
||||
(identical(other.chatRoom, chatRoom) ||
|
||||
other.chatRoom == chatRoom) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._chatMessages, _chatMessages) &&
|
||||
(identical(other.isTyping, isTyping) ||
|
||||
other.isTyping == isTyping) &&
|
||||
(identical(other.isLoading, isLoading) ||
|
||||
other.isLoading == isLoading));
|
||||
(identical(other.chatRoom, chatRoom) || other.chatRoom == chatRoom) &&
|
||||
const DeepCollectionEquality().equals(other._chatMessages, _chatMessages) &&
|
||||
(identical(other.isTyping, isTyping) || other.isTyping == isTyping) &&
|
||||
(identical(other.isLoading, isLoading) || other.isLoading == isLoading));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, chatRoom,
|
||||
const DeepCollectionEquality().hash(_chatMessages), isTyping, isLoading);
|
||||
int get hashCode => Object.hash(runtimeType, chatRoom, const DeepCollectionEquality().hash(_chatMessages), isTyping, isLoading);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith =>
|
||||
__$$ChatRoomStateLoadedImplCopyWithImpl<_$ChatRoomStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
__$$ChatRoomStateLoadedImplCopyWithImpl<_$ChatRoomStateLoadedImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading) loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loaded(chatRoom, chatMessages, isTyping, isLoading);
|
||||
@@ -467,9 +417,7 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loaded?.call(chatRoom, chatMessages, isTyping, isLoading);
|
||||
@@ -480,9 +428,7 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -538,30 +484,30 @@ abstract class ChatRoomStateLoaded implements ChatRoomState {
|
||||
required final bool isLoading}) = _$ChatRoomStateLoadedImpl;
|
||||
|
||||
ChatRoomModel get chatRoom;
|
||||
|
||||
List<ChatMessageModel> get chatMessages;
|
||||
|
||||
bool get isTyping;
|
||||
|
||||
bool get isLoading;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
_$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomStateErrorImplCopyWith<$Res> {
|
||||
factory _$$ChatRoomStateErrorImplCopyWith(_$ChatRoomStateErrorImpl value,
|
||||
$Res Function(_$ChatRoomStateErrorImpl) then) =
|
||||
factory _$$ChatRoomStateErrorImplCopyWith(_$ChatRoomStateErrorImpl value, $Res Function(_$ChatRoomStateErrorImpl) then) =
|
||||
__$$ChatRoomStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateErrorImpl>
|
||||
class __$$ChatRoomStateErrorImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateErrorImpl>
|
||||
implements _$$ChatRoomStateErrorImplCopyWith<$Res> {
|
||||
__$$ChatRoomStateErrorImplCopyWithImpl(_$ChatRoomStateErrorImpl _value,
|
||||
$Res Function(_$ChatRoomStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$ChatRoomStateErrorImplCopyWithImpl(_$ChatRoomStateErrorImpl _value, $Res Function(_$ChatRoomStateErrorImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -595,8 +541,7 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatRoomStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -606,17 +551,14 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith =>
|
||||
__$$ChatRoomStateErrorImplCopyWithImpl<_$ChatRoomStateErrorImpl>(
|
||||
this, _$identity);
|
||||
__$$ChatRoomStateErrorImplCopyWithImpl<_$ChatRoomStateErrorImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading) loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return error(errorMessage);
|
||||
@@ -627,9 +569,7 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return error?.call(errorMessage);
|
||||
@@ -640,9 +580,7 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -691,11 +629,10 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
|
||||
}
|
||||
|
||||
abstract class ChatRoomStateError implements ChatRoomState {
|
||||
const factory ChatRoomStateError({required final String errorMessage}) =
|
||||
_$ChatRoomStateErrorImpl;
|
||||
const factory ChatRoomStateError({required final String errorMessage}) = _$ChatRoomStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
_$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ import 'package:intl/intl.dart';
|
||||
import '/core/app_export.dart';
|
||||
|
||||
part 'chat_select_event.dart';
|
||||
|
||||
part 'chat_select_state.dart';
|
||||
|
||||
/// A bloc that manages the state of a ChatSelect according to the event that is dispatched to it.
|
||||
@@ -29,18 +28,20 @@ class ChatSelectBloc extends Bloc<ChatSelectEvent, ChatSelectState> {
|
||||
List<ChatItemModel> chats = [];
|
||||
for (int i = 0; i < chatRooms.length; i++) {
|
||||
String text = chatRooms[i]['last_message'] is List ? '' : chatRooms[i]['last_message']['data'];
|
||||
if (chatRooms[i]['last_message'] is !List && chatRooms[i]['last_message']['is_author_message_auth_user'] != null) {
|
||||
if (chatRooms[i]['last_message'] is! List && chatRooms[i]['last_message']['is_author_message_auth_user'] != null) {
|
||||
text = "Вы: " + text;
|
||||
}
|
||||
chats.add(
|
||||
ChatItemModel(
|
||||
id: chatRooms[i]['id'],
|
||||
username: chatRooms[i]['users']['to_chat_user']['name'],
|
||||
dateText: chatRooms[i]['last_message'] is List ? '' : DateFormat('dd.MM').format(
|
||||
DateTime.parse(
|
||||
chatRooms[i]['last_message']['updated_at'],
|
||||
),
|
||||
),
|
||||
dateText: chatRooms[i]['last_message'] is List
|
||||
? ''
|
||||
: DateFormat('dd.MM').format(
|
||||
DateTime.parse(
|
||||
chatRooms[i]['last_message']['updated_at'],
|
||||
),
|
||||
),
|
||||
greetingText: text,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:equatable/equatable.dart';
|
||||
|
||||
class ChatSelectModel extends Equatable {
|
||||
ChatSelectModel({this.chatList = const []});
|
||||
|
||||
List<ChatItemModel> chatList;
|
||||
|
||||
ChatSelectModel copyWith({List<ChatItemModel>? chatList}) {
|
||||
|
||||
@@ -24,25 +24,23 @@ class _ChatService implements ChatService {
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
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',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/chat/show/${id}',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
var _value = _result.data!.map((k, dynamic v) =>
|
||||
MapEntry(k, ChatRoomModel.fromJson(v as Map<String, dynamic>)));
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/chat/show/${id}',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
var _value = _result.data!.map((k, dynamic v) => MapEntry(k, ChatRoomModel.fromJson(v as Map<String, dynamic>)));
|
||||
return _value;
|
||||
}
|
||||
|
||||
@@ -98,23 +96,22 @@ class _ChatService implements ChatService {
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
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',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/chat/show/${id}/messages?page=${page}',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/chat/show/${id}/messages?page=${page}',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
final _value = ChatMessagesModel.fromJson(_result.data!);
|
||||
return _value;
|
||||
}
|
||||
@@ -125,31 +122,28 @@ class _ChatService implements ChatService {
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
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',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/profile/ws/params',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/profile/ws/params',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
final _value = WebsocketInfoModel.fromJson(_result.data!);
|
||||
return _value;
|
||||
}
|
||||
|
||||
RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
|
||||
if (T != dynamic &&
|
||||
!(requestOptions.responseType == ResponseType.bytes ||
|
||||
requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T != dynamic && !(requestOptions.responseType == ResponseType.bytes || requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T == String) {
|
||||
requestOptions.responseType = ResponseType.plain;
|
||||
} else {
|
||||
|
||||
@@ -3,6 +3,7 @@ import './portion.dart';
|
||||
import './photo.dart';
|
||||
|
||||
part 'meal.freezed.dart';
|
||||
|
||||
part 'meal.g.dart';
|
||||
|
||||
@freezed
|
||||
|
||||
@@ -21,14 +21,21 @@ Meal _$MealFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Meal {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get time => throw _privateConstructorUsedError;
|
||||
|
||||
int get type => throw _privateConstructorUsedError;
|
||||
|
||||
int get satiety => throw _privateConstructorUsedError;
|
||||
|
||||
int get mood => throw _privateConstructorUsedError;
|
||||
|
||||
List<Portion> get portions => throw _privateConstructorUsedError;
|
||||
|
||||
List<Photo> get photos => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$MealCopyWith<Meal> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -36,16 +43,16 @@ mixin _$Meal {
|
||||
/// @nodoc
|
||||
abstract class $MealCopyWith<$Res> {
|
||||
factory $MealCopyWith(Meal value, $Res Function(Meal) then) =
|
||||
_$MealCopyWithImpl<$Res, Meal>;
|
||||
_$MealCopyWithImpl<$Res, Meal>;
|
||||
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
String time,
|
||||
int type,
|
||||
int satiety,
|
||||
int mood,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos});
|
||||
$Res call({int id,
|
||||
String time,
|
||||
int type,
|
||||
int satiety,
|
||||
int mood,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -55,6 +62,7 @@ class _$MealCopyWithImpl<$Res, $Val extends Meal>
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -73,55 +81,53 @@ class _$MealCopyWithImpl<$Res, $Val extends Meal>
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int,
|
||||
time: null == time
|
||||
? _value.time
|
||||
: time // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
as String,
|
||||
type: null == type
|
||||
? _value.type
|
||||
: type // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int,
|
||||
satiety: null == satiety
|
||||
? _value.satiety
|
||||
: satiety // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int,
|
||||
mood: null == mood
|
||||
? _value.mood
|
||||
: mood // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int,
|
||||
portions: null == portions
|
||||
? _value.portions
|
||||
: portions // ignore: cast_nullable_to_non_nullable
|
||||
as List<Portion>,
|
||||
as List<Portion>,
|
||||
photos: null == photos
|
||||
? _value.photos
|
||||
: photos // ignore: cast_nullable_to_non_nullable
|
||||
as List<Photo>,
|
||||
as List<Photo>,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$MealImplCopyWith<$Res> implements $MealCopyWith<$Res> {
|
||||
factory _$$MealImplCopyWith(
|
||||
_$MealImpl value, $Res Function(_$MealImpl) then) =
|
||||
__$$MealImplCopyWithImpl<$Res>;
|
||||
factory _$$MealImplCopyWith(_$MealImpl value, $Res Function(_$MealImpl) then) =
|
||||
__$$MealImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
String time,
|
||||
int type,
|
||||
int satiety,
|
||||
int mood,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos});
|
||||
$Res call({int id,
|
||||
String time,
|
||||
int type,
|
||||
int satiety,
|
||||
int mood,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$MealImplCopyWithImpl<$Res>
|
||||
extends _$MealCopyWithImpl<$Res, _$MealImpl>
|
||||
class __$$MealImplCopyWithImpl<$Res> extends _$MealCopyWithImpl<$Res, _$MealImpl>
|
||||
implements _$$MealImplCopyWith<$Res> {
|
||||
__$$MealImplCopyWithImpl(_$MealImpl _value, $Res Function(_$MealImpl) _then)
|
||||
: super(_value, _then);
|
||||
@@ -141,31 +147,31 @@ class __$$MealImplCopyWithImpl<$Res>
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int,
|
||||
time: null == time
|
||||
? _value.time
|
||||
: time // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
as String,
|
||||
type: null == type
|
||||
? _value.type
|
||||
: type // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int,
|
||||
satiety: null == satiety
|
||||
? _value.satiety
|
||||
: satiety // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int,
|
||||
mood: null == mood
|
||||
? _value.mood
|
||||
: mood // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int,
|
||||
portions: null == portions
|
||||
? _value._portions
|
||||
: portions // ignore: cast_nullable_to_non_nullable
|
||||
as List<Portion>,
|
||||
as List<Portion>,
|
||||
photos: null == photos
|
||||
? _value._photos
|
||||
: photos // ignore: cast_nullable_to_non_nullable
|
||||
as List<Photo>,
|
||||
as List<Photo>,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -173,14 +179,13 @@ class __$$MealImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$MealImpl implements _Meal {
|
||||
const _$MealImpl(
|
||||
{required this.id,
|
||||
required this.time,
|
||||
required this.type,
|
||||
required this.satiety,
|
||||
required this.mood,
|
||||
required final List<Portion> portions,
|
||||
required final List<Photo> photos})
|
||||
const _$MealImpl({required this.id,
|
||||
required this.time,
|
||||
required this.type,
|
||||
required this.satiety,
|
||||
required this.mood,
|
||||
required final List<Portion> portions,
|
||||
required final List<Photo> photos})
|
||||
: _portions = portions,
|
||||
_photos = photos;
|
||||
|
||||
@@ -198,6 +203,7 @@ class _$MealImpl implements _Meal {
|
||||
@override
|
||||
final int mood;
|
||||
final List<Portion> _portions;
|
||||
|
||||
@override
|
||||
List<Portion> get portions {
|
||||
if (_portions is EqualUnmodifiableListView) return _portions;
|
||||
@@ -206,6 +212,7 @@ class _$MealImpl implements _Meal {
|
||||
}
|
||||
|
||||
final List<Photo> _photos;
|
||||
|
||||
@override
|
||||
List<Photo> get photos {
|
||||
if (_photos is EqualUnmodifiableListView) return _photos;
|
||||
@@ -234,15 +241,16 @@ class _$MealImpl implements _Meal {
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
time,
|
||||
type,
|
||||
satiety,
|
||||
mood,
|
||||
const DeepCollectionEquality().hash(_portions),
|
||||
const DeepCollectionEquality().hash(_photos));
|
||||
int get hashCode =>
|
||||
Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
time,
|
||||
type,
|
||||
satiety,
|
||||
mood,
|
||||
const DeepCollectionEquality().hash(_portions),
|
||||
const DeepCollectionEquality().hash(_photos));
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@@ -259,31 +267,37 @@ class _$MealImpl implements _Meal {
|
||||
}
|
||||
|
||||
abstract class _Meal implements Meal {
|
||||
const factory _Meal(
|
||||
{required final int id,
|
||||
required final String time,
|
||||
required final int type,
|
||||
required final int satiety,
|
||||
required final int mood,
|
||||
required final List<Portion> portions,
|
||||
required final List<Photo> photos}) = _$MealImpl;
|
||||
const factory _Meal({required final int id,
|
||||
required final String time,
|
||||
required final int type,
|
||||
required final int satiety,
|
||||
required final int mood,
|
||||
required final List<Portion> portions,
|
||||
required final List<Photo> photos}) = _$MealImpl;
|
||||
|
||||
factory _Meal.fromJson(Map<String, dynamic> json) = _$MealImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
String get time;
|
||||
|
||||
@override
|
||||
int get type;
|
||||
|
||||
@override
|
||||
int get satiety;
|
||||
|
||||
@override
|
||||
int get mood;
|
||||
|
||||
@override
|
||||
List<Portion> get portions;
|
||||
|
||||
@override
|
||||
List<Photo> get photos;
|
||||
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$MealImplCopyWith<_$MealImpl> get copyWith =>
|
||||
|
||||
@@ -6,7 +6,8 @@ part of 'meal.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$MealImpl _$$MealImplFromJson(Map<String, dynamic> json) => _$MealImpl(
|
||||
_$MealImpl _$$MealImplFromJson(Map<String, dynamic> json) =>
|
||||
_$MealImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
time: json['time'] as String,
|
||||
type: (json['type'] as num).toInt(),
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'photo.freezed.dart';
|
||||
|
||||
part 'photo.g.dart';
|
||||
|
||||
@freezed
|
||||
class Photo with _$Photo {
|
||||
const factory Photo({
|
||||
required int id,
|
||||
@JsonKey(name: 'original_name')
|
||||
required String originalName,
|
||||
@JsonKey(name: 'original_name') required String originalName,
|
||||
required String path,
|
||||
}) = _Photo;
|
||||
|
||||
|
||||
@@ -21,11 +21,14 @@ Photo _$PhotoFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Photo {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'original_name')
|
||||
String get originalName => throw _privateConstructorUsedError;
|
||||
|
||||
String get path => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$PhotoCopyWith<Photo> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -33,12 +36,12 @@ mixin _$Photo {
|
||||
/// @nodoc
|
||||
abstract class $PhotoCopyWith<$Res> {
|
||||
factory $PhotoCopyWith(Photo value, $Res Function(Photo) then) =
|
||||
_$PhotoCopyWithImpl<$Res, Photo>;
|
||||
_$PhotoCopyWithImpl<$Res, Photo>;
|
||||
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
@JsonKey(name: 'original_name') String originalName,
|
||||
String path});
|
||||
$Res call({int id,
|
||||
@JsonKey(name: 'original_name') String originalName,
|
||||
String path});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -48,6 +51,7 @@ class _$PhotoCopyWithImpl<$Res, $Val extends Photo>
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -62,38 +66,35 @@ class _$PhotoCopyWithImpl<$Res, $Val extends Photo>
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int,
|
||||
originalName: null == originalName
|
||||
? _value.originalName
|
||||
: originalName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
as String,
|
||||
path: null == path
|
||||
? _value.path
|
||||
: path // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
as String,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$PhotoImplCopyWith<$Res> implements $PhotoCopyWith<$Res> {
|
||||
factory _$$PhotoImplCopyWith(
|
||||
_$PhotoImpl value, $Res Function(_$PhotoImpl) then) =
|
||||
__$$PhotoImplCopyWithImpl<$Res>;
|
||||
factory _$$PhotoImplCopyWith(_$PhotoImpl value, $Res Function(_$PhotoImpl) then) =
|
||||
__$$PhotoImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
@JsonKey(name: 'original_name') String originalName,
|
||||
String path});
|
||||
$Res call({int id,
|
||||
@JsonKey(name: 'original_name') String originalName,
|
||||
String path});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$PhotoImplCopyWithImpl<$Res>
|
||||
extends _$PhotoCopyWithImpl<$Res, _$PhotoImpl>
|
||||
class __$$PhotoImplCopyWithImpl<$Res> extends _$PhotoCopyWithImpl<$Res, _$PhotoImpl>
|
||||
implements _$$PhotoImplCopyWith<$Res> {
|
||||
__$$PhotoImplCopyWithImpl(
|
||||
_$PhotoImpl _value, $Res Function(_$PhotoImpl) _then)
|
||||
__$$PhotoImplCopyWithImpl(_$PhotoImpl _value, $Res Function(_$PhotoImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@@ -107,15 +108,15 @@ class __$$PhotoImplCopyWithImpl<$Res>
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int,
|
||||
originalName: null == originalName
|
||||
? _value.originalName
|
||||
: originalName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
as String,
|
||||
path: null == path
|
||||
? _value.path
|
||||
: path // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
as String,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -123,10 +124,9 @@ class __$$PhotoImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$PhotoImpl implements _Photo {
|
||||
const _$PhotoImpl(
|
||||
{required this.id,
|
||||
@JsonKey(name: 'original_name') required this.originalName,
|
||||
required this.path});
|
||||
const _$PhotoImpl({required this.id,
|
||||
@JsonKey(name: 'original_name') required this.originalName,
|
||||
required this.path});
|
||||
|
||||
factory _$PhotoImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$PhotoImplFromJson(json);
|
||||
@@ -174,20 +174,22 @@ class _$PhotoImpl implements _Photo {
|
||||
}
|
||||
|
||||
abstract class _Photo implements Photo {
|
||||
const factory _Photo(
|
||||
{required final int id,
|
||||
@JsonKey(name: 'original_name') required final String originalName,
|
||||
required final String path}) = _$PhotoImpl;
|
||||
const factory _Photo({required final int id,
|
||||
@JsonKey(name: 'original_name') required final String originalName,
|
||||
required final String path}) = _$PhotoImpl;
|
||||
|
||||
factory _Photo.fromJson(Map<String, dynamic> json) = _$PhotoImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'original_name')
|
||||
String get originalName;
|
||||
|
||||
@override
|
||||
String get path;
|
||||
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith =>
|
||||
|
||||
@@ -6,7 +6,8 @@ part of 'photo.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$PhotoImpl _$$PhotoImplFromJson(Map<String, dynamic> json) => _$PhotoImpl(
|
||||
_$PhotoImpl _$$PhotoImplFromJson(Map<String, dynamic> json) =>
|
||||
_$PhotoImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
originalName: json['original_name'] as String,
|
||||
path: json['path'] as String,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'portion.freezed.dart';
|
||||
|
||||
part 'portion.g.dart';
|
||||
|
||||
@freezed
|
||||
|
||||
@@ -21,11 +21,15 @@ Portion _$PortionFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Portion {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get product_name => throw _privateConstructorUsedError;
|
||||
|
||||
int get quantity => throw _privateConstructorUsedError;
|
||||
|
||||
String get portion => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$PortionCopyWith<Portion> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -33,7 +37,8 @@ mixin _$Portion {
|
||||
/// @nodoc
|
||||
abstract class $PortionCopyWith<$Res> {
|
||||
factory $PortionCopyWith(Portion value, $Res Function(Portion) then) =
|
||||
_$PortionCopyWithImpl<$Res, Portion>;
|
||||
_$PortionCopyWithImpl<$Res, Portion>;
|
||||
|
||||
@useResult
|
||||
$Res call({int id, String product_name, int quantity, String portion});
|
||||
}
|
||||
@@ -45,6 +50,7 @@ class _$PortionCopyWithImpl<$Res, $Val extends Portion>
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -60,39 +66,37 @@ class _$PortionCopyWithImpl<$Res, $Val extends Portion>
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int,
|
||||
product_name: null == product_name
|
||||
? _value.product_name
|
||||
: product_name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
as String,
|
||||
quantity: null == quantity
|
||||
? _value.quantity
|
||||
: quantity // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int,
|
||||
portion: null == portion
|
||||
? _value.portion
|
||||
: portion // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
as String,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$PortionImplCopyWith<$Res> implements $PortionCopyWith<$Res> {
|
||||
factory _$$PortionImplCopyWith(
|
||||
_$PortionImpl value, $Res Function(_$PortionImpl) then) =
|
||||
__$$PortionImplCopyWithImpl<$Res>;
|
||||
factory _$$PortionImplCopyWith(_$PortionImpl value, $Res Function(_$PortionImpl) then) =
|
||||
__$$PortionImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int id, String product_name, int quantity, String portion});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$PortionImplCopyWithImpl<$Res>
|
||||
extends _$PortionCopyWithImpl<$Res, _$PortionImpl>
|
||||
class __$$PortionImplCopyWithImpl<$Res> extends _$PortionCopyWithImpl<$Res, _$PortionImpl>
|
||||
implements _$$PortionImplCopyWith<$Res> {
|
||||
__$$PortionImplCopyWithImpl(
|
||||
_$PortionImpl _value, $Res Function(_$PortionImpl) _then)
|
||||
__$$PortionImplCopyWithImpl(_$PortionImpl _value, $Res Function(_$PortionImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@@ -107,19 +111,19 @@ class __$$PortionImplCopyWithImpl<$Res>
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int,
|
||||
product_name: null == product_name
|
||||
? _value.product_name
|
||||
: product_name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
as String,
|
||||
quantity: null == quantity
|
||||
? _value.quantity
|
||||
: quantity // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int,
|
||||
portion: null == portion
|
||||
? _value.portion
|
||||
: portion // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
as String,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -127,11 +131,10 @@ class __$$PortionImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$PortionImpl implements _Portion {
|
||||
const _$PortionImpl(
|
||||
{required this.id,
|
||||
required this.product_name,
|
||||
required this.quantity,
|
||||
required this.portion});
|
||||
const _$PortionImpl({required this.id,
|
||||
required this.product_name,
|
||||
required this.quantity,
|
||||
required this.portion});
|
||||
|
||||
factory _$PortionImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$PortionImplFromJson(json);
|
||||
@@ -183,22 +186,25 @@ class _$PortionImpl implements _Portion {
|
||||
}
|
||||
|
||||
abstract class _Portion implements Portion {
|
||||
const factory _Portion(
|
||||
{required final int id,
|
||||
required final String product_name,
|
||||
required final int quantity,
|
||||
required final String portion}) = _$PortionImpl;
|
||||
const factory _Portion({required final int id,
|
||||
required final String product_name,
|
||||
required final int quantity,
|
||||
required final String portion}) = _$PortionImpl;
|
||||
|
||||
factory _Portion.fromJson(Map<String, dynamic> json) = _$PortionImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
String get product_name;
|
||||
|
||||
@override
|
||||
int get quantity;
|
||||
|
||||
@override
|
||||
String get portion;
|
||||
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$PortionImplCopyWith<_$PortionImpl> get copyWith =>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'product.freezed.dart';
|
||||
|
||||
part 'product.g.dart';
|
||||
|
||||
@freezed
|
||||
|
||||
@@ -21,9 +21,11 @@ Product _$ProductFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Product {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$ProductCopyWith<Product> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -31,7 +33,8 @@ mixin _$Product {
|
||||
/// @nodoc
|
||||
abstract class $ProductCopyWith<$Res> {
|
||||
factory $ProductCopyWith(Product value, $Res Function(Product) then) =
|
||||
_$ProductCopyWithImpl<$Res, Product>;
|
||||
_$ProductCopyWithImpl<$Res, Product>;
|
||||
|
||||
@useResult
|
||||
$Res call({int id, String name});
|
||||
}
|
||||
@@ -43,6 +46,7 @@ class _$ProductCopyWithImpl<$Res, $Val extends Product>
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -56,31 +60,29 @@ class _$ProductCopyWithImpl<$Res, $Val extends Product>
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
as String,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ProductImplCopyWith<$Res> implements $ProductCopyWith<$Res> {
|
||||
factory _$$ProductImplCopyWith(
|
||||
_$ProductImpl value, $Res Function(_$ProductImpl) then) =
|
||||
__$$ProductImplCopyWithImpl<$Res>;
|
||||
factory _$$ProductImplCopyWith(_$ProductImpl value, $Res Function(_$ProductImpl) then) =
|
||||
__$$ProductImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int id, String name});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ProductImplCopyWithImpl<$Res>
|
||||
extends _$ProductCopyWithImpl<$Res, _$ProductImpl>
|
||||
class __$$ProductImplCopyWithImpl<$Res> extends _$ProductCopyWithImpl<$Res, _$ProductImpl>
|
||||
implements _$$ProductImplCopyWith<$Res> {
|
||||
__$$ProductImplCopyWithImpl(
|
||||
_$ProductImpl _value, $Res Function(_$ProductImpl) _then)
|
||||
__$$ProductImplCopyWithImpl(_$ProductImpl _value, $Res Function(_$ProductImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@@ -93,11 +95,11 @@ class __$$ProductImplCopyWithImpl<$Res>
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
as String,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -149,14 +151,16 @@ class _$ProductImpl implements _Product {
|
||||
|
||||
abstract class _Product implements Product {
|
||||
const factory _Product({required final int id, required final String name}) =
|
||||
_$ProductImpl;
|
||||
_$ProductImpl;
|
||||
|
||||
factory _Product.fromJson(Map<String, dynamic> json) = _$ProductImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
String get name;
|
||||
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$ProductImplCopyWith<_$ProductImpl> get copyWith =>
|
||||
|
||||
@@ -21,28 +21,34 @@ FeedBlogPostModel _$FeedBlogPostModelFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$FeedBlogPostModel {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get state => throw _privateConstructorUsedError;
|
||||
|
||||
String get image => throw _privateConstructorUsedError;
|
||||
|
||||
String get description => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "youtube_url")
|
||||
String get youtubeUrl => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt => throw _privateConstructorUsedError;
|
||||
|
||||
String get title => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$FeedBlogPostModelCopyWith<FeedBlogPostModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$FeedBlogPostModelCopyWith<FeedBlogPostModel> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $FeedBlogPostModelCopyWith<$Res> {
|
||||
factory $FeedBlogPostModelCopyWith(
|
||||
FeedBlogPostModel value, $Res Function(FeedBlogPostModel) then) =
|
||||
_$FeedBlogPostModelCopyWithImpl<$Res, FeedBlogPostModel>;
|
||||
factory $FeedBlogPostModelCopyWith(FeedBlogPostModel value, $Res Function(FeedBlogPostModel) then) = _$FeedBlogPostModelCopyWithImpl<$Res, FeedBlogPostModel>;
|
||||
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
@@ -56,12 +62,12 @@ abstract class $FeedBlogPostModelCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
|
||||
implements $FeedBlogPostModelCopyWith<$Res> {
|
||||
class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel> implements $FeedBlogPostModelCopyWith<$Res> {
|
||||
_$FeedBlogPostModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -115,11 +121,10 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FeedBlogPostModelImplCopyWith<$Res>
|
||||
implements $FeedBlogPostModelCopyWith<$Res> {
|
||||
factory _$$FeedBlogPostModelImplCopyWith(_$FeedBlogPostModelImpl value,
|
||||
$Res Function(_$FeedBlogPostModelImpl) then) =
|
||||
abstract class _$$FeedBlogPostModelImplCopyWith<$Res> implements $FeedBlogPostModelCopyWith<$Res> {
|
||||
factory _$$FeedBlogPostModelImplCopyWith(_$FeedBlogPostModelImpl value, $Res Function(_$FeedBlogPostModelImpl) then) =
|
||||
__$$FeedBlogPostModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -134,12 +139,9 @@ abstract class _$$FeedBlogPostModelImplCopyWith<$Res>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedBlogPostModelImplCopyWithImpl<$Res>
|
||||
extends _$FeedBlogPostModelCopyWithImpl<$Res, _$FeedBlogPostModelImpl>
|
||||
class __$$FeedBlogPostModelImplCopyWithImpl<$Res> extends _$FeedBlogPostModelCopyWithImpl<$Res, _$FeedBlogPostModelImpl>
|
||||
implements _$$FeedBlogPostModelImplCopyWith<$Res> {
|
||||
__$$FeedBlogPostModelImplCopyWithImpl(_$FeedBlogPostModelImpl _value,
|
||||
$Res Function(_$FeedBlogPostModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$FeedBlogPostModelImplCopyWithImpl(_$FeedBlogPostModelImpl _value, $Res Function(_$FeedBlogPostModelImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -203,8 +205,7 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
|
||||
@JsonKey(name: "updated_at") required this.updatedAt,
|
||||
required this.title});
|
||||
|
||||
factory _$FeedBlogPostModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$FeedBlogPostModelImplFromJson(json);
|
||||
factory _$FeedBlogPostModelImpl.fromJson(Map<String, dynamic> json) => _$$FeedBlogPostModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -239,28 +240,21 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.state, state) || other.state == state) &&
|
||||
(identical(other.image, image) || other.image == image) &&
|
||||
(identical(other.description, description) ||
|
||||
other.description == description) &&
|
||||
(identical(other.youtubeUrl, youtubeUrl) ||
|
||||
other.youtubeUrl == youtubeUrl) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt) &&
|
||||
(identical(other.description, description) || other.description == description) &&
|
||||
(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));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@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)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
|
||||
__$$FeedBlogPostModelImplCopyWithImpl<_$FeedBlogPostModelImpl>(
|
||||
this, _$identity);
|
||||
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith => __$$FeedBlogPostModelImplCopyWithImpl<_$FeedBlogPostModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -281,30 +275,36 @@ abstract class _FeedBlogPostModel implements FeedBlogPostModel {
|
||||
@JsonKey(name: "updated_at") required final DateTime updatedAt,
|
||||
required final String title}) = _$FeedBlogPostModelImpl;
|
||||
|
||||
factory _FeedBlogPostModel.fromJson(Map<String, dynamic> json) =
|
||||
_$FeedBlogPostModelImpl.fromJson;
|
||||
factory _FeedBlogPostModel.fromJson(Map<String, dynamic> json) = _$FeedBlogPostModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
String get state;
|
||||
|
||||
@override
|
||||
String get image;
|
||||
|
||||
@override
|
||||
String get description;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "youtube_url")
|
||||
String get youtubeUrl;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt;
|
||||
|
||||
@override
|
||||
String get title;
|
||||
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,9 +6,7 @@ part of 'feed_blog_post_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$FeedBlogPostModelImpl(
|
||||
_$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(Map<String, dynamic> json) => _$FeedBlogPostModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
state: json['state'] as String,
|
||||
image: json['image'] as String,
|
||||
@@ -19,9 +17,7 @@ _$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(
|
||||
title: json['title'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$FeedBlogPostModelImplToJson(
|
||||
_$FeedBlogPostModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$$FeedBlogPostModelImplToJson(_$FeedBlogPostModelImpl instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'state': instance.state,
|
||||
'image': instance.image,
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:eatvio_app/features/feed/models/feed_blog_post_model.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'feed_blog_post_settings_model.freezed.dart';
|
||||
|
||||
part 'feed_blog_post_settings_model.g.dart';
|
||||
|
||||
@freezed
|
||||
|
||||
@@ -14,40 +14,37 @@ T _$identity<T>(T value) => value;
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
FeedBlogPostSettingsModel _$FeedBlogPostSettingsModelFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
FeedBlogPostSettingsModel _$FeedBlogPostSettingsModelFromJson(Map<String, dynamic> json) {
|
||||
return _FeedBlogPostSettingsModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$FeedBlogPostSettingsModel {
|
||||
@JsonKey(name: 'data')
|
||||
List<FeedBlogPostModel> get feedBlogPostList =>
|
||||
throw _privateConstructorUsedError;
|
||||
List<FeedBlogPostModel> get feedBlogPostList => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$FeedBlogPostSettingsModelCopyWith<FeedBlogPostSettingsModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$FeedBlogPostSettingsModelCopyWith<FeedBlogPostSettingsModel> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $FeedBlogPostSettingsModelCopyWith<$Res> {
|
||||
factory $FeedBlogPostSettingsModelCopyWith(FeedBlogPostSettingsModel value,
|
||||
$Res Function(FeedBlogPostSettingsModel) then) =
|
||||
factory $FeedBlogPostSettingsModelCopyWith(FeedBlogPostSettingsModel value, $Res Function(FeedBlogPostSettingsModel) then) =
|
||||
_$FeedBlogPostSettingsModelCopyWithImpl<$Res, FeedBlogPostSettingsModel>;
|
||||
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
|
||||
$Val extends FeedBlogPostSettingsModel>
|
||||
implements $FeedBlogPostSettingsModelCopyWith<$Res> {
|
||||
class _$FeedBlogPostSettingsModelCopyWithImpl<$Res, $Val extends FeedBlogPostSettingsModel> implements $FeedBlogPostSettingsModelCopyWith<$Res> {
|
||||
_$FeedBlogPostSettingsModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -66,25 +63,19 @@ class _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FeedBlogPostSettingsModelImplCopyWith<$Res>
|
||||
implements $FeedBlogPostSettingsModelCopyWith<$Res> {
|
||||
factory _$$FeedBlogPostSettingsModelImplCopyWith(
|
||||
_$FeedBlogPostSettingsModelImpl value,
|
||||
$Res Function(_$FeedBlogPostSettingsModelImpl) then) =
|
||||
abstract class _$$FeedBlogPostSettingsModelImplCopyWith<$Res> implements $FeedBlogPostSettingsModelCopyWith<$Res> {
|
||||
factory _$$FeedBlogPostSettingsModelImplCopyWith(_$FeedBlogPostSettingsModelImpl value, $Res Function(_$FeedBlogPostSettingsModelImpl) then) =
|
||||
__$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>
|
||||
extends _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
|
||||
_$FeedBlogPostSettingsModelImpl>
|
||||
class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res> extends _$FeedBlogPostSettingsModelCopyWithImpl<$Res, _$FeedBlogPostSettingsModelImpl>
|
||||
implements _$$FeedBlogPostSettingsModelImplCopyWith<$Res> {
|
||||
__$$FeedBlogPostSettingsModelImplCopyWithImpl(
|
||||
_$FeedBlogPostSettingsModelImpl _value,
|
||||
$Res Function(_$FeedBlogPostSettingsModelImpl) _then)
|
||||
__$$FeedBlogPostSettingsModelImplCopyWithImpl(_$FeedBlogPostSettingsModelImpl _value, $Res Function(_$FeedBlogPostSettingsModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@@ -104,20 +95,17 @@ class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
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;
|
||||
|
||||
factory _$FeedBlogPostSettingsModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$FeedBlogPostSettingsModelImplFromJson(json);
|
||||
factory _$FeedBlogPostSettingsModelImpl.fromJson(Map<String, dynamic> json) => _$$FeedBlogPostSettingsModelImplFromJson(json);
|
||||
|
||||
final List<FeedBlogPostModel> _feedBlogPostList;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'data')
|
||||
List<FeedBlogPostModel> get feedBlogPostList {
|
||||
if (_feedBlogPostList is EqualUnmodifiableListView)
|
||||
return _feedBlogPostList;
|
||||
if (_feedBlogPostList is EqualUnmodifiableListView) return _feedBlogPostList;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_feedBlogPostList);
|
||||
}
|
||||
@@ -132,21 +120,18 @@ class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$FeedBlogPostSettingsModelImpl &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._feedBlogPostList, _feedBlogPostList));
|
||||
const DeepCollectionEquality().equals(other._feedBlogPostList, _feedBlogPostList));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_feedBlogPostList));
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_feedBlogPostList));
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
|
||||
get copyWith => __$$FeedBlogPostSettingsModelImplCopyWithImpl<
|
||||
_$FeedBlogPostSettingsModelImpl>(this, _$identity);
|
||||
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl> get copyWith =>
|
||||
__$$FeedBlogPostSettingsModelImplCopyWithImpl<_$FeedBlogPostSettingsModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -157,19 +142,15 @@ class _$FeedBlogPostSettingsModelImpl 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
|
||||
@JsonKey(name: 'data')
|
||||
List<FeedBlogPostModel> get feedBlogPostList;
|
||||
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,16 +6,14 @@ part of 'feed_blog_post_settings_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$FeedBlogPostSettingsModelImpl _$$FeedBlogPostSettingsModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$FeedBlogPostSettingsModelImpl _$$FeedBlogPostSettingsModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$FeedBlogPostSettingsModelImpl(
|
||||
feedBlogPostList: (json['data'] as List<dynamic>)
|
||||
.map((e) => FeedBlogPostModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$FeedBlogPostSettingsModelImplToJson(
|
||||
_$FeedBlogPostSettingsModelImpl instance) =>
|
||||
Map<String, dynamic> _$$FeedBlogPostSettingsModelImplToJson(_$FeedBlogPostSettingsModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.feedBlogPostList,
|
||||
};
|
||||
|
||||
@@ -21,34 +21,48 @@ Recipes _$RecipesFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Recipes {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get image => throw _privateConstructorUsedError;
|
||||
|
||||
String get state => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "cooking_time")
|
||||
int get cookingTime => throw _privateConstructorUsedError;
|
||||
|
||||
List<Ingredient> get ingredients => throw _privateConstructorUsedError;
|
||||
|
||||
String get description => throw _privateConstructorUsedError;
|
||||
|
||||
List<Step> get steps => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "video_url")
|
||||
String get videoUrl => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt => throw _privateConstructorUsedError;
|
||||
|
||||
String get title => throw _privateConstructorUsedError;
|
||||
|
||||
String get type => throw _privateConstructorUsedError;
|
||||
|
||||
String get slug => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "comments_count")
|
||||
int get commentsCount => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$RecipesCopyWith<Recipes> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $RecipesCopyWith<$Res> {
|
||||
factory $RecipesCopyWith(Recipes value, $Res Function(Recipes) then) =
|
||||
_$RecipesCopyWithImpl<$Res, Recipes>;
|
||||
factory $RecipesCopyWith(Recipes value, $Res Function(Recipes) then) = _$RecipesCopyWithImpl<$Res, Recipes>;
|
||||
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
@@ -68,12 +82,12 @@ abstract class $RecipesCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$RecipesCopyWithImpl<$Res, $Val extends Recipes>
|
||||
implements $RecipesCopyWith<$Res> {
|
||||
class _$RecipesCopyWithImpl<$Res, $Val extends Recipes> implements $RecipesCopyWith<$Res> {
|
||||
_$RecipesCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -158,9 +172,8 @@ class _$RecipesCopyWithImpl<$Res, $Val extends Recipes>
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipesImplCopyWith<$Res> implements $RecipesCopyWith<$Res> {
|
||||
factory _$$RecipesImplCopyWith(
|
||||
_$RecipesImpl value, $Res Function(_$RecipesImpl) then) =
|
||||
__$$RecipesImplCopyWithImpl<$Res>;
|
||||
factory _$$RecipesImplCopyWith(_$RecipesImpl value, $Res Function(_$RecipesImpl) then) = __$$RecipesImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -181,12 +194,8 @@ abstract class _$$RecipesImplCopyWith<$Res> implements $RecipesCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipesImplCopyWithImpl<$Res>
|
||||
extends _$RecipesCopyWithImpl<$Res, _$RecipesImpl>
|
||||
implements _$$RecipesImplCopyWith<$Res> {
|
||||
__$$RecipesImplCopyWithImpl(
|
||||
_$RecipesImpl _value, $Res Function(_$RecipesImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$RecipesImplCopyWithImpl<$Res> extends _$RecipesCopyWithImpl<$Res, _$RecipesImpl> implements _$$RecipesImplCopyWith<$Res> {
|
||||
__$$RecipesImplCopyWithImpl(_$RecipesImpl _value, $Res Function(_$RecipesImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -288,8 +297,7 @@ class _$RecipesImpl implements _Recipes {
|
||||
: _ingredients = ingredients,
|
||||
_steps = steps;
|
||||
|
||||
factory _$RecipesImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$RecipesImplFromJson(json);
|
||||
factory _$RecipesImpl.fromJson(Map<String, dynamic> json) => _$$RecipesImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -301,6 +309,7 @@ class _$RecipesImpl implements _Recipes {
|
||||
@JsonKey(name: "cooking_time")
|
||||
final int cookingTime;
|
||||
final List<Ingredient> _ingredients;
|
||||
|
||||
@override
|
||||
List<Ingredient> get ingredients {
|
||||
if (_ingredients is EqualUnmodifiableListView) return _ingredients;
|
||||
@@ -311,6 +320,7 @@ class _$RecipesImpl implements _Recipes {
|
||||
@override
|
||||
final String description;
|
||||
final List<Step> _steps;
|
||||
|
||||
@override
|
||||
List<Step> get steps {
|
||||
if (_steps is EqualUnmodifiableListView) return _steps;
|
||||
@@ -350,50 +360,28 @@ class _$RecipesImpl implements _Recipes {
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.image, image) || other.image == image) &&
|
||||
(identical(other.state, state) || other.state == state) &&
|
||||
(identical(other.cookingTime, cookingTime) ||
|
||||
other.cookingTime == cookingTime) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._ingredients, _ingredients) &&
|
||||
(identical(other.description, description) ||
|
||||
other.description == description) &&
|
||||
(identical(other.cookingTime, cookingTime) || other.cookingTime == cookingTime) &&
|
||||
const DeepCollectionEquality().equals(other._ingredients, _ingredients) &&
|
||||
(identical(other.description, description) || other.description == description) &&
|
||||
const DeepCollectionEquality().equals(other._steps, _steps) &&
|
||||
(identical(other.videoUrl, videoUrl) ||
|
||||
other.videoUrl == videoUrl) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt) &&
|
||||
(identical(other.videoUrl, videoUrl) || other.videoUrl == videoUrl) &&
|
||||
(identical(other.createdAt, createdAt) || other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) &&
|
||||
(identical(other.title, title) || other.title == title) &&
|
||||
(identical(other.type, type) || other.type == type) &&
|
||||
(identical(other.slug, slug) || other.slug == slug) &&
|
||||
(identical(other.commentsCount, commentsCount) ||
|
||||
other.commentsCount == commentsCount));
|
||||
(identical(other.commentsCount, commentsCount) || other.commentsCount == commentsCount));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
image,
|
||||
state,
|
||||
cookingTime,
|
||||
const DeepCollectionEquality().hash(_ingredients),
|
||||
description,
|
||||
const DeepCollectionEquality().hash(_steps),
|
||||
videoUrl,
|
||||
createdAt,
|
||||
updatedAt,
|
||||
title,
|
||||
type,
|
||||
slug,
|
||||
commentsCount);
|
||||
int get hashCode => Object.hash(runtimeType, id, image, state, cookingTime, const DeepCollectionEquality().hash(_ingredients), description,
|
||||
const DeepCollectionEquality().hash(_steps), videoUrl, createdAt, updatedAt, title, type, slug, commentsCount);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith =>
|
||||
__$$RecipesImplCopyWithImpl<_$RecipesImpl>(this, _$identity);
|
||||
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith => __$$RecipesImplCopyWithImpl<_$RecipesImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -405,61 +393,73 @@ class _$RecipesImpl implements _Recipes {
|
||||
|
||||
abstract class _Recipes implements Recipes {
|
||||
const factory _Recipes(
|
||||
{required final int id,
|
||||
required final String image,
|
||||
required final String state,
|
||||
@JsonKey(name: "cooking_time") required final int cookingTime,
|
||||
required final List<Ingredient> ingredients,
|
||||
required final String description,
|
||||
required final List<Step> steps,
|
||||
@JsonKey(name: "video_url") required final String videoUrl,
|
||||
@JsonKey(name: "created_at") required final DateTime createdAt,
|
||||
@JsonKey(name: "updated_at") required final DateTime updatedAt,
|
||||
required final String title,
|
||||
required final String type,
|
||||
required final String slug,
|
||||
@JsonKey(name: "comments_count") required final int commentsCount}) =
|
||||
_$RecipesImpl;
|
||||
{required final int id,
|
||||
required final String image,
|
||||
required final String state,
|
||||
@JsonKey(name: "cooking_time") required final int cookingTime,
|
||||
required final List<Ingredient> ingredients,
|
||||
required final String description,
|
||||
required final List<Step> steps,
|
||||
@JsonKey(name: "video_url") required final String videoUrl,
|
||||
@JsonKey(name: "created_at") required final DateTime createdAt,
|
||||
@JsonKey(name: "updated_at") required final DateTime updatedAt,
|
||||
required final String title,
|
||||
required final String type,
|
||||
required final String slug,
|
||||
@JsonKey(name: "comments_count") required final int commentsCount}) = _$RecipesImpl;
|
||||
|
||||
factory _Recipes.fromJson(Map<String, dynamic> json) = _$RecipesImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
String get image;
|
||||
|
||||
@override
|
||||
String get state;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "cooking_time")
|
||||
int get cookingTime;
|
||||
|
||||
@override
|
||||
List<Ingredient> get ingredients;
|
||||
|
||||
@override
|
||||
String get description;
|
||||
|
||||
@override
|
||||
List<Step> get steps;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "video_url")
|
||||
String get videoUrl;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt;
|
||||
|
||||
@override
|
||||
String get title;
|
||||
|
||||
@override
|
||||
String get type;
|
||||
|
||||
@override
|
||||
String get slug;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "comments_count")
|
||||
int get commentsCount;
|
||||
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Ingredient _$IngredientFromJson(Map<String, dynamic> json) {
|
||||
@@ -469,31 +469,32 @@ Ingredient _$IngredientFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Ingredient {
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
String? get unit => throw _privateConstructorUsedError;
|
||||
|
||||
String get portion => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$IngredientCopyWith<Ingredient> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$IngredientCopyWith<Ingredient> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $IngredientCopyWith<$Res> {
|
||||
factory $IngredientCopyWith(
|
||||
Ingredient value, $Res Function(Ingredient) then) =
|
||||
_$IngredientCopyWithImpl<$Res, Ingredient>;
|
||||
factory $IngredientCopyWith(Ingredient value, $Res Function(Ingredient) then) = _$IngredientCopyWithImpl<$Res, Ingredient>;
|
||||
|
||||
@useResult
|
||||
$Res call({String name, String? unit, String portion});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient>
|
||||
implements $IngredientCopyWith<$Res> {
|
||||
class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient> implements $IngredientCopyWith<$Res> {
|
||||
_$IngredientCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -522,23 +523,17 @@ class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$IngredientImplCopyWith<$Res>
|
||||
implements $IngredientCopyWith<$Res> {
|
||||
factory _$$IngredientImplCopyWith(
|
||||
_$IngredientImpl value, $Res Function(_$IngredientImpl) then) =
|
||||
__$$IngredientImplCopyWithImpl<$Res>;
|
||||
abstract class _$$IngredientImplCopyWith<$Res> implements $IngredientCopyWith<$Res> {
|
||||
factory _$$IngredientImplCopyWith(_$IngredientImpl value, $Res Function(_$IngredientImpl) then) = __$$IngredientImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String name, String? unit, String portion});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$IngredientImplCopyWithImpl<$Res>
|
||||
extends _$IngredientCopyWithImpl<$Res, _$IngredientImpl>
|
||||
implements _$$IngredientImplCopyWith<$Res> {
|
||||
__$$IngredientImplCopyWithImpl(
|
||||
_$IngredientImpl _value, $Res Function(_$IngredientImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$IngredientImplCopyWithImpl<$Res> extends _$IngredientCopyWithImpl<$Res, _$IngredientImpl> implements _$$IngredientImplCopyWith<$Res> {
|
||||
__$$IngredientImplCopyWithImpl(_$IngredientImpl _value, $Res Function(_$IngredientImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -567,11 +562,9 @@ class __$$IngredientImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$IngredientImpl implements _Ingredient {
|
||||
const _$IngredientImpl(
|
||||
{required this.name, this.unit, required this.portion});
|
||||
const _$IngredientImpl({required this.name, this.unit, required this.portion});
|
||||
|
||||
factory _$IngredientImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$IngredientImplFromJson(json);
|
||||
factory _$IngredientImpl.fromJson(Map<String, dynamic> json) => _$$IngredientImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String name;
|
||||
@@ -602,8 +595,7 @@ class _$IngredientImpl implements _Ingredient {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
|
||||
__$$IngredientImplCopyWithImpl<_$IngredientImpl>(this, _$identity);
|
||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith => __$$IngredientImplCopyWithImpl<_$IngredientImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -614,24 +606,22 @@ class _$IngredientImpl implements _Ingredient {
|
||||
}
|
||||
|
||||
abstract class _Ingredient implements Ingredient {
|
||||
const factory _Ingredient(
|
||||
{required final String name,
|
||||
final String? unit,
|
||||
required final String portion}) = _$IngredientImpl;
|
||||
const factory _Ingredient({required final String name, final String? unit, required final String portion}) = _$IngredientImpl;
|
||||
|
||||
factory _Ingredient.fromJson(Map<String, dynamic> json) =
|
||||
_$IngredientImpl.fromJson;
|
||||
factory _Ingredient.fromJson(Map<String, dynamic> json) = _$IngredientImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get name;
|
||||
|
||||
@override
|
||||
String? get unit;
|
||||
|
||||
@override
|
||||
String get portion;
|
||||
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Step _$StepFromJson(Map<String, dynamic> json) {
|
||||
@@ -641,28 +631,30 @@ Step _$StepFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Step {
|
||||
String get image => throw _privateConstructorUsedError;
|
||||
|
||||
String get description => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$StepCopyWith<Step> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $StepCopyWith<$Res> {
|
||||
factory $StepCopyWith(Step value, $Res Function(Step) then) =
|
||||
_$StepCopyWithImpl<$Res, Step>;
|
||||
factory $StepCopyWith(Step value, $Res Function(Step) then) = _$StepCopyWithImpl<$Res, Step>;
|
||||
|
||||
@useResult
|
||||
$Res call({String image, String description});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$StepCopyWithImpl<$Res, $Val extends Step>
|
||||
implements $StepCopyWith<$Res> {
|
||||
class _$StepCopyWithImpl<$Res, $Val extends Step> implements $StepCopyWith<$Res> {
|
||||
_$StepCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -687,20 +679,16 @@ class _$StepCopyWithImpl<$Res, $Val extends Step>
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$StepImplCopyWith<$Res> implements $StepCopyWith<$Res> {
|
||||
factory _$$StepImplCopyWith(
|
||||
_$StepImpl value, $Res Function(_$StepImpl) then) =
|
||||
__$$StepImplCopyWithImpl<$Res>;
|
||||
factory _$$StepImplCopyWith(_$StepImpl value, $Res Function(_$StepImpl) then) = __$$StepImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String image, String description});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$StepImplCopyWithImpl<$Res>
|
||||
extends _$StepCopyWithImpl<$Res, _$StepImpl>
|
||||
implements _$$StepImplCopyWith<$Res> {
|
||||
__$$StepImplCopyWithImpl(_$StepImpl _value, $Res Function(_$StepImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$StepImplCopyWithImpl<$Res> extends _$StepCopyWithImpl<$Res, _$StepImpl> implements _$$StepImplCopyWith<$Res> {
|
||||
__$$StepImplCopyWithImpl(_$StepImpl _value, $Res Function(_$StepImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -726,8 +714,7 @@ class __$$StepImplCopyWithImpl<$Res>
|
||||
class _$StepImpl implements _Step {
|
||||
const _$StepImpl({required this.image, required this.description});
|
||||
|
||||
factory _$StepImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$StepImplFromJson(json);
|
||||
factory _$StepImpl.fromJson(Map<String, dynamic> json) => _$$StepImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String image;
|
||||
@@ -745,8 +732,7 @@ class _$StepImpl implements _Step {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$StepImpl &&
|
||||
(identical(other.image, image) || other.image == image) &&
|
||||
(identical(other.description, description) ||
|
||||
other.description == description));
|
||||
(identical(other.description, description) || other.description == description));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@@ -756,8 +742,7 @@ class _$StepImpl implements _Step {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
|
||||
__$$StepImplCopyWithImpl<_$StepImpl>(this, _$identity);
|
||||
_$$StepImplCopyWith<_$StepImpl> get copyWith => __$$StepImplCopyWithImpl<_$StepImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -768,18 +753,17 @@ class _$StepImpl implements _Step {
|
||||
}
|
||||
|
||||
abstract class _Step implements Step {
|
||||
const factory _Step(
|
||||
{required final String image,
|
||||
required final String description}) = _$StepImpl;
|
||||
const factory _Step({required final String image, required final String description}) = _$StepImpl;
|
||||
|
||||
factory _Step.fromJson(Map<String, dynamic> json) = _$StepImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get image;
|
||||
|
||||
@override
|
||||
String get description;
|
||||
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$StepImplCopyWith<_$StepImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,19 +6,14 @@ part of 'recipes_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$RecipesImpl _$$RecipesImplFromJson(Map<String, dynamic> json) =>
|
||||
_$RecipesImpl(
|
||||
_$RecipesImpl _$$RecipesImplFromJson(Map<String, dynamic> json) => _$RecipesImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
image: json['image'] as String,
|
||||
state: json['state'] as String,
|
||||
cookingTime: (json['cooking_time'] as num).toInt(),
|
||||
ingredients: (json['ingredients'] as List<dynamic>)
|
||||
.map((e) => Ingredient.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
ingredients: (json['ingredients'] as List<dynamic>).map((e) => Ingredient.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
description: json['description'] as String,
|
||||
steps: (json['steps'] as List<dynamic>)
|
||||
.map((e) => Step.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
steps: (json['steps'] as List<dynamic>).map((e) => Step.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
videoUrl: json['video_url'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
@@ -28,8 +23,7 @@ _$RecipesImpl _$$RecipesImplFromJson(Map<String, dynamic> json) =>
|
||||
commentsCount: (json['comments_count'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$RecipesImplToJson(_$RecipesImpl instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$$RecipesImplToJson(_$RecipesImpl instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'image': instance.image,
|
||||
'state': instance.state,
|
||||
@@ -46,15 +40,13 @@ Map<String, dynamic> _$$RecipesImplToJson(_$RecipesImpl instance) =>
|
||||
'comments_count': instance.commentsCount,
|
||||
};
|
||||
|
||||
_$IngredientImpl _$$IngredientImplFromJson(Map<String, dynamic> json) =>
|
||||
_$IngredientImpl(
|
||||
_$IngredientImpl _$$IngredientImplFromJson(Map<String, dynamic> json) => _$IngredientImpl(
|
||||
name: json['name'] as String,
|
||||
unit: json['unit'] as String?,
|
||||
portion: json['portion'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$IngredientImplToJson(_$IngredientImpl instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$$IngredientImplToJson(_$IngredientImpl instance) => <String, dynamic>{
|
||||
'name': instance.name,
|
||||
'unit': instance.unit,
|
||||
'portion': instance.portion,
|
||||
@@ -65,8 +57,7 @@ _$StepImpl _$$StepImplFromJson(Map<String, dynamic> json) => _$StepImpl(
|
||||
description: json['description'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$StepImplToJson(_$StepImpl instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$$StepImplToJson(_$StepImpl instance) => <String, dynamic>{
|
||||
'image': instance.image,
|
||||
'description': instance.description,
|
||||
};
|
||||
|
||||
@@ -2,14 +2,12 @@ import 'package:eatvio_app/features/feed/models/recipes_model.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'recipes_pagination_model.freezed.dart';
|
||||
|
||||
part 'recipes_pagination_model.g.dart';
|
||||
|
||||
@freezed
|
||||
class RecipesPagination with _$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: "first_page_url") required String firstPageUrl,
|
||||
required int from,
|
||||
|
||||
@@ -22,36 +22,46 @@ RecipesPagination _$RecipesPaginationFromJson(Map<String, dynamic> json) {
|
||||
mixin _$RecipesPagination {
|
||||
@JsonKey(name: 'data')
|
||||
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;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$RecipesPaginationCopyWith<RecipesPagination> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$RecipesPaginationCopyWith<RecipesPagination> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $RecipesPaginationCopyWith<$Res> {
|
||||
factory $RecipesPaginationCopyWith(
|
||||
RecipesPagination value, $Res Function(RecipesPagination) then) =
|
||||
_$RecipesPaginationCopyWithImpl<$Res, RecipesPagination>;
|
||||
factory $RecipesPaginationCopyWith(RecipesPagination value, $Res Function(RecipesPagination) then) = _$RecipesPaginationCopyWithImpl<$Res, RecipesPagination>;
|
||||
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: 'data') List<Recipes> recipesList,
|
||||
@@ -69,12 +79,12 @@ abstract class $RecipesPaginationCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$RecipesPaginationCopyWithImpl<$Res, $Val extends RecipesPagination>
|
||||
implements $RecipesPaginationCopyWith<$Res> {
|
||||
class _$RecipesPaginationCopyWithImpl<$Res, $Val extends RecipesPagination> implements $RecipesPaginationCopyWith<$Res> {
|
||||
_$RecipesPaginationCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -148,11 +158,10 @@ class _$RecipesPaginationCopyWithImpl<$Res, $Val extends RecipesPagination>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipesPaginationImplCopyWith<$Res>
|
||||
implements $RecipesPaginationCopyWith<$Res> {
|
||||
factory _$$RecipesPaginationImplCopyWith(_$RecipesPaginationImpl value,
|
||||
$Res Function(_$RecipesPaginationImpl) then) =
|
||||
abstract class _$$RecipesPaginationImplCopyWith<$Res> implements $RecipesPaginationCopyWith<$Res> {
|
||||
factory _$$RecipesPaginationImplCopyWith(_$RecipesPaginationImpl value, $Res Function(_$RecipesPaginationImpl) then) =
|
||||
__$$RecipesPaginationImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -171,12 +180,9 @@ abstract class _$$RecipesPaginationImplCopyWith<$Res>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipesPaginationImplCopyWithImpl<$Res>
|
||||
extends _$RecipesPaginationCopyWithImpl<$Res, _$RecipesPaginationImpl>
|
||||
class __$$RecipesPaginationImplCopyWithImpl<$Res> extends _$RecipesPaginationCopyWithImpl<$Res, _$RecipesPaginationImpl>
|
||||
implements _$$RecipesPaginationImplCopyWith<$Res> {
|
||||
__$$RecipesPaginationImplCopyWithImpl(_$RecipesPaginationImpl _value,
|
||||
$Res Function(_$RecipesPaginationImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$RecipesPaginationImplCopyWithImpl(_$RecipesPaginationImpl _value, $Res Function(_$RecipesPaginationImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -265,10 +271,10 @@ class _$RecipesPaginationImpl implements _RecipesPagination {
|
||||
required this.total})
|
||||
: _recipesList = recipesList;
|
||||
|
||||
factory _$RecipesPaginationImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$RecipesPaginationImplFromJson(json);
|
||||
factory _$RecipesPaginationImpl.fromJson(Map<String, dynamic> json) => _$$RecipesPaginationImplFromJson(json);
|
||||
|
||||
final List<Recipes> _recipesList;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'data')
|
||||
List<Recipes> get recipesList {
|
||||
@@ -317,50 +323,29 @@ class _$RecipesPaginationImpl implements _RecipesPagination {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipesPaginationImpl &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._recipesList, _recipesList) &&
|
||||
(identical(other.currentPage, currentPage) ||
|
||||
other.currentPage == currentPage) &&
|
||||
(identical(other.firstPageUrl, firstPageUrl) ||
|
||||
other.firstPageUrl == firstPageUrl) &&
|
||||
const DeepCollectionEquality().equals(other._recipesList, _recipesList) &&
|
||||
(identical(other.currentPage, currentPage) || other.currentPage == currentPage) &&
|
||||
(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.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) &&
|
||||
const DeepCollectionEquality().equals(other.prevPageUrl, prevPageUrl) &&
|
||||
(identical(other.to, to) || other.to == to) &&
|
||||
(identical(other.total, total) || other.total == total));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
const DeepCollectionEquality().hash(_recipesList),
|
||||
currentPage,
|
||||
firstPageUrl,
|
||||
from,
|
||||
lastPage,
|
||||
lastPageUrl,
|
||||
nextPageUrl,
|
||||
path,
|
||||
perPage,
|
||||
const DeepCollectionEquality().hash(prevPageUrl),
|
||||
to,
|
||||
total);
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_recipesList), currentPage, firstPageUrl, from, lastPage, lastPageUrl,
|
||||
nextPageUrl, path, perPage, const DeepCollectionEquality().hash(prevPageUrl), to, total);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith =>
|
||||
__$$RecipesPaginationImplCopyWithImpl<_$RecipesPaginationImpl>(
|
||||
this, _$identity);
|
||||
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith => __$$RecipesPaginationImplCopyWithImpl<_$RecipesPaginationImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -385,43 +370,53 @@ abstract class _RecipesPagination implements RecipesPagination {
|
||||
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
|
||||
@JsonKey(name: 'data')
|
||||
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
|
||||
@JsonKey(ignore: true)
|
||||
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,12 +6,8 @@ part of 'recipes_pagination_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$RecipesPaginationImpl _$$RecipesPaginationImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$RecipesPaginationImpl(
|
||||
recipesList: (json['data'] as List<dynamic>)
|
||||
.map((e) => Recipes.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
_$RecipesPaginationImpl _$$RecipesPaginationImplFromJson(Map<String, dynamic> json) => _$RecipesPaginationImpl(
|
||||
recipesList: (json['data'] as List<dynamic>).map((e) => Recipes.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
currentPage: (json['current_page'] as num).toInt(),
|
||||
firstPageUrl: json['first_page_url'] as String,
|
||||
from: (json['from'] as num).toInt(),
|
||||
@@ -25,9 +21,7 @@ _$RecipesPaginationImpl _$$RecipesPaginationImplFromJson(
|
||||
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,
|
||||
'current_page': instance.currentPage,
|
||||
'first_page_url': instance.firstPageUrl,
|
||||
|
||||
@@ -24,6 +24,7 @@ mixin _$FeedState {
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
@@ -70,35 +71,28 @@ mixin _$FeedState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $FeedStateCopyWith<$Res> {
|
||||
factory $FeedStateCopyWith(FeedState value, $Res Function(FeedState) then) =
|
||||
_$FeedStateCopyWithImpl<$Res, FeedState>;
|
||||
factory $FeedStateCopyWith(FeedState value, $Res Function(FeedState) then) = _$FeedStateCopyWithImpl<$Res, FeedState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState>
|
||||
implements $FeedStateCopyWith<$Res> {
|
||||
class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState> implements $FeedStateCopyWith<$Res> {
|
||||
_$FeedStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FeedStateImplCopyWith<$Res> {
|
||||
factory _$$FeedStateImplCopyWith(
|
||||
_$FeedStateImpl value, $Res Function(_$FeedStateImpl) then) =
|
||||
__$$FeedStateImplCopyWithImpl<$Res>;
|
||||
factory _$$FeedStateImplCopyWith(_$FeedStateImpl value, $Res Function(_$FeedStateImpl) then) = __$$FeedStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedStateImplCopyWithImpl<$Res>
|
||||
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateImpl>
|
||||
implements _$$FeedStateImplCopyWith<$Res> {
|
||||
__$$FeedStateImplCopyWithImpl(
|
||||
_$FeedStateImpl _value, $Res Function(_$FeedStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$FeedStateImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateImpl> implements _$$FeedStateImplCopyWith<$Res> {
|
||||
__$$FeedStateImplCopyWithImpl(_$FeedStateImpl _value, $Res Function(_$FeedStateImpl) _then) : super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -113,8 +107,7 @@ class _$FeedStateImpl implements _FeedState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$FeedStateImpl);
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$FeedStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -201,18 +194,14 @@ abstract class _FeedState implements FeedState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FeedStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$FeedStateLoadingImplCopyWith(_$FeedStateLoadingImpl value,
|
||||
$Res Function(_$FeedStateLoadingImpl) then) =
|
||||
factory _$$FeedStateLoadingImplCopyWith(_$FeedStateLoadingImpl value, $Res Function(_$FeedStateLoadingImpl) then) =
|
||||
__$$FeedStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadingImpl>
|
||||
class __$$FeedStateLoadingImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadingImpl>
|
||||
implements _$$FeedStateLoadingImplCopyWith<$Res> {
|
||||
__$$FeedStateLoadingImplCopyWithImpl(_$FeedStateLoadingImpl _value,
|
||||
$Res Function(_$FeedStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$FeedStateLoadingImplCopyWithImpl(_$FeedStateLoadingImpl _value, $Res Function(_$FeedStateLoadingImpl) _then) : super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -227,8 +216,7 @@ class _$FeedStateLoadingImpl implements FeedStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$FeedStateLoadingImpl);
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$FeedStateLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -315,20 +303,15 @@ abstract class FeedStateLoading implements FeedState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FeedStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$FeedStateLoadedImplCopyWith(_$FeedStateLoadedImpl value,
|
||||
$Res Function(_$FeedStateLoadedImpl) then) =
|
||||
__$$FeedStateLoadedImplCopyWithImpl<$Res>;
|
||||
factory _$$FeedStateLoadedImplCopyWith(_$FeedStateLoadedImpl value, $Res Function(_$FeedStateLoadedImpl) then) = __$$FeedStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({List<FeedBlogPostModel> feedBlogPostList});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadedImpl>
|
||||
implements _$$FeedStateLoadedImplCopyWith<$Res> {
|
||||
__$$FeedStateLoadedImplCopyWithImpl(
|
||||
_$FeedStateLoadedImpl _value, $Res Function(_$FeedStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$FeedStateLoadedImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadedImpl> implements _$$FeedStateLoadedImplCopyWith<$Res> {
|
||||
__$$FeedStateLoadedImplCopyWithImpl(_$FeedStateLoadedImpl _value, $Res Function(_$FeedStateLoadedImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -347,15 +330,13 @@ class __$$FeedStateLoadedImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
|
||||
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;
|
||||
|
||||
@override
|
||||
List<FeedBlogPostModel> get feedBlogPostList {
|
||||
if (_feedBlogPostList is EqualUnmodifiableListView)
|
||||
return _feedBlogPostList;
|
||||
if (_feedBlogPostList is EqualUnmodifiableListView) return _feedBlogPostList;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_feedBlogPostList);
|
||||
}
|
||||
@@ -370,20 +351,16 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$FeedStateLoadedImpl &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._feedBlogPostList, _feedBlogPostList));
|
||||
const DeepCollectionEquality().equals(other._feedBlogPostList, _feedBlogPostList));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_feedBlogPostList));
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_feedBlogPostList));
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith =>
|
||||
__$$FeedStateLoadedImplCopyWithImpl<_$FeedStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith => __$$FeedStateLoadedImplCopyWithImpl<_$FeedStateLoadedImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -461,32 +438,25 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FeedStateErrorImplCopyWith<$Res> {
|
||||
factory _$$FeedStateErrorImplCopyWith(_$FeedStateErrorImpl value,
|
||||
$Res Function(_$FeedStateErrorImpl) then) =
|
||||
__$$FeedStateErrorImplCopyWithImpl<$Res>;
|
||||
factory _$$FeedStateErrorImplCopyWith(_$FeedStateErrorImpl value, $Res Function(_$FeedStateErrorImpl) then) = __$$FeedStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateErrorImpl>
|
||||
implements _$$FeedStateErrorImplCopyWith<$Res> {
|
||||
__$$FeedStateErrorImplCopyWithImpl(
|
||||
_$FeedStateErrorImpl _value, $Res Function(_$FeedStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$FeedStateErrorImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateErrorImpl> implements _$$FeedStateErrorImplCopyWith<$Res> {
|
||||
__$$FeedStateErrorImplCopyWithImpl(_$FeedStateErrorImpl _value, $Res Function(_$FeedStateErrorImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -520,8 +490,7 @@ class _$FeedStateErrorImpl implements FeedStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$FeedStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -530,9 +499,7 @@ class _$FeedStateErrorImpl implements FeedStateError {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith =>
|
||||
__$$FeedStateErrorImplCopyWithImpl<_$FeedStateErrorImpl>(
|
||||
this, _$identity);
|
||||
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith => __$$FeedStateErrorImplCopyWithImpl<_$FeedStateErrorImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -610,11 +577,10 @@ class _$FeedStateErrorImpl implements FeedStateError {
|
||||
}
|
||||
|
||||
abstract class FeedStateError implements FeedState {
|
||||
const factory FeedStateError({required final String errorMessage}) =
|
||||
_$FeedStateErrorImpl;
|
||||
const factory FeedStateError({required final String errorMessage}) = _$FeedStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -15,4 +15,4 @@ class RecipesCubit extends Cubit<RecipesState> {
|
||||
emit(RecipesState.error(errorMessage: e.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ mixin _$RecipesState {
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
@@ -70,36 +71,28 @@ mixin _$RecipesState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $RecipesStateCopyWith<$Res> {
|
||||
factory $RecipesStateCopyWith(
|
||||
RecipesState value, $Res Function(RecipesState) then) =
|
||||
_$RecipesStateCopyWithImpl<$Res, RecipesState>;
|
||||
factory $RecipesStateCopyWith(RecipesState value, $Res Function(RecipesState) then) = _$RecipesStateCopyWithImpl<$Res, RecipesState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$RecipesStateCopyWithImpl<$Res, $Val extends RecipesState>
|
||||
implements $RecipesStateCopyWith<$Res> {
|
||||
class _$RecipesStateCopyWithImpl<$Res, $Val extends RecipesState> implements $RecipesStateCopyWith<$Res> {
|
||||
_$RecipesStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipesStateImplCopyWith<$Res> {
|
||||
factory _$$RecipesStateImplCopyWith(
|
||||
_$RecipesStateImpl value, $Res Function(_$RecipesStateImpl) then) =
|
||||
__$$RecipesStateImplCopyWithImpl<$Res>;
|
||||
factory _$$RecipesStateImplCopyWith(_$RecipesStateImpl value, $Res Function(_$RecipesStateImpl) then) = __$$RecipesStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipesStateImplCopyWithImpl<$Res>
|
||||
extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateImpl>
|
||||
implements _$$RecipesStateImplCopyWith<$Res> {
|
||||
__$$RecipesStateImplCopyWithImpl(
|
||||
_$RecipesStateImpl _value, $Res Function(_$RecipesStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$RecipesStateImplCopyWithImpl<$Res> extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateImpl> implements _$$RecipesStateImplCopyWith<$Res> {
|
||||
__$$RecipesStateImplCopyWithImpl(_$RecipesStateImpl _value, $Res Function(_$RecipesStateImpl) _then) : super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -114,8 +107,7 @@ class _$RecipesStateImpl implements _RecipesState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$RecipesStateImpl);
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$RecipesStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -202,18 +194,14 @@ abstract class _RecipesState implements RecipesState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipesStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$RecipesStateLoadingImplCopyWith(_$RecipesStateLoadingImpl value,
|
||||
$Res Function(_$RecipesStateLoadingImpl) then) =
|
||||
factory _$$RecipesStateLoadingImplCopyWith(_$RecipesStateLoadingImpl value, $Res Function(_$RecipesStateLoadingImpl) then) =
|
||||
__$$RecipesStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipesStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateLoadingImpl>
|
||||
class __$$RecipesStateLoadingImplCopyWithImpl<$Res> extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateLoadingImpl>
|
||||
implements _$$RecipesStateLoadingImplCopyWith<$Res> {
|
||||
__$$RecipesStateLoadingImplCopyWithImpl(_$RecipesStateLoadingImpl _value,
|
||||
$Res Function(_$RecipesStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$RecipesStateLoadingImplCopyWithImpl(_$RecipesStateLoadingImpl _value, $Res Function(_$RecipesStateLoadingImpl) _then) : super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -228,9 +216,7 @@ class _$RecipesStateLoadingImpl implements RecipesStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipesStateLoadingImpl);
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$RecipesStateLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -317,20 +303,17 @@ abstract class RecipesStateLoading implements RecipesState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipesStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$RecipesStateLoadedImplCopyWith(_$RecipesStateLoadedImpl value,
|
||||
$Res Function(_$RecipesStateLoadedImpl) then) =
|
||||
factory _$$RecipesStateLoadedImplCopyWith(_$RecipesStateLoadedImpl value, $Res Function(_$RecipesStateLoadedImpl) then) =
|
||||
__$$RecipesStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({List<Recipes> recipesList});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipesStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateLoadedImpl>
|
||||
class __$$RecipesStateLoadedImplCopyWithImpl<$Res> extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateLoadedImpl>
|
||||
implements _$$RecipesStateLoadedImplCopyWith<$Res> {
|
||||
__$$RecipesStateLoadedImplCopyWithImpl(_$RecipesStateLoadedImpl _value,
|
||||
$Res Function(_$RecipesStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$RecipesStateLoadedImplCopyWithImpl(_$RecipesStateLoadedImpl _value, $Res Function(_$RecipesStateLoadedImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -349,10 +332,10 @@ class __$$RecipesStateLoadedImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
|
||||
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;
|
||||
|
||||
@override
|
||||
List<Recipes> get recipesList {
|
||||
if (_recipesList is EqualUnmodifiableListView) return _recipesList;
|
||||
@@ -368,22 +351,17 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
||||
@override
|
||||
bool operator ==(Object 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
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_recipesList));
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_recipesList));
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith =>
|
||||
__$$RecipesStateLoadedImplCopyWithImpl<_$RecipesStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
__$$RecipesStateLoadedImplCopyWithImpl<_$RecipesStateLoadedImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -461,31 +439,27 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
_$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipesStateErrorImplCopyWith<$Res> {
|
||||
factory _$$RecipesStateErrorImplCopyWith(_$RecipesStateErrorImpl value,
|
||||
$Res Function(_$RecipesStateErrorImpl) then) =
|
||||
factory _$$RecipesStateErrorImplCopyWith(_$RecipesStateErrorImpl value, $Res Function(_$RecipesStateErrorImpl) then) =
|
||||
__$$RecipesStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipesStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateErrorImpl>
|
||||
class __$$RecipesStateErrorImplCopyWithImpl<$Res> extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateErrorImpl>
|
||||
implements _$$RecipesStateErrorImplCopyWith<$Res> {
|
||||
__$$RecipesStateErrorImplCopyWithImpl(_$RecipesStateErrorImpl _value,
|
||||
$Res Function(_$RecipesStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$RecipesStateErrorImplCopyWithImpl(_$RecipesStateErrorImpl _value, $Res Function(_$RecipesStateErrorImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -519,8 +493,7 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipesStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -529,9 +502,7 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith =>
|
||||
__$$RecipesStateErrorImplCopyWithImpl<_$RecipesStateErrorImpl>(
|
||||
this, _$identity);
|
||||
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith => __$$RecipesStateErrorImplCopyWithImpl<_$RecipesStateErrorImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -609,11 +580,10 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
|
||||
}
|
||||
|
||||
abstract class RecipesStateError implements RecipesState {
|
||||
const factory RecipesStateError({required final String errorMessage}) =
|
||||
_$RecipesStateErrorImpl;
|
||||
const factory RecipesStateError({required final String errorMessage}) = _$RecipesStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -20,10 +20,11 @@ class _BlogPostWidgetState extends State<BlogPostWidget> {
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
onTap: () => GoRouter.of(context).pushNamed(
|
||||
'blogPostScreen',
|
||||
extra: widget.feedBlogPostModel.id.toString(),
|
||||
),
|
||||
onTap: () =>
|
||||
GoRouter.of(context).pushNamed(
|
||||
'blogPostScreen',
|
||||
extra: widget.feedBlogPostModel.id.toString(),
|
||||
),
|
||||
child: Ink(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/features/chat/presentation/pages/photo_view_screen.dart';
|
||||
import 'package:eatvio_app/features/feed/models/recipes_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
class RecipesWidget extends StatefulWidget {
|
||||
final Recipes recipes;
|
||||
@@ -19,7 +20,7 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
onTap: () {},
|
||||
onTap: () => GoRouter.of(context).pushNamed('aboutRecipesScreen', extra: widget.recipes),
|
||||
child: Ink(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
@@ -30,7 +31,6 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Stack(
|
||||
alignment: Alignment.bottomLeft,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(12)),
|
||||
@@ -52,64 +52,78 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
Positioned(
|
||||
left: 8,
|
||||
bottom: 8,
|
||||
child: Wrap(
|
||||
runSpacing: 8,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white54,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.visibility_rounded,
|
||||
size: 20,
|
||||
color: Colors.black,
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
'0',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
_iconButton(Icons.fastfood, '139.9 ккал'),
|
||||
SizedBox(width: 8),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white54,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.favorite_border_rounded,
|
||||
size: 20,
|
||||
color: Colors.black,
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
'0',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
_iconButton(Icons.timer_rounded, widget.recipes.cookingTime.toString() + ' минут'),
|
||||
SizedBox(width: 8),
|
||||
_iconButton(Icons.fast_forward_rounded, widget.recipes.steps.length.toString() + ' этапов'),
|
||||
],
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 8,
|
||||
top: 8,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.8),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.favorite_rounded,
|
||||
size: 16,
|
||||
color: Colors.black,
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
'0',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
right: 8,
|
||||
top: 8,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.8),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.visibility_rounded,
|
||||
size: 16,
|
||||
color: Colors.black,
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
'0',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
@@ -134,20 +148,6 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
child: Wrap(
|
||||
runSpacing: 8,
|
||||
children: [
|
||||
_iconButton(Icons.fastfood, '139.9 ккал'),
|
||||
SizedBox(width: 8),
|
||||
_iconButton(Icons.timer_rounded, widget.recipes.cookingTime.toString() + ' минут'),
|
||||
SizedBox(width: 8),
|
||||
_iconButton(Icons.fast_forward_rounded, widget.recipes.steps.length.toString() + ' этапов'),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -155,10 +155,10 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
}
|
||||
|
||||
_iconButton(IconData icon, [String? text]) {
|
||||
return Ink(
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.gray100,
|
||||
color: Colors.white.withOpacity(0.8),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
height: 32,
|
||||
@@ -167,16 +167,16 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
children: [
|
||||
Icon(
|
||||
icon,
|
||||
size: 20,
|
||||
color: appTheme.gray600,
|
||||
size: 16,
|
||||
color: Colors.black,
|
||||
),
|
||||
if (text != null) SizedBox(width: 8),
|
||||
if (text != null)
|
||||
Text(
|
||||
text,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: appTheme.gray600,
|
||||
fontSize: 12,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -24,23 +24,22 @@ class _FeedService implements FeedService {
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
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',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/blogPosts/index',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/blogPosts/index',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
final _value = FeedBlogPostSettingsModel.fromJson(_result.data!);
|
||||
return _value;
|
||||
}
|
||||
@@ -51,31 +50,28 @@ class _FeedService implements FeedService {
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
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',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/recipes/index',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/recipes/index',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
final _value = RecipesPagination.fromJson(_result.data!);
|
||||
return _value;
|
||||
}
|
||||
|
||||
RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
|
||||
if (T != dynamic &&
|
||||
!(requestOptions.responseType == ResponseType.bytes ||
|
||||
requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T != dynamic && !(requestOptions.responseType == ResponseType.bytes || requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T == String) {
|
||||
requestOptions.responseType = ResponseType.plain;
|
||||
} else {
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/features/feed/models/recipes_model.dart' as step;
|
||||
import 'package:eatvio_app/features/feed/models/recipes_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AboutRecipesScreen extends StatelessWidget {
|
||||
final Recipes recipes;
|
||||
|
||||
const AboutRecipesScreen({super.key, required this.recipes});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(),
|
||||
body: SingleChildScrollView(
|
||||
padding: EdgeInsets.all(16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(recipes.title),
|
||||
Row(
|
||||
children: [
|
||||
Text(recipes.cookingTime.toString() + ' минут'),
|
||||
SizedBox(width: 16),
|
||||
Text(recipes.steps.length.toString() + ' этапов'),
|
||||
],
|
||||
),
|
||||
Text(recipes.videoUrl),
|
||||
CachedNetworkImage(imageUrl: baseUrl + '/storage/' + recipes.image),
|
||||
Text(recipes.ingredients.toString()),
|
||||
Text('Пошаговый рецепт'),
|
||||
for (int i = 0; i < recipes.steps.length; i++) ...[_step(recipes.steps[i])],
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
_step(step.Step step) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(step.description),
|
||||
if (step.image.length > 1) CachedNetworkImage(imageUrl: baseUrl + '/storage/' + step.image),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,33 +21,31 @@ LocationModel _$LocationModelFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$LocationModel {
|
||||
List<String> get locations => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'response_body')
|
||||
String get responseBody => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$LocationModelCopyWith<LocationModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$LocationModelCopyWith<LocationModel> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
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
|
||||
$Res call(
|
||||
{List<String> locations,
|
||||
@JsonKey(name: 'response_body') String responseBody});
|
||||
$Res call({List<String> locations, @JsonKey(name: 'response_body') String responseBody});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$LocationModelCopyWithImpl<$Res, $Val extends LocationModel>
|
||||
implements $LocationModelCopyWith<$Res> {
|
||||
class _$LocationModelCopyWithImpl<$Res, $Val extends LocationModel> implements $LocationModelCopyWith<$Res> {
|
||||
_$LocationModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -71,25 +69,17 @@ class _$LocationModelCopyWithImpl<$Res, $Val extends LocationModel>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$LocationModelImplCopyWith<$Res>
|
||||
implements $LocationModelCopyWith<$Res> {
|
||||
factory _$$LocationModelImplCopyWith(
|
||||
_$LocationModelImpl value, $Res Function(_$LocationModelImpl) then) =
|
||||
__$$LocationModelImplCopyWithImpl<$Res>;
|
||||
abstract class _$$LocationModelImplCopyWith<$Res> implements $LocationModelCopyWith<$Res> {
|
||||
factory _$$LocationModelImplCopyWith(_$LocationModelImpl value, $Res Function(_$LocationModelImpl) then) = __$$LocationModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{List<String> locations,
|
||||
@JsonKey(name: 'response_body') String responseBody});
|
||||
$Res call({List<String> locations, @JsonKey(name: 'response_body') String responseBody});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$LocationModelImplCopyWithImpl<$Res>
|
||||
extends _$LocationModelCopyWithImpl<$Res, _$LocationModelImpl>
|
||||
implements _$$LocationModelImplCopyWith<$Res> {
|
||||
__$$LocationModelImplCopyWithImpl(
|
||||
_$LocationModelImpl _value, $Res Function(_$LocationModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$LocationModelImplCopyWithImpl<$Res> extends _$LocationModelCopyWithImpl<$Res, _$LocationModelImpl> implements _$$LocationModelImplCopyWith<$Res> {
|
||||
__$$LocationModelImplCopyWithImpl(_$LocationModelImpl _value, $Res Function(_$LocationModelImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -113,15 +103,12 @@ class __$$LocationModelImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
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;
|
||||
|
||||
@override
|
||||
List<String> get locations {
|
||||
if (_locations is EqualUnmodifiableListView) return _locations;
|
||||
@@ -143,22 +130,18 @@ class _$LocationModelImpl implements _LocationModel {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$LocationModelImpl &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._locations, _locations) &&
|
||||
(identical(other.responseBody, responseBody) ||
|
||||
other.responseBody == responseBody));
|
||||
const DeepCollectionEquality().equals(other._locations, _locations) &&
|
||||
(identical(other.responseBody, responseBody) || other.responseBody == responseBody));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@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)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$LocationModelImplCopyWith<_$LocationModelImpl> get copyWith =>
|
||||
__$$LocationModelImplCopyWithImpl<_$LocationModelImpl>(this, _$identity);
|
||||
_$$LocationModelImplCopyWith<_$LocationModelImpl> get copyWith => __$$LocationModelImplCopyWithImpl<_$LocationModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -169,21 +152,19 @@ class _$LocationModelImpl 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;
|
||||
|
||||
factory _LocationModel.fromJson(Map<String, dynamic> json) =
|
||||
_$LocationModelImpl.fromJson;
|
||||
factory _LocationModel.fromJson(Map<String, dynamic> json) = _$LocationModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
List<String> get locations;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'response_body')
|
||||
String get responseBody;
|
||||
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$LocationModelImplCopyWith<_$LocationModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$LocationModelImplCopyWith<_$LocationModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,15 +6,12 @@ part of 'location_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$LocationModelImpl _$$LocationModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$LocationModelImpl(
|
||||
locations:
|
||||
(json['locations'] as List<dynamic>).map((e) => e as String).toList(),
|
||||
_$LocationModelImpl _$$LocationModelImplFromJson(Map<String, dynamic> json) => _$LocationModelImpl(
|
||||
locations: (json['locations'] as List<dynamic>).map((e) => e as String).toList(),
|
||||
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,
|
||||
'response_body': instance.responseBody,
|
||||
};
|
||||
|
||||
@@ -19,15 +19,13 @@ mixin _$RegistrationState {
|
||||
UserRegistrationSheet get sheet => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$RegistrationStateCopyWith<RegistrationState> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$RegistrationStateCopyWith<RegistrationState> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
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
|
||||
$Res call({UserRegistrationSheet sheet});
|
||||
|
||||
@@ -35,12 +33,12 @@ abstract class $RegistrationStateCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$RegistrationStateCopyWithImpl<$Res, $Val extends RegistrationState>
|
||||
implements $RegistrationStateCopyWith<$Res> {
|
||||
class _$RegistrationStateCopyWithImpl<$Res, $Val extends RegistrationState> implements $RegistrationStateCopyWith<$Res> {
|
||||
_$RegistrationStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -67,11 +65,10 @@ class _$RegistrationStateCopyWithImpl<$Res, $Val extends RegistrationState>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RegistrationStateImplCopyWith<$Res>
|
||||
implements $RegistrationStateCopyWith<$Res> {
|
||||
factory _$$RegistrationStateImplCopyWith(_$RegistrationStateImpl value,
|
||||
$Res Function(_$RegistrationStateImpl) then) =
|
||||
abstract class _$$RegistrationStateImplCopyWith<$Res> implements $RegistrationStateCopyWith<$Res> {
|
||||
factory _$$RegistrationStateImplCopyWith(_$RegistrationStateImpl value, $Res Function(_$RegistrationStateImpl) then) =
|
||||
__$$RegistrationStateImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call({UserRegistrationSheet sheet});
|
||||
@@ -81,12 +78,9 @@ abstract class _$$RegistrationStateImplCopyWith<$Res>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RegistrationStateImplCopyWithImpl<$Res>
|
||||
extends _$RegistrationStateCopyWithImpl<$Res, _$RegistrationStateImpl>
|
||||
class __$$RegistrationStateImplCopyWithImpl<$Res> extends _$RegistrationStateCopyWithImpl<$Res, _$RegistrationStateImpl>
|
||||
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')
|
||||
@override
|
||||
@@ -118,9 +112,7 @@ class _$RegistrationStateImpl implements _RegistrationState {
|
||||
@override
|
||||
bool operator ==(Object 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
|
||||
@@ -129,19 +121,16 @@ class _$RegistrationStateImpl implements _RegistrationState {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@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 {
|
||||
const factory _RegistrationState(
|
||||
{required final UserRegistrationSheet sheet}) = _$RegistrationStateImpl;
|
||||
const factory _RegistrationState({required final UserRegistrationSheet sheet}) = _$RegistrationStateImpl;
|
||||
|
||||
@override
|
||||
UserRegistrationSheet get sheet;
|
||||
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$RegistrationStateImplCopyWith<_$RegistrationStateImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$RegistrationStateImplCopyWith<_$RegistrationStateImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ class _CredentialsScreenState extends State<CredentialsScreen> {
|
||||
CustomTextFormField(
|
||||
controller: emailController,
|
||||
textInputType: TextInputType.emailAddress,
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
hintText: 'Введите email',
|
||||
textInputAction: TextInputAction.next,
|
||||
onChanged: (newValue) {
|
||||
|
||||
@@ -19,30 +19,28 @@ class _RegistrationService implements RegistrationService {
|
||||
String? baseUrl;
|
||||
|
||||
@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 queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
final _data = <String, dynamic>{};
|
||||
_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',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/register',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/register',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
final _value = _result.data!.cast<String, String>();
|
||||
return _value;
|
||||
}
|
||||
@@ -53,23 +51,22 @@ class _RegistrationService implements RegistrationService {
|
||||
final queryParameters = <String, dynamic>{r'user_address': query};
|
||||
final _headers = <String, dynamic>{};
|
||||
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',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/location_by_address',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/location_by_address',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
final _value = LocationModel.fromJson(_result.data!);
|
||||
return _value;
|
||||
}
|
||||
@@ -86,31 +83,28 @@ class _RegistrationService implements RegistrationService {
|
||||
};
|
||||
final _headers = <String, dynamic>{};
|
||||
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',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/location_by_coordinate',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/location_by_coordinate',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
final _value = LocationModel.fromJson(_result.data!);
|
||||
return _value;
|
||||
}
|
||||
|
||||
RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
|
||||
if (T != dynamic &&
|
||||
!(requestOptions.responseType == ResponseType.bytes ||
|
||||
requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T != dynamic && !(requestOptions.responseType == ResponseType.bytes || requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T == String) {
|
||||
requestOptions.responseType = ResponseType.plain;
|
||||
} else {
|
||||
|
||||
@@ -13,6 +13,7 @@ class AppLocalization {
|
||||
static final Map<String, Map<String, String>> _localizedValues = {
|
||||
'ru': ru,
|
||||
};
|
||||
|
||||
/*static final Map<String, Map<String, String>> __localizedValues = {
|
||||
'en': enUs
|
||||
};*/
|
||||
@@ -33,6 +34,7 @@ class AppLocalization {
|
||||
}
|
||||
|
||||
static List<String> languages() => _localizedValues.keys.toList();
|
||||
|
||||
String getString(String text) => _localizedValues[locale.languageCode]![text] ?? text;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,13 +12,13 @@ import 'package:eatvio_app/features/calendar/services/calendar_service.dart';
|
||||
import 'package:eatvio_app/features/chat/presentation/bloc/chat_room_cubit/chat_room_cubit.dart';
|
||||
import 'package:eatvio_app/features/chat/repositories/chat_repository.dart';
|
||||
import 'package:eatvio_app/features/chat/services/chat_service.dart';
|
||||
import 'package:eatvio_app/features/diary/presentation/bloc/diary_bloc.dart';
|
||||
import 'package:eatvio_app/features/diary/repositories/diary_repository.dart';
|
||||
import 'package:eatvio_app/features/diary/services/diary_service.dart';
|
||||
import 'package:eatvio_app/features/feed/presentation/bloc/feed_cubit/feed_cubit.dart';
|
||||
import 'package:eatvio_app/features/feed/presentation/bloc/recipes_cubit/recipes_cubit.dart';
|
||||
import 'package:eatvio_app/features/feed/repositories/feed_repository.dart';
|
||||
import 'package:eatvio_app/features/feed/services/feed_service.dart';
|
||||
import 'package:eatvio_app/features/diary/presentation/bloc/diary_bloc.dart';
|
||||
import 'package:eatvio_app/features/diary/repositories/diary_repository.dart';
|
||||
import 'package:eatvio_app/features/diary/services/diary_service.dart';
|
||||
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
|
||||
import 'package:eatvio_app/features/registration/repositories/registration_repository.dart';
|
||||
import 'package:eatvio_app/features/registration/services/registration_service.dart';
|
||||
|
||||
@@ -6,21 +6,22 @@ import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/noti
|
||||
import 'package:eatvio_app/features/calendar/presentation/bloc/calendar_cubit.dart';
|
||||
import 'package:eatvio_app/features/chat/presentation/pages/chat_select_screen/bloc/chat_select_bloc.dart';
|
||||
import 'package:eatvio_app/features/chat/presentation/pages/chat_select_screen/models/chat_select_model.dart';
|
||||
import 'package:eatvio_app/features/diary/presentation/bloc/diary_bloc.dart';
|
||||
import 'package:eatvio_app/features/feed/presentation/bloc/feed_cubit/feed_cubit.dart';
|
||||
import 'package:eatvio_app/features/feed/presentation/bloc/recipes_cubit/recipes_cubit.dart';
|
||||
import 'package:eatvio_app/locator_service.dart' as di;
|
||||
import 'package:eatvio_app/locator_service.dart';
|
||||
import 'package:eatvio_app/features/diary/presentation/bloc/diary_bloc.dart';
|
||||
import 'package:eatvio_app/presentation/profile/my_profile_screen/bloc/my_profile_bloc.dart';
|
||||
import 'package:eatvio_app/presentation/profile/my_profile_screen/models/my_profile_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'core/app_export.dart';
|
||||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:keyboard_dismisser/keyboard_dismisser.dart';
|
||||
import 'package:eatvio_app/locator_service.dart' as di;
|
||||
import 'package:intl/date_symbol_data_local.dart';
|
||||
import 'package:keyboard_dismisser/keyboard_dismisser.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
|
||||
import 'core/app_export.dart';
|
||||
|
||||
var globalMessengerKey = GlobalKey<ScaffoldMessengerState>();
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ class _AuthScreenState extends State<AuthScreen> {
|
||||
return CustomTextFormField(
|
||||
controller: emailController,
|
||||
textInputAction: TextInputAction.next,
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
textInputType: TextInputType.emailAddress,
|
||||
hintText: 'Введите email',
|
||||
);
|
||||
|
||||
@@ -22,6 +22,7 @@ class AuthState extends Equatable {
|
||||
passwordController,
|
||||
authModelObj,
|
||||
];
|
||||
|
||||
AuthState copyWith({
|
||||
TextEditingController? emailController,
|
||||
TextEditingController? passwordController,
|
||||
|
||||
@@ -14,6 +14,7 @@ class DietCreateState extends Equatable {
|
||||
|
||||
@override
|
||||
List<Object?> get props => [dietModelObj];
|
||||
|
||||
DietCreateState copyWith({DietCreateModel? dietModelObj}) {
|
||||
return DietCreateState(
|
||||
dietModelObj: dietModelObj ?? this.dietModelObj,
|
||||
@@ -31,12 +32,14 @@ class DietCreateLoadedState extends DietCreateState {
|
||||
DietCreateModel? dietModelObj;
|
||||
TextEditingController? name;
|
||||
TextEditingController? details;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
dietModelObj,
|
||||
name,
|
||||
details,
|
||||
];
|
||||
|
||||
DietCreateLoadedState copyWith({
|
||||
DietCreateModel? dietModelObj,
|
||||
TextEditingController? name,
|
||||
|
||||
@@ -17,7 +17,9 @@ class DietSelectInitialEvent extends DietSelectEvent {
|
||||
|
||||
class UploadAvatar extends DietSelectEvent {
|
||||
UploadAvatar(this.image);
|
||||
|
||||
final XFile image;
|
||||
|
||||
@override
|
||||
List<Object> get props => [image];
|
||||
}
|
||||
|
||||
@@ -21,11 +21,13 @@ class DietSelectLoadedState extends DietSelectState {
|
||||
|
||||
DietSelectModel? myProfileModelObj;
|
||||
List<dynamic>? posts;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
myProfileModelObj,
|
||||
posts,
|
||||
];
|
||||
|
||||
DietSelectLoadedState copyWith({
|
||||
DietSelectModel? myProfileModelObj,
|
||||
List<dynamic>? posts,
|
||||
|
||||
@@ -17,7 +17,9 @@ class DietInitialEvent extends DietEvent {
|
||||
|
||||
class DeleteEntry extends DietEvent {
|
||||
DeleteEntry(this.id);
|
||||
|
||||
final int id;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id];
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ class DietState extends Equatable {
|
||||
|
||||
@override
|
||||
List<Object?> get props => [dietModelObj];
|
||||
|
||||
DietState copyWith({DietModel? dietModelObj}) {
|
||||
return DietState(
|
||||
dietModelObj: dietModelObj ?? this.dietModelObj,
|
||||
@@ -26,8 +27,10 @@ class DietLoadedState extends DietState {
|
||||
|
||||
DietModel? dietModelObj;
|
||||
Map<String, dynamic>? diet;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [dietModelObj, diet];
|
||||
|
||||
DietLoadedState copyWith({DietModel? dietModelObj, Map<String, dynamic>? diet}) {
|
||||
return DietLoadedState(
|
||||
dietModelObj: dietModelObj ?? this.dietModelObj,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:eatvio_app/app_router.dart';
|
||||
import 'package:eatvio_app/locator_service.dart';
|
||||
@@ -12,7 +13,6 @@ import 'package:image_picker/image_picker.dart';
|
||||
import '/core/app_export.dart';
|
||||
|
||||
part 'blog_post_create_event.dart';
|
||||
|
||||
part 'blog_post_create_state.dart';
|
||||
|
||||
/// A bloc that manages the state of a BlogPostCreate according to the event that is dispatched to it.
|
||||
|
||||
@@ -14,6 +14,7 @@ class BlogPostEditState extends Equatable {
|
||||
|
||||
@override
|
||||
List<Object?> get props => [blog_postModelObj];
|
||||
|
||||
BlogPostEditState copyWith({BlogPostEditModel? blog_postModelObj}) {
|
||||
return BlogPostEditState(
|
||||
blog_postModelObj: blog_postModelObj ?? this.blog_postModelObj,
|
||||
@@ -35,8 +36,10 @@ class BlogPostEditLoadedState extends BlogPostEditState {
|
||||
TextEditingController? title;
|
||||
TextEditingController? description;
|
||||
TextEditingController? youtubeURL;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [blog_postModelObj, blog_post, title, description, youtubeURL];
|
||||
|
||||
BlogPostEditLoadedState copyWith({
|
||||
BlogPostEditModel? blog_postModelObj,
|
||||
Map<String, dynamic>? blog_post,
|
||||
|
||||
@@ -5,7 +5,9 @@ import 'package:equatable/equatable.dart';
|
||||
|
||||
class BlogPostModel extends Equatable {
|
||||
final String blog_postID;
|
||||
|
||||
BlogPostModel({required this.blog_postID, this.comments = const []});
|
||||
|
||||
List<CommentModel> comments;
|
||||
|
||||
BlogPostModel copyWith({String? blog_postID, List<CommentModel>? comments}) {
|
||||
|
||||
@@ -17,14 +17,18 @@ class GlossaryInitialEvent extends GlossaryEvent {
|
||||
|
||||
class DeleteEntry extends GlossaryEvent {
|
||||
DeleteEntry(this.id);
|
||||
|
||||
final int id;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id];
|
||||
}
|
||||
|
||||
class ChangeProductGroup extends GlossaryEvent {
|
||||
ChangeProductGroup(this.id);
|
||||
|
||||
final int id;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id];
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ class GlossaryState extends Equatable {
|
||||
|
||||
@override
|
||||
List<Object?> get props => [glossaryModelObj];
|
||||
|
||||
GlossaryState copyWith({GlossaryModel? glossaryModelObj}) {
|
||||
return GlossaryState(
|
||||
glossaryModelObj: glossaryModelObj ?? this.glossaryModelObj,
|
||||
@@ -33,8 +34,10 @@ class GlossaryLoadedState extends GlossaryState {
|
||||
String? token;
|
||||
List<SelectionPopupModel>? productGroups;
|
||||
List<dynamic>? productList;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [glossaryModelObj, productGroups, productList, token];
|
||||
|
||||
GlossaryLoadedState copyWith({
|
||||
GlossaryModel? glossaryModelObj,
|
||||
String? token,
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:equatable/equatable.dart';
|
||||
|
||||
class GlossaryModel extends Equatable {
|
||||
GlossaryModel();
|
||||
|
||||
GlossaryModel copyWith() {
|
||||
return GlossaryModel();
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ class PlanCreateState extends Equatable {
|
||||
|
||||
@override
|
||||
List<Object?> get props => [planModelObj];
|
||||
|
||||
PlanCreateState copyWith({PlanCreateModel? planModelObj}) {
|
||||
return PlanCreateState(
|
||||
planModelObj: planModelObj ?? this.planModelObj,
|
||||
@@ -31,12 +32,14 @@ class PlanCreateLoadedState extends PlanCreateState {
|
||||
PlanCreateModel? planModelObj;
|
||||
TextEditingController? name;
|
||||
TextEditingController? details;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
planModelObj,
|
||||
name,
|
||||
details,
|
||||
];
|
||||
|
||||
PlanCreateLoadedState copyWith({
|
||||
PlanCreateModel? planModelObj,
|
||||
TextEditingController? name,
|
||||
|
||||
@@ -14,6 +14,7 @@ class PlanEditState extends Equatable {
|
||||
|
||||
@override
|
||||
List<Object?> get props => [planModelObj];
|
||||
|
||||
PlanEditState copyWith({PlanEditModel? planModelObj}) {
|
||||
return PlanEditState(
|
||||
planModelObj: planModelObj ?? this.planModelObj,
|
||||
@@ -35,8 +36,10 @@ class PlanEditLoadedState extends PlanEditState {
|
||||
TextEditingController? name;
|
||||
TextEditingController? details;
|
||||
TextEditingController? duration;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [planModelObj, plan, name, details, duration];
|
||||
|
||||
PlanEditLoadedState copyWith({
|
||||
PlanEditModel? planModelObj,
|
||||
Map<String, dynamic>? plan,
|
||||
|
||||
@@ -17,7 +17,9 @@ class PlanSelectInitialEvent extends PlanSelectEvent {
|
||||
|
||||
class UploadAvatar extends PlanSelectEvent {
|
||||
UploadAvatar(this.image);
|
||||
|
||||
final XFile image;
|
||||
|
||||
@override
|
||||
List<Object> get props => [image];
|
||||
}
|
||||
|
||||
@@ -21,11 +21,13 @@ class PlanSelectLoadedState extends PlanSelectState {
|
||||
|
||||
PlanSelectModel? myProfileModelObj;
|
||||
List<dynamic>? posts;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
myProfileModelObj,
|
||||
posts,
|
||||
];
|
||||
|
||||
PlanSelectLoadedState copyWith({
|
||||
PlanSelectModel? myProfileModelObj,
|
||||
List<dynamic>? posts,
|
||||
|
||||
@@ -17,7 +17,9 @@ class PlanInitialEvent extends PlanEvent {
|
||||
|
||||
class DeleteEntry extends PlanEvent {
|
||||
DeleteEntry(this.id);
|
||||
|
||||
final int id;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id];
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ class PlanState extends Equatable {
|
||||
|
||||
@override
|
||||
List<Object?> get props => [planModelObj];
|
||||
|
||||
PlanState copyWith({PlanModel? planModelObj}) {
|
||||
return PlanState(
|
||||
planModelObj: planModelObj ?? this.planModelObj,
|
||||
@@ -26,8 +27,10 @@ class PlanLoadedState extends PlanState {
|
||||
|
||||
PlanModel? planModelObj;
|
||||
Map<String, dynamic>? plan;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [planModelObj, plan];
|
||||
|
||||
PlanLoadedState copyWith({PlanModel? planModelObj, Map<String, dynamic>? plan}) {
|
||||
return PlanLoadedState(
|
||||
planModelObj: planModelObj ?? this.planModelObj,
|
||||
|
||||
@@ -17,7 +17,9 @@ class MyProfileInitialEvent extends MyProfileEvent {
|
||||
|
||||
class UploadAvatar extends MyProfileEvent {
|
||||
UploadAvatar(this.image);
|
||||
|
||||
final XFile image;
|
||||
|
||||
@override
|
||||
List<Object> get props => [image];
|
||||
}
|
||||
|
||||
@@ -90,6 +90,7 @@ class MyProfileLoadedState extends MyProfileState {
|
||||
String? selectedActivity;
|
||||
String? hypoFormController;
|
||||
String? hyperFormController;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
myProfileModelObj,
|
||||
@@ -127,6 +128,7 @@ class MyProfileLoadedState extends MyProfileState {
|
||||
hypoFormController,
|
||||
hyperFormController,
|
||||
];
|
||||
|
||||
MyProfileLoadedState copyWith({
|
||||
MyProfileModel? myProfileModelObj,
|
||||
Map<String, dynamic>? user,
|
||||
|
||||
@@ -22,19 +22,23 @@ class CreateRecipe extends RecipeCreateEvent {
|
||||
|
||||
class AddStep extends RecipeCreateEvent {
|
||||
AddStep();
|
||||
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
|
||||
class RemoveStep extends RecipeCreateEvent {
|
||||
RemoveStep(this.id);
|
||||
|
||||
final int id;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id];
|
||||
}
|
||||
|
||||
class ReloadScreen extends RecipeCreateEvent {
|
||||
ReloadScreen();
|
||||
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ class RecipeCreateState extends Equatable {
|
||||
|
||||
@override
|
||||
List<Object?> get props => [recipeModelObj];
|
||||
|
||||
RecipeCreateState copyWith({RecipeCreateModel? recipeModelObj}) {
|
||||
return RecipeCreateState(
|
||||
recipeModelObj: recipeModelObj ?? this.recipeModelObj,
|
||||
@@ -41,6 +42,7 @@ class RecipeCreateLoadedState extends RecipeCreateState {
|
||||
TextEditingController? tags;
|
||||
List<dynamic>? steps;
|
||||
List<TextEditingController>? stepDescriptions;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
recipeModelObj,
|
||||
@@ -52,6 +54,7 @@ class RecipeCreateLoadedState extends RecipeCreateState {
|
||||
tags,
|
||||
stepDescriptions,
|
||||
];
|
||||
|
||||
RecipeCreateLoadedState copyWith({
|
||||
RecipeCreateModel? recipeModelObj,
|
||||
String? token,
|
||||
|
||||
@@ -22,19 +22,23 @@ class EditRecipe extends RecipeEditEvent {
|
||||
|
||||
class AddStep extends RecipeEditEvent {
|
||||
AddStep();
|
||||
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
|
||||
class RemoveStep extends RecipeEditEvent {
|
||||
RemoveStep(this.id);
|
||||
|
||||
final int id;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id];
|
||||
}
|
||||
|
||||
class ReloadScreen extends RecipeEditEvent {
|
||||
ReloadScreen();
|
||||
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ class RecipeEditState extends Equatable {
|
||||
|
||||
@override
|
||||
List<Object?> get props => [recipeModelObj];
|
||||
|
||||
RecipeEditState copyWith({RecipeEditModel? recipeModelObj}) {
|
||||
return RecipeEditState(
|
||||
recipeModelObj: recipeModelObj ?? this.recipeModelObj,
|
||||
@@ -45,8 +46,10 @@ class RecipeEditLoadedState extends RecipeEditState {
|
||||
List<dynamic>? steps;
|
||||
List<dynamic>? tags;
|
||||
List<TextEditingController>? stepDescriptions;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [recipeModelObj, recipe, title, description, video_url];
|
||||
|
||||
RecipeEditLoadedState copyWith({
|
||||
RecipeEditModel? recipeModelObj,
|
||||
Map<String, dynamic>? recipe,
|
||||
|
||||
@@ -17,7 +17,9 @@ class RecipeSelectInitialEvent extends RecipeSelectEvent {
|
||||
|
||||
class UploadAvatar extends RecipeSelectEvent {
|
||||
UploadAvatar(this.image);
|
||||
|
||||
final XFile image;
|
||||
|
||||
@override
|
||||
List<Object> get props => [image];
|
||||
}
|
||||
|
||||
@@ -21,11 +21,13 @@ class RecipeSelectLoadedState extends RecipeSelectState {
|
||||
|
||||
RecipeSelectModel? myProfileModelObj;
|
||||
List<dynamic>? posts;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
myProfileModelObj,
|
||||
posts,
|
||||
];
|
||||
|
||||
RecipeSelectLoadedState copyWith({
|
||||
RecipeSelectModel? myProfileModelObj,
|
||||
List<dynamic>? posts,
|
||||
|
||||
@@ -17,14 +17,18 @@ class RecipeInitialEvent extends RecipeEvent {
|
||||
|
||||
class DeleteEntry extends RecipeEvent {
|
||||
DeleteEntry(this.id);
|
||||
|
||||
final int id;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id];
|
||||
}
|
||||
|
||||
class CreateComment extends RecipeEvent {
|
||||
CreateComment(this.body);
|
||||
|
||||
final String body;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [body];
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ class RecipeState extends Equatable {
|
||||
|
||||
@override
|
||||
List<Object?> get props => [recipeModelObj];
|
||||
|
||||
RecipeState copyWith({RecipeModel? recipeModelObj}) {
|
||||
return RecipeState(
|
||||
recipeModelObj: recipeModelObj ?? this.recipeModelObj,
|
||||
@@ -41,6 +42,7 @@ class RecipeLoadedState extends RecipeState {
|
||||
List<dynamic>? steps;
|
||||
List<dynamic>? tags;
|
||||
String? token;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
recipeModelObj,
|
||||
@@ -51,6 +53,7 @@ class RecipeLoadedState extends RecipeState {
|
||||
commentController,
|
||||
steps,
|
||||
];
|
||||
|
||||
RecipeLoadedState copyWith({
|
||||
RecipeModel? recipeModelObj,
|
||||
Map<String, dynamic>? recipe,
|
||||
|
||||
@@ -21,11 +21,13 @@ class SubscribersLoadedState extends SubscribersState {
|
||||
|
||||
SubscribersModel? myProfileModelObj;
|
||||
dynamic subscribers;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
myProfileModelObj,
|
||||
subscribers,
|
||||
];
|
||||
|
||||
SubscribersLoadedState copyWith({
|
||||
SubscribersModel? myProfileModelObj,
|
||||
dynamic subscribers,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user