feature(registration): remove .env

This commit is contained in:
mso7nueh
2024-07-15 17:06:13 +03:00
parent 726b74a236
commit d859a15cfd
188 changed files with 2509 additions and 3147 deletions

3
.env
View File

@@ -1,3 +0,0 @@
SERVER_ROOT='https://mobile-stage.eatvio.ru/api'
STORAGE_URL='https://mobile-stage.eatvio.ru/storage/'
OFERTA='https://mobile-stage.eatvio.ru/oferta_bs.pdf'

View File

@@ -78,7 +78,6 @@ jobs:
- name: Test
run: |
touch .env
flutter test
- name: Build apk

View File

@@ -89,7 +89,6 @@ jobs:
- name: Test
run: |
touch .env
flutter test
- name: Build apk

1
.gitignore vendored
View File

@@ -6,5 +6,4 @@
/.flutter-plugins
/.flutter-plugins-dependencies
/.packages
/.env
/node_modules/

View File

@@ -1,23 +1,23 @@
import 'package:eatvio_app/core/initialization_cubit/initialization_cubit.dart';
import 'package:eatvio_app/core/token_storage.dart';
import 'package:eatvio_app/features/blog_post/presentation/pages/blog_post_screen.dart';
import 'package:eatvio_app/features/blog_post_create/presentation/pages/blog_post_create_screen.dart';
import 'package:eatvio_app/features/bottom_navigation_bar/presentation/widgets/bottom_navigation_bar_widget.dart';
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/feed/presentation/pages/feed_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/diary/diary_edit_screen/diary_edit_screen.dart';
import 'package:eatvio_app/presentation/diets/diet_create_screen/diet_create_screen.dart';
import 'package:eatvio_app/presentation/diets/diet_select_screen/diet_select_screen.dart';
import 'package:eatvio_app/features/blog_post_create/presentation/pages/blog_post_create_screen.dart';
import 'package:eatvio_app/presentation/feed/blog_post_edit_screen/blog_post_edit_screen.dart';
import 'package:eatvio_app/features/blog_post/presentation/pages/blog_post_screen.dart';
import 'package:eatvio_app/features/feed/presentation/pages/feed_screen.dart';
import 'package:eatvio_app/presentation/glossary/glossary_screen/glossary_screen.dart';
import 'package:eatvio_app/presentation/plans/plan_select_screen/plan_select_screen.dart';
import 'package:eatvio_app/presentation/profile/my_profile_screen/my_profile_screen.dart';
import 'package:eatvio_app/presentation/profile/my_profile_screen/my_settings_screen.dart';
import 'package:eatvio_app/presentation/recipe/recipe_select_screen/recipe_select_screen.dart';
import 'package:eatvio_app/features/bottom_navigation_bar/presentation/widgets/bottom_navigation_bar_widget.dart';
import 'package:eatvio_app/features/chat/presentation/pages/photo_view_screen.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';

View File

@@ -1,6 +1,6 @@
export 'package:flutter_bloc/flutter_bloc.dart';
export 'package:eatvio_app/core/constants/constants.dart';
export 'package:eatvio_app/core/errors/exceptions.dart';
export 'package:eatvio_app/core/utils/date_time_utils.dart';
export 'package:eatvio_app/core/utils/image_constant.dart';
export 'package:eatvio_app/core/utils/logger.dart';
export 'package:eatvio_app/core/utils/pref_utils.dart';
@@ -11,6 +11,7 @@ export 'package:eatvio_app/theme/app_decoration.dart';
export 'package:eatvio_app/theme/custom_text_style.dart';
export 'package:eatvio_app/theme/theme_helper.dart';
export 'package:eatvio_app/widgets/custom_image_view.dart';
export 'package:flutter_bloc/flutter_bloc.dart';
export '../theme/bloc/theme_bloc.dart';
export '../theme/custom_button_style.dart';
export 'package:eatvio_app/core/utils/date_time_utils.dart';

View File

@@ -1 +1 @@
const String baseUrl = 'https://mobile-stage.eatvio.ru';

View File

@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:eatvio_app/main.dart';
import 'package:flutter/material.dart';
class ServerException implements Exception {}
@@ -13,8 +13,7 @@ class NoInternetException implements Exception {
NoInternetException([String message = 'NoInternetException Occurred']) {
if (globalMessengerKey.currentState != null) {
globalMessengerKey.currentState!
.showSnackBar(SnackBar(content: Text(message)));
globalMessengerKey.currentState!.showSnackBar(SnackBar(content: Text(message)));
}
this._message = message;
}

View File

@@ -70,14 +70,12 @@ 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
@@ -88,18 +86,14 @@ class _$InitializationStateCopyWithImpl<$Res, $Val extends InitializationState>
/// @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 +108,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 +195,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 +218,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 +305,16 @@ 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 +347,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 +356,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 +435,25 @@ 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 +488,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 +497,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 +576,9 @@ 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;
}

View File

@@ -24,15 +24,13 @@ class ImageConstant {
// Блог images
static String imgRectangle14 = '$imagePath/img_rectangle_14.png';
static String imgRectangle14220x341 =
'$imagePath/img_rectangle_14_220x341.png';
static String imgRectangle14220x341 = '$imagePath/img_rectangle_14_220x341.png';
// Блог - Tab Container images
static String imgCrop = '$imagePath/img_crop.svg';
// Статья images
static String imgRectangle14220x375 =
'$imagePath/img_rectangle_14_220x375.png';
static String imgRectangle14220x375 = '$imagePath/img_rectangle_14_220x375.png';
static String imgVector = '$imagePath/img_vector.svg';
@@ -116,13 +114,11 @@ class ImageConstant {
static String imgNavBlueGray400 = '$imagePath/img_nav_blue_gray_400.svg';
static String imgNavBlueGray40024x23 =
'$imagePath/img_nav_blue_gray_400_24x23.svg';
static String imgNavBlueGray40024x23 = '$imagePath/img_nav_blue_gray_400_24x23.svg';
static String imgNavPrimary = '$imagePath/img_nav_primary.svg';
static String imgNavBlueGray40024x25 =
'$imagePath/img_nav_blue_gray_400_24x25.svg';
static String imgNavBlueGray40024x25 = '$imagePath/img_nav_blue_gray_400_24x25.svg';
static String imgEye = '$imagePath/img_eye.svg';
@@ -134,11 +130,9 @@ class ImageConstant {
static String imgEllipse142x42 = '$imagePath/img_ellipse_1_42x42.png';
static String imgIconMoreHorizontal =
'$imagePath/img_icon_more_horizontal.svg';
static String imgIconMoreHorizontal = '$imagePath/img_icon_more_horizontal.svg';
static String imgRectangle14250x311 =
'$imagePath/img_rectangle_14_250x311.png';
static String imgRectangle14250x311 = '$imagePath/img_rectangle_14_250x311.png';
static String imgIconMessageSquare = '$imagePath/img_icon_message_square.svg';

View File

@@ -8,18 +8,19 @@ class ProgressDialogUtils {
static void showProgressDialog({BuildContext? context, isCancellable = false}) async {
if (!isProgressVisible && AppRouter.navigatorKey.currentState?.overlay?.context != null) {
showDialog(
barrierDismissible: isCancellable,
context: AppRouter.navigatorKey.currentState!.overlay!.context,
builder: (BuildContext context) {
return Center(
child: CircularProgressIndicator.adaptive(
strokeWidth: 4,
valueColor: AlwaysStoppedAnimation<Color>(
Colors.white,
),
barrierDismissible: isCancellable,
context: AppRouter.navigatorKey.currentState!.overlay!.context,
builder: (BuildContext context) {
return Center(
child: CircularProgressIndicator.adaptive(
strokeWidth: 4,
valueColor: AlwaysStoppedAnimation<Color>(
Colors.white,
),
);
},);
),
);
},
);
isProgressVisible = true;
}
}

View File

@@ -3,7 +3,8 @@ import 'package:flutter/material.dart';
// This functions are responsible to make UI responsive across all the mobile devices.
MediaQueryData mediaQueryData = MediaQueryData.fromView(
WidgetsBinding.instance.platformDispatcher.views.single,);
WidgetsBinding.instance.platformDispatcher.views.single,
);
// These are the Viewport values of your Figma Design.
// These are used in the code as a reference to create your UI Responsively.
@@ -30,8 +31,7 @@ extension ResponsiveExtension on num {
double get h => ((this * _width) / FIGMA_DESIGN_WIDTH);
///This method is used to set padding/margin (for the top and bottom side) & height of the screen or widget according to the Viewport height.
double get v =>
(this * _height) / (FIGMA_DESIGN_HEIGHT - FIGMA_DESIGN_STATUS_BAR);
double get v => (this * _height) / (FIGMA_DESIGN_HEIGHT - FIGMA_DESIGN_STATUS_BAR);
///This method is used to set smallest px in image height and width
double get adaptSize {

View File

@@ -8,7 +8,6 @@ class SelectionPopupModel with _$SelectionPopupModel {
int? id,
required String title,
dynamic value,
@Default(false)
bool isSelected,
@Default(false) bool isSelected,
}) = _SelectionPopupModel;
}

View File

@@ -22,22 +22,19 @@ mixin _$SelectionPopupModel {
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
@@ -75,10 +72,8 @@ 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
@@ -86,12 +81,9 @@ abstract class _$$SelectionPopupModelImplCopyWith<$Res>
}
/// @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 +117,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,28 +142,21 @@ 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;
@@ -184,6 +168,5 @@ abstract class _SelectionPopupModel implements SelectionPopupModel {
bool get isSelected;
@override
@JsonKey(ignore: true)
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -1,4 +1,5 @@
import 'package:hive/hive.dart';
/// https://pub.dev/packages/flutter_secure_storage TODO replace hive to secure_storage for token storage
@HiveType(typeId: 0)
class TokenModel {

View File

@@ -7,17 +7,12 @@ part 'user_registration_model.g.dart';
class UserRegistrationSheet with _$UserRegistrationSheet {
const factory UserRegistrationSheet({
required String name,
@JsonKey(name: 'first_name')
required String firstName,
@JsonKey(name: 'last_name')
required String lastName,
@JsonKey(name: 'first_name') required String firstName,
@JsonKey(name: 'last_name') required String lastName,
required String email,
required String password,
@JsonKey(name: 'password_confirmation')
required String passwordConfirmation,
@Default('accepted')
@JsonKey(name: 'terms')
String termsAccepted,
@JsonKey(name: 'password_confirmation') required String passwordConfirmation,
@Default('accepted') @JsonKey(name: 'terms') String termsAccepted,
required String birthdate,
required String gender,
required String country,
@@ -25,35 +20,20 @@ class UserRegistrationSheet with _$UserRegistrationSheet {
required String lang,
required int weight,
required int height,
@JsonKey(name: 'chest_circumference')
required int chestCircumference,
@JsonKey(name: 'waist_circumference')
required int waistCircumference,
@JsonKey(name: 'hip_circumference')
required int hipCircumference,
@JsonKey(name: 'blood_pressure_up')
required int bloodPressureUp,
@JsonKey(name: 'blood_pressure_down')
required int bloodPressureDown,
@JsonKey(name: 'has_hypo')
required int hasHypo,
@JsonKey(name: 'has_hyper')
required int hasHyper,
@JsonKey(name: 'about_alergy')
required String aboutAllergy,
@JsonKey(name: 'about_taking_pils')
required String aboutTakingPils,
@JsonKey(name: 'about_sport_hobbies')
required String aboutSportHobbies,
@JsonKey(name: 'favorite_foods')
required String favoriteFoods,
@JsonKey(name: 'unfavorite_foods')
required String unfavoriteFoods,
@JsonKey(name: 'additional_info')
required String additionalInfo,
@Default(1.2)
@JsonKey(name: 'activity_coefficient')
double activityCoefficient,
@JsonKey(name: 'chest_circumference') required int chestCircumference,
@JsonKey(name: 'waist_circumference') required int waistCircumference,
@JsonKey(name: 'hip_circumference') required int hipCircumference,
@JsonKey(name: 'blood_pressure_up') required int bloodPressureUp,
@JsonKey(name: 'blood_pressure_down') required int bloodPressureDown,
@JsonKey(name: 'has_hypo') required int hasHypo,
@JsonKey(name: 'has_hyper') required int hasHyper,
@JsonKey(name: 'about_alergy') required String aboutAllergy,
@JsonKey(name: 'about_taking_pils') required String aboutTakingPils,
@JsonKey(name: 'about_sport_hobbies') required String aboutSportHobbies,
@JsonKey(name: 'favorite_foods') required String favoriteFoods,
@JsonKey(name: 'unfavorite_foods') required String unfavoriteFoods,
@JsonKey(name: 'additional_info') required String additionalInfo,
@Default(1.2) @JsonKey(name: 'activity_coefficient') double activityCoefficient,
}) = _UserRegistrationSheet;
factory UserRegistrationSheet.fromJson(Map<String, Object?> json) => _$UserRegistrationSheetFromJson(json);

View File

@@ -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);
}
@@ -70,14 +69,12 @@ mixin _$UserRegistrationSheet {
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(
@@ -112,9 +109,7 @@ 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
@@ -272,11 +267,8 @@ 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
@@ -312,13 +304,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
@@ -478,8 +466,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,
@@ -503,8 +490,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
final String name;
@@ -592,52 +578,33 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
(other.runtimeType == runtimeType &&
other is _$UserRegistrationSheetImpl &&
(identical(other.name, name) || other.name == name) &&
(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.country, country) || other.country == country) &&
(identical(other.city, city) || other.city == city) &&
(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)
@@ -677,9 +644,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() {
@@ -696,8 +662,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,
@@ -706,28 +671,22 @@ 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
String get name;
@@ -805,6 +764,5 @@ abstract class _UserRegistrationSheet implements UserRegistrationSheet {
double get activityCoefficient;
@override
@JsonKey(ignore: true)
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl>
get copyWith => throw _privateConstructorUsedError;
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -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(
name: json['name'] as String,
firstName: json['first_name'] as String,
lastName: json['last_name'] as String,
@@ -36,13 +34,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>{
'name': instance.name,
'first_name': instance.firstName,
'last_name': instance.lastName,

View File

@@ -18,6 +18,5 @@ class BlogPostModel with _$BlogPostModel {
required String title,
}) = _BlogPostModel;
factory BlogPostModel.fromJson(Map<String, Object?> json) =>
_$BlogPostModelFromJson(json);
factory BlogPostModel.fromJson(Map<String, Object?> json) => _$BlogPostModelFromJson(json);
}

View File

@@ -36,15 +36,12 @@ mixin _$BlogPostModel {
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,8 +57,7 @@ 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
@@ -129,11 +125,8 @@ 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 +143,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 +220,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 +259,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,8 +298,7 @@ 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;
@@ -346,6 +325,5 @@ abstract class _BlogPostModel implements BlogPostModel {
String get title;
@override
@JsonKey(ignore: true)
_$$BlogPostModelImplCopyWith<_$BlogPostModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$BlogPostModelImplCopyWith<_$BlogPostModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -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,

View File

@@ -5,8 +5,7 @@ import 'package:eatvio_app/features/blog_post/repositories/blog_post_repository.
class BlogPostCubit extends Cubit<BlogPostState> {
final BlogPostRepository blogPostRepository;
BlogPostCubit({required this.blogPostRepository})
: super(const BlogPostState.loading());
BlogPostCubit({required this.blogPostRepository}) : super(const BlogPostState.loading());
loadBlogPost(String blogPostID) async {
emit(const BlogPostState.loading());

View File

@@ -70,14 +70,11 @@ 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
@@ -88,18 +85,12 @@ class _$BlogPostStateCopyWithImpl<$Res, $Val extends BlogPostState>
/// @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 +105,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 +192,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 +214,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,8 +301,7 @@ 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 +310,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 +352,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 +362,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 +440,25 @@ 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 +492,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 +502,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 +580,9 @@ 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;
}

View File

@@ -1,15 +1,14 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/features/blog_post/presentation/bloc/blog_post_cubit.dart';
import 'package:eatvio_app/features/blog_post/presentation/bloc/blog_post_state.dart';
import 'package:eatvio_app/locator_service.dart';
import 'package:go_router/go_router.dart';
import 'package:flutter/cupertino.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:eatvio_app/widgets/custom_edit_text_form_field.dart';
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:intl/intl.dart';
class BlogPostScreen extends StatelessWidget {
final String blogPostID;
@@ -97,8 +96,7 @@ class BlogPostScreen extends StatelessWidget {
),
),
CachedNetworkImage(
imageUrl: dotenv.env['STORAGE_URL']! +
(state.blogPost.author_avatar_path ?? ''),
imageUrl: baseUrl + '/storage/' + (state.blogPost.author_avatar_path ?? ''),
imageBuilder: (context, imageProvider) => CircleAvatar(
backgroundImage: imageProvider,
radius: 25,
@@ -221,7 +219,7 @@ class BlogPostScreen extends StatelessWidget {
_buildImage(BlogPostStateLoaded state) {
return CachedNetworkImage(
imageUrl: dotenv.env['STORAGE_URL']! + (state.blogPost.image ?? ""),
imageUrl: baseUrl + '/storage/' + (state.blogPost.image ?? ""),
imageBuilder: (context, imageProvider) => Stack(
children: [
ClipRRect(

View File

@@ -8,6 +8,6 @@ part 'blog_post_service.g.dart';
abstract class BlogPostService {
factory BlogPostService(Dio dio, {String baseUrl}) = _BlogPostService;
@GET('/feed/show/{id}')
@GET('/api/feed/show/{id}')
Future<BlogPostModel> getBlogPost(@Path() String id);
}

View File

@@ -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,
'/feed/show/${id}',
queryParameters: queryParameters,
data: _data,
)
.copyWith(
baseUrl: _combineBaseUrls(
_dio.options.baseUrl,
baseUrl,
))));
.compose(
_dio.options,
'/api/feed/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 {

View File

@@ -1,4 +1,5 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part '../../../presentation/feed/blog_post_create_screen/models/blog_post_create_credentials_model.freezed.dart';
part '../../../presentation/feed/blog_post_create_screen/models/blog_post_create_credentials_model.g.dart';

View File

@@ -1,11 +1,13 @@
import '../../../../presentation/feed/blog_post_create_screen/bloc/blog_post_create_bloc.dart';
import '../../../../presentation/feed/blog_post_create_screen/models/blog_post_create_model.dart';
import 'dart:io';
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
import 'dart:io';
import '../../../../presentation/feed/blog_post_create_screen/bloc/blog_post_create_bloc.dart';
import '../../../../presentation/feed/blog_post_create_screen/models/blog_post_create_model.dart';
class BlogPostCreateScreen extends StatelessWidget {
const BlogPostCreateScreen({Key? key}) : super(key: key);
@@ -13,9 +15,7 @@ class BlogPostCreateScreen extends StatelessWidget {
static Widget builder(BuildContext context) {
final blog_postID = ModalRoute.of(context)!.settings.arguments;
return BlocProvider<BlogPostCreateBloc>(
create: (context) => BlogPostCreateBloc(BlogPostCreateState(
blog_postModelObj:
BlogPostCreateModel(blog_postID: blog_postID.toString())))
create: (context) => BlogPostCreateBloc(BlogPostCreateState(blog_postModelObj: BlogPostCreateModel(blog_postID: blog_postID.toString())))
..add(BlogPostCreateInitialEvent()),
child: BlogPostCreateScreen(),
);
@@ -77,15 +77,13 @@ class BlogPostCreateScreen extends StatelessWidget {
children: [
Column(
children: <Widget>[
Text("Заголовок новости",
style: theme.textTheme.bodyLarge),
Text("Заголовок новости", style: theme.textTheme.bodyLarge),
CustomTextFormField(
controller: state.title,
validator: _validateTitle,
),
SizedBox(height: 8.0),
Text("Ссылка на YouTube",
style: theme.textTheme.bodyLarge),
Text("Ссылка на YouTube", style: theme.textTheme.bodyLarge),
CustomTextFormField(
controller: state.youtubeURL,
validator: _validateYouTubeLink,
@@ -102,8 +100,7 @@ class BlogPostCreateScreen extends StatelessWidget {
SizedBox(height: 16.0),
// Add widget for image upload here
CustomOutlinedButton(
onPressed: () => _submitForm(context, state.title!.text,
state.description!.text, state.youtubeURL!.text),
onPressed: () => _submitForm(context, state.title!.text, state.description!.text, state.youtubeURL!.text),
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
text: 'Создать',
),
@@ -119,20 +116,16 @@ class BlogPostCreateScreen extends StatelessWidget {
}
}
_submitForm(
BuildContext context, String title, String description, String youtubeURL) {
_submitForm(BuildContext context, String title, String description, String youtubeURL) {
String? titleError = _validateTitle(title);
String? descriptionError = _validateDescription(description);
String? youtubeURLError = _validateYouTubeLink(youtubeURL);
if (titleError != null ||
descriptionError != null ||
youtubeURLError != null) {
if (titleError != null || descriptionError != null || youtubeURLError != null) {
// Display error messages or handle invalid input as needed
// For example, show a snackbar with the error message
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(titleError ?? descriptionError ?? youtubeURLError!)),
SnackBar(content: Text(titleError ?? descriptionError ?? youtubeURLError!)),
);
} else {
// Proceed with form submission
@@ -233,7 +226,6 @@ String? _validateYouTubeLink(value) {
}
bool _isValidUrl(String url) {
final RegExp urlRegExp =
new RegExp(r"^(http|https):\/\/([\w-]+\.)+[\w-]+(\/[\w-./?%&=]*)?$");
final RegExp urlRegExp = new RegExp(r"^(http|https):\/\/([\w-]+\.)+[\w-]+(\/[\w-./?%&=]*)?$");
return urlRegExp.hasMatch(url);
}

View File

@@ -8,8 +8,7 @@ class BlogRepository {
required this.blogService,
});
Future<BlogPostCreateCredentialsModel> createBlogPost(
BlogPostCreateCredentialsModel model) async {
Future<BlogPostCreateCredentialsModel> createBlogPost(BlogPostCreateCredentialsModel model) async {
try {
return (await blogService.createBlogPost(model));
} catch (e) {

View File

@@ -1,5 +1,5 @@
import 'package:eatvio_app/features/blog_post_create/models/blog_post_create_credentials_model.dart';
import 'package:dio/dio.dart';
import 'package:eatvio_app/features/blog_post_create/models/blog_post_create_credentials_model.dart';
import 'package:retrofit/retrofit.dart';
part 'blog_service.g.dart';
@@ -8,7 +8,6 @@ part 'blog_service.g.dart';
abstract class BlogService {
factory BlogService(Dio dio, {String baseUrl}) = _BlogService;
@POST('/blog_post/create')
Future<BlogPostCreateCredentialsModel> createBlogPost(
BlogPostCreateCredentialsModel model);
@POST('/api/blog_post/create')
Future<BlogPostCreateCredentialsModel> createBlogPost(BlogPostCreateCredentialsModel model);
}

View File

@@ -19,37 +19,33 @@ class _BlogService implements BlogService {
String? baseUrl;
@override
Future<BlogPostCreateCredentialsModel> createBlogPost(
BlogPostCreateCredentialsModel model) async {
Future<BlogPostCreateCredentialsModel> createBlogPost(BlogPostCreateCredentialsModel model) async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
const Map<String, dynamic>? _data = null;
final _result = await _dio.fetch<Map<String, dynamic>>(
_setStreamType<BlogPostCreateCredentialsModel>(Options(
final _result = await _dio.fetch<Map<String, dynamic>>(_setStreamType<BlogPostCreateCredentialsModel>(Options(
method: 'POST',
headers: _headers,
extra: _extra,
)
.compose(
_dio.options,
'/blog_post/create',
queryParameters: queryParameters,
data: _data,
)
.copyWith(
baseUrl: _combineBaseUrls(
_dio.options.baseUrl,
baseUrl,
))));
.compose(
_dio.options,
'/api/blog_post/create',
queryParameters: queryParameters,
data: _data,
)
.copyWith(
baseUrl: _combineBaseUrls(
_dio.options.baseUrl,
baseUrl,
))));
final _value = BlogPostCreateCredentialsModel.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 {

View File

@@ -70,14 +70,11 @@ 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
@@ -88,18 +85,14 @@ class _$NewMessagesStateCopyWithImpl<$Res, $Val extends NewMessagesState>
/// @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 +107,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 +194,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 +216,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 +303,16 @@ 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 +346,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 +355,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 +434,25 @@ 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 +486,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 +495,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 +574,9 @@ 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;
}

View File

@@ -70,14 +70,12 @@ 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
@@ -88,18 +86,14 @@ class _$NotificationsStateCopyWithImpl<$Res, $Val extends NotificationsState>
/// @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 +108,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 +195,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 +217,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 +304,16 @@ 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 +348,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 +357,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 +436,25 @@ 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 +488,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 +497,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 +576,9 @@ 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;
}

View File

@@ -1,13 +1,13 @@
import 'package:badges/badges.dart' as badges;
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/new_messages_cubit/new_messages_cubit.dart';
import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/new_messages_cubit/new_messages_state.dart';
import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_cubit.dart';
import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_state.dart';
import 'package:flutter/material.dart';
import 'package:eatvio_app/widgets/custom_navigation_menu.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:go_router/go_router.dart';
import 'package:badges/badges.dart' as badges;
int currentBottomNavBarIndex = 0;

View File

@@ -1,7 +1,6 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'chat_message_model.freezed.dart';
part 'chat_message_model.g.dart';
@freezed

View File

@@ -31,15 +31,12 @@ mixin _$ChatMessageModel {
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,8 +47,7 @@ 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
@@ -94,10 +90,8 @@ 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
@@ -110,12 +104,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,8 +153,7 @@ 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;
@@ -199,25 +189,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,15 +213,13 @@ 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;
@@ -254,6 +236,5 @@ abstract class _ChatMessageModel implements ChatMessageModel {
String get updatedAt;
@override
@JsonKey(ignore: true)
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -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,

View File

@@ -3,7 +3,6 @@ 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

View File

@@ -26,26 +26,20 @@ mixin _$ChatMessagesModel {
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
@@ -81,28 +75,21 @@ 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,14 +113,9 @@ 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
@@ -157,22 +139,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,13 +161,10 @@ 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')
@@ -198,6 +173,5 @@ abstract class _ChatMessagesModel implements ChatMessagesModel {
ChatMetaModel get meta;
@override
@JsonKey(ignore: true)
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -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,
};

View File

@@ -1,7 +1,6 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'chat_meta_model.freezed.dart';
part 'chat_meta_model.g.dart';
@freezed

View File

@@ -25,22 +25,18 @@ mixin _$ChatMetaModel {
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
@@ -63,23 +59,16 @@ 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 +87,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 +103,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 +113,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 +124,14 @@ 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;
}

View File

@@ -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,
};

View File

@@ -3,7 +3,6 @@ import 'package:eatvio_app/features/chat/models/chat_user_model.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
part 'chat_room_model.freezed.dart';
part 'chat_room_model.g.dart';
@freezed

View File

@@ -22,34 +22,25 @@ ChatRoomModel _$ChatRoomModelFromJson(Map<String, dynamic> json) {
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
@@ -83,38 +74,26 @@ 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 +123,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;
@@ -176,21 +152,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,12 +176,10 @@ 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;
@@ -219,6 +190,5 @@ abstract class _ChatRoomModel implements ChatRoomModel {
Map<String, ChatUserModel> get users;
@override
@JsonKey(ignore: true)
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -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,

View File

@@ -1,7 +1,6 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'chat_room_settings_model.freezed.dart';
part 'chat_room_settings_model.g.dart';
@freezed

View File

@@ -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');
ChatRoomSettingsModel _$ChatRoomSettingsModelFromJson(
Map<String, dynamic> json) {
ChatRoomSettingsModel _$ChatRoomSettingsModelFromJson(Map<String, dynamic> json) {
return _ChatRoomSettingsModel.fromJson(json);
}
@@ -32,14 +31,12 @@ mixin _$ChatRoomSettingsModel {
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(
@@ -51,9 +48,7 @@ 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
@@ -96,11 +91,8 @@ 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
@@ -113,13 +105,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 +153,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 +180,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,15 +206,13 @@ 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;
@@ -249,6 +229,5 @@ abstract class _ChatRoomSettingsModel implements ChatRoomSettingsModel {
String get updatedAt;
@override
@JsonKey(ignore: true)
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl>
get copyWith => throw _privateConstructorUsedError;
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -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,

View File

@@ -1,7 +1,6 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'chat_user_model.freezed.dart';
part 'chat_user_model.g.dart';
@freezed
@@ -9,10 +8,8 @@ class ChatUserModel with _$ChatUserModel {
const factory ChatUserModel({
required int id,
required String name,
@JsonKey(name: 'profile_photo_path')
String? profilePhotoPath,
@JsonKey(name: 'profile_photo_url')
String? profilePhotoUrl,
@JsonKey(name: 'profile_photo_path') String? profilePhotoPath,
@JsonKey(name: 'profile_photo_url') String? profilePhotoUrl,
}) = _ChatUserModel;
factory ChatUserModel.fromJson(Map<String, Object?> json) => _$ChatUserModelFromJson(json);

View File

@@ -29,26 +29,18 @@ mixin _$ChatUserModel {
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
@@ -86,27 +78,16 @@ 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 +127,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 +152,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,14 +175,12 @@ 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;
@@ -220,6 +194,5 @@ abstract class _ChatUserModel implements ChatUserModel {
String? get profilePhotoUrl;
@override
@JsonKey(ignore: true)
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -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,

View File

@@ -1,7 +1,6 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'websocket_info_model.freezed.dart';
part 'websocket_info_model.g.dart';
@freezed
@@ -11,8 +10,7 @@ class WebsocketInfoModel with _$WebsocketInfoModel {
required String host,
required String port,
required String cluster,
@JsonKey(name: 'user_id')
required int userId,
@JsonKey(name: 'user_id') required int userId,
}) = _WebsocketInfoModel;
factory WebsocketInfoModel.fromJson(Map<String, Object?> json) => _$WebsocketInfoModelFromJson(json);

View File

@@ -29,27 +29,19 @@ mixin _$WebsocketInfoModel {
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
@@ -92,28 +84,18 @@ 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 +135,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 +170,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,15 +188,13 @@ 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;
@@ -236,6 +209,5 @@ abstract class _WebsocketInfoModel implements WebsocketInfoModel {
int get userId;
@override
@JsonKey(ignore: true)
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -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,

View File

@@ -20,9 +20,7 @@ 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;
@@ -30,9 +28,7 @@ mixin _$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,
}) =>
throw _privateConstructorUsedError;
@@ -40,9 +36,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,14 +70,11 @@ 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
@@ -94,18 +85,12 @@ class _$ChatRoomStateCopyWithImpl<$Res, $Val extends ChatRoomState>
/// @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 +105,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 +116,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 +127,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 +138,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 +192,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 +214,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 +225,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 +236,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 +247,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 +301,18 @@ 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,11 +354,7 @@ 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
@@ -428,35 +382,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 +413,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 +424,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(),
}) {
@@ -542,26 +484,21 @@ abstract class ChatRoomStateLoaded implements ChatRoomState {
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 +532,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 +542,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 +560,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 +571,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 +620,9 @@ 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;
}

View File

@@ -1,9 +1,9 @@
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/features/chat/presentation/bloc/chat_room_cubit/chat_room_cubit.dart';
import 'package:eatvio_app/features/chat/presentation/bloc/chat_room_cubit/chat_room_state.dart';
import 'package:eatvio_app/features/chat/presentation/widgets/chat_bubble_widget.dart';
import 'package:eatvio_app/locator_service.dart';
import 'package:flutter/cupertino.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:flutter/material.dart';
import 'package:lazy_load_scrollview/lazy_load_scrollview.dart';
@@ -155,9 +155,7 @@ class _ChatScreenState extends State<ChatScreen> {
children: [
SizedBox(width: 8),
InkWell(
onTap: () {
},
onTap: () {},
borderRadius: BorderRadiusStyle.circleBorder17,
child: Ink(
height: 32,

View File

@@ -1,19 +1,19 @@
import 'dart:convert';
import 'package:eatvio_app/app_router.dart';
import 'package:eatvio_app/features/chat/presentation/pages/chat_select_screen/models/chat_entry.dart';
import 'package:eatvio_app/features/chat/presentation/pages/chat_select_screen/models/chat_select_model.dart';
import 'package:equatable/equatable.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:go_router/go_router.dart';
import 'package:hive/hive.dart';
import 'package:http/http.dart' as http;
import 'package:intl/intl.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'dart:convert';
import '/core/app_export.dart';
import 'package:go_router/go_router.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.
@@ -59,7 +59,7 @@ class ChatSelectBloc extends Bloc<ChatSelectEvent, ChatSelectState> {
AppRouter.navigatorKey.currentContext?.goNamed('authScreen');
}
final response = await http.get(
Uri.parse(dotenv.env['SERVER_ROOT']! + '/chat/index'),
Uri.parse(baseUrl + '/api/chat/index'),
headers: {
'Authorization': 'Bearer $token',
},

View File

@@ -20,8 +20,7 @@ class ChatSelectState extends Equatable {
}
class ChatSelectInitialState extends ChatSelectState {
ChatSelectInitialState({required ChatSelectModel chatSelectModelObj})
: super(chatSelectModelObj: chatSelectModelObj);
ChatSelectInitialState({required ChatSelectModel chatSelectModelObj}) : super(chatSelectModelObj: chatSelectModelObj);
}
class ChatSelectLoadedState extends ChatSelectState {

View File

@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:flutter/material.dart';
class CustomSearchView extends StatelessWidget {
CustomSearchView({

View File

@@ -1,12 +1,13 @@
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/features/chat/presentation/pages/chat_select_screen/models/chat_entry.dart';
import 'package:eatvio_app/features/chat/presentation/pages/chat_select_screen/widgets/chat_entry_widget.dart';
import 'package:flutter/cupertino.dart';
import 'bloc/chat_select_bloc.dart';
import 'models/chat_select_model.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'chat_search_view.dart';
import 'package:flutter/material.dart';
import 'bloc/chat_select_bloc.dart';
import 'chat_search_view.dart';
import 'models/chat_select_model.dart';
class ChatSelectScreen extends StatelessWidget {
const ChatSelectScreen({Key? key}) : super(key: key);

View File

@@ -1,8 +1,8 @@
// ignore_for_file: must_be_immutable
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/features/chat/presentation/pages/chat_select_screen/models/chat_entry.dart';
import 'package:flutter/material.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:go_router/go_router.dart';
class ChatEntryWidget extends StatelessWidget {

View File

@@ -2,7 +2,6 @@ import 'package:cached_network_image/cached_network_image.dart';
import 'package:dismissible_page/dismissible_page.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:go_router/go_router.dart';
import 'package:photo_view/photo_view.dart';
import 'package:photo_view/photo_view_gallery.dart';
@@ -84,7 +83,7 @@ class _PhotoViewScreenState extends State<PhotoViewScreen> {
color: Colors.white,
),
title: Text(
widget.imageUrls[index].replaceAll(dotenv.env['STORAGE_URL']! + 'chat_files/', ''),
widget.imageUrls[index].replaceAll(baseUrl + '/storage/' + 'chat_files/', ''),
style: TextStyle(
color: Colors.white,
fontSize: 12,

View File

@@ -1,9 +1,9 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:dismissible_page/dismissible_page.dart';
import 'package:eatvio_app/core/constants/constants.dart';
import 'package:eatvio_app/features/chat/presentation/pages/photo_view_screen.dart';
import 'package:eatvio_app/theme/app_decoration.dart';
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:url_launcher/url_launcher.dart';
class ChatBubbleWidget extends StatelessWidget {
@@ -48,7 +48,7 @@ class ChatBubbleWidget extends StatelessWidget {
contentPadding: EdgeInsets.zero,
horizontalTitleGap: 8,
onTap: () async {
if (!await launchUrl(Uri.parse(dotenv.env['STORAGE_URL']! + mediaData[index].toString()))) {
if (!await launchUrl(Uri.parse(baseUrl + '/storage/' + mediaData[index].toString()))) {
throw Exception('Could not launch ${mediaData[index].toString()}');
}
},
@@ -75,18 +75,18 @@ class ChatBubbleWidget extends StatelessWidget {
onTap: () {
context.pushTransparentRoute(
PhotoViewScreen(
imageUrls: mediaData.map((e) => dotenv.env['STORAGE_URL']! + e.toString()).toList(),
imageUrls: mediaData.map((e) => baseUrl + '/storage/' + e.toString()).toList(),
index: index,
),
);
},
child: Hero(
tag: dotenv.env['STORAGE_URL']! + '${mediaData[index]}',
tag: baseUrl + '/storage/' + '${mediaData[index]}',
transitionOnUserGestures: true,
child: ClipRRect(
borderRadius: BorderRadiusStyle.roundedBorder8,
child: CachedNetworkImage(
imageUrl: dotenv.env['STORAGE_URL']! + '${mediaData[index]}',
imageUrl: baseUrl + '/storage/' + '${mediaData[index]}',
),
),
),

View File

@@ -1,8 +1,8 @@
import 'dart:io';
import 'package:dio/dio.dart';
import 'package:eatvio_app/features/chat/models/chat_messages_model.dart';
import 'package:eatvio_app/features/chat/models/chat_room_model.dart';
import 'package:dio/dio.dart';
import 'package:eatvio_app/features/chat/models/websocket_info_model.dart';
import 'package:retrofit/retrofit.dart';
@@ -12,24 +12,24 @@ part 'chat_service.g.dart';
abstract class ChatService {
factory ChatService(Dio dio, {String baseUrl}) = _ChatService;
@GET('/chat/show/{id}')
@GET('/api/chat/show/{id}')
Future<Map<String, ChatRoomModel>> getChatRoom({
@Path() required String id,
});
@POST('/chat/{id}/message/send')
@POST('/api/chat/{id}/message/send')
Future<void> sendMessage({
@Path() required String id,
@Part() String? data,
@Part() List<File>? filesList,
});
@GET('/chat/show/{id}/messages?page={page}')
@GET('/api/chat/show/{id}/messages?page={page}')
Future<ChatMessagesModel> getChatMessages({
@Path() required String id,
@Path() required int page,
});
@GET('/profile/ws/params')
@GET('/api/profile/ws/params')
Future<WebsocketInfoModel> getWebsocket();
}

View File

@@ -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,
'/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;
}
@@ -78,7 +76,7 @@ class _ChatService implements ChatService {
)
.compose(
_dio.options,
'/chat/${id}/message/send',
'/api/chat/${id}/message/send',
queryParameters: queryParameters,
data: _data,
)
@@ -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,
'/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,
'/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 {

View File

@@ -30,29 +30,18 @@ mixin _$DiaryModel {
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$DiaryModelCopyWith<DiaryModel> get copyWith =>
throw _privateConstructorUsedError;
$DiaryModelCopyWith<DiaryModel> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $DiaryModelCopyWith<$Res> {
factory $DiaryModelCopyWith(
DiaryModel value, $Res Function(DiaryModel) then) =
_$DiaryModelCopyWithImpl<$Res, DiaryModel>;
factory $DiaryModelCopyWith(DiaryModel value, $Res Function(DiaryModel) then) = _$DiaryModelCopyWithImpl<$Res, DiaryModel>;
@useResult
$Res call(
{int id,
DateTime date,
DateTime wakeup,
DateTime retire,
int closed,
String comment,
List<Meals> meals});
$Res call({int id, DateTime date, DateTime wakeup, DateTime retire, int closed, String comment, List<Meals> meals});
}
/// @nodoc
class _$DiaryModelCopyWithImpl<$Res, $Val extends DiaryModel>
implements $DiaryModelCopyWith<$Res> {
class _$DiaryModelCopyWithImpl<$Res, $Val extends DiaryModel> implements $DiaryModelCopyWith<$Res> {
_$DiaryModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
@@ -105,30 +94,16 @@ class _$DiaryModelCopyWithImpl<$Res, $Val extends DiaryModel>
}
/// @nodoc
abstract class _$$DiaryModelImplCopyWith<$Res>
implements $DiaryModelCopyWith<$Res> {
factory _$$DiaryModelImplCopyWith(
_$DiaryModelImpl value, $Res Function(_$DiaryModelImpl) then) =
__$$DiaryModelImplCopyWithImpl<$Res>;
abstract class _$$DiaryModelImplCopyWith<$Res> implements $DiaryModelCopyWith<$Res> {
factory _$$DiaryModelImplCopyWith(_$DiaryModelImpl value, $Res Function(_$DiaryModelImpl) then) = __$$DiaryModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
DateTime date,
DateTime wakeup,
DateTime retire,
int closed,
String comment,
List<Meals> meals});
$Res call({int id, DateTime date, DateTime wakeup, DateTime retire, int closed, String comment, List<Meals> meals});
}
/// @nodoc
class __$$DiaryModelImplCopyWithImpl<$Res>
extends _$DiaryModelCopyWithImpl<$Res, _$DiaryModelImpl>
implements _$$DiaryModelImplCopyWith<$Res> {
__$$DiaryModelImplCopyWithImpl(
_$DiaryModelImpl _value, $Res Function(_$DiaryModelImpl) _then)
: super(_value, _then);
class __$$DiaryModelImplCopyWithImpl<$Res> extends _$DiaryModelCopyWithImpl<$Res, _$DiaryModelImpl> implements _$$DiaryModelImplCopyWith<$Res> {
__$$DiaryModelImplCopyWithImpl(_$DiaryModelImpl _value, $Res Function(_$DiaryModelImpl) _then) : super(_value, _then);
@pragma('vm:prefer-inline')
@override
@@ -187,8 +162,7 @@ class _$DiaryModelImpl implements _DiaryModel {
required final List<Meals> meals})
: _meals = meals;
factory _$DiaryModelImpl.fromJson(Map<String, dynamic> json) =>
_$$DiaryModelImplFromJson(json);
factory _$DiaryModelImpl.fromJson(Map<String, dynamic> json) => _$$DiaryModelImplFromJson(json);
@override
final int id;
@@ -231,14 +205,12 @@ class _$DiaryModelImpl implements _DiaryModel {
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, id, date, wakeup, retire, closed,
comment, const DeepCollectionEquality().hash(_meals));
int get hashCode => Object.hash(runtimeType, id, date, wakeup, retire, closed, comment, const DeepCollectionEquality().hash(_meals));
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith =>
__$$DiaryModelImplCopyWithImpl<_$DiaryModelImpl>(this, _$identity);
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith => __$$DiaryModelImplCopyWithImpl<_$DiaryModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -258,8 +230,7 @@ abstract class _DiaryModel implements DiaryModel {
required final String comment,
required final List<Meals> meals}) = _$DiaryModelImpl;
factory _DiaryModel.fromJson(Map<String, dynamic> json) =
_$DiaryModelImpl.fromJson;
factory _DiaryModel.fromJson(Map<String, dynamic> json) = _$DiaryModelImpl.fromJson;
@override
int get id;
@@ -277,6 +248,5 @@ abstract class _DiaryModel implements DiaryModel {
List<Meals> get meals;
@override
@JsonKey(ignore: true)
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -6,21 +6,17 @@ part of 'diary_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$DiaryModelImpl _$$DiaryModelImplFromJson(Map<String, dynamic> json) =>
_$DiaryModelImpl(
_$DiaryModelImpl _$$DiaryModelImplFromJson(Map<String, dynamic> json) => _$DiaryModelImpl(
id: (json['id'] as num).toInt(),
date: DateTime.parse(json['date'] as String),
wakeup: DateTime.parse(json['wakeup'] as String),
retire: DateTime.parse(json['retire'] as String),
closed: (json['closed'] as num).toInt(),
comment: json['comment'] as String,
meals: (json['meals'] as List<dynamic>)
.map((e) => Meals.fromJson(e as Map<String, dynamic>))
.toList(),
meals: (json['meals'] as List<dynamic>).map((e) => Meals.fromJson(e as Map<String, dynamic>)).toList(),
);
Map<String, dynamic> _$$DiaryModelImplToJson(_$DiaryModelImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$DiaryModelImplToJson(_$DiaryModelImpl instance) => <String, dynamic>{
'id': instance.id,
'date': instance.date.toIso8601String(),
'wakeup': instance.wakeup.toIso8601String(),

View File

@@ -19,4 +19,4 @@ class DiaryCubit extends Cubit<DiaryState> {
}
}
}
*/
*/

View File

@@ -17,4 +17,4 @@ abstract class DiaryState with _$DiaryState {
required String errorMessage,
}) = DiaryStateError;
}
*/
*/

View File

@@ -7,7 +7,7 @@ import 'package:flutter/services.dart';
import 'package:flutter_form_builder/flutter_form_builder.dart';
import 'package:fl_chart/fl_chart.dart';
import 'package:image_picker/image_picker.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/widgets/custom_edit_text_form_field.dart';
import 'package:eatvio_app/widgets/custom_edit_drop_down.dart';
@@ -731,7 +731,7 @@ class DiaryEditScreen extends StatelessWidget {
borderRadius: BorderRadiusStyle.roundedBorder5,
),
child: Image.network(
dotenv.env['STORAGE_URL']! + photo['path'],
baseUrl + '/storage/' + photo['path'],
),
),
Positioned(
@@ -1296,4 +1296,4 @@ bool checkConsumedValues(
// Если ни одно потребленное значение не превышает рекомендованное с соответствующим индексом
return false; // Возвращаем true
}
*/
*/

View File

@@ -14,4 +14,4 @@ class DiaryRepository {
}
}
}
*/
*/

View File

@@ -8,7 +8,7 @@ part 'diary_service.g.dart';
abstract class DiaryService {
factory DiaryService(Dio dio, {String baseUrl}) = _DiaryService;
@GET('/feed/show/{id}')
@GET('/api/feed/show/{id}')
Future<DiaryModel> getDiary(@Path() String id);
}
*/
*/

View File

@@ -34,15 +34,12 @@ mixin _$FeedBlogPostModel {
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,8 +53,7 @@ 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
@@ -115,10 +111,8 @@ 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
@@ -134,12 +128,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 +194,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 +229,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,8 +264,7 @@ 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;
@@ -305,6 +287,5 @@ abstract class _FeedBlogPostModel implements FeedBlogPostModel {
String get title;
@override
@JsonKey(ignore: true)
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -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,

View File

@@ -7,8 +7,7 @@ part 'feed_blog_post_settings_model.g.dart';
@freezed
class FeedBlogPostSettingsModel with _$FeedBlogPostSettingsModel {
const factory FeedBlogPostSettingsModel({
@JsonKey(name: 'data')
required List<FeedBlogPostModel> feedBlogPostList,
@JsonKey(name: 'data') required List<FeedBlogPostModel> feedBlogPostList,
}) = _FeedBlogPostSettingsModel;
factory FeedBlogPostSettingsModel.fromJson(Map<String, Object?> json) => _$FeedBlogPostSettingsModelFromJson(json);

View File

@@ -14,36 +14,30 @@ 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
@@ -66,11 +60,8 @@ 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
@@ -78,13 +69,9 @@ abstract class _$$FeedBlogPostSettingsModelImplCopyWith<$Res>
}
/// @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 +91,16 @@ 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 +115,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 +137,14 @@ 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;
}

View File

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

View File

@@ -70,13 +70,11 @@ 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
@@ -87,18 +85,12 @@ class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState>
/// @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 +105,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 +192,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 +214,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 +301,14 @@ 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 +327,12 @@ 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 +347,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 +434,23 @@ 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 +484,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 +493,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 +571,9 @@ 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;
}

View File

@@ -1,15 +1,14 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/features/feed/models/feed_blog_post_model.dart';
import 'package:eatvio_app/features/feed/presentation/bloc/feed_cubit/feed_cubit.dart';
import 'package:eatvio_app/features/feed/presentation/bloc/feed_cubit/feed_state.dart';
import 'package:flutter/cupertino.dart';
import 'package:go_router/go_router.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:eatvio_app/presentation/feed/feed_screen/widgets/feed_search_view.dart';
import 'package:eatvio_app/presentation/feed/feed_screen/widgets/feed_scroll_item.dart';
import 'package:eatvio_app/presentation/feed/feed_screen/widgets/feed_search_view.dart';
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:intl/intl.dart';
class FeedScreen extends StatelessWidget {
@@ -153,7 +152,7 @@ class FeedScreen extends StatelessWidget {
children: [
ListTile(
leading: CachedNetworkImage(
imageUrl: dotenv.env['STORAGE_URL']! + (''),
imageUrl: baseUrl + '/storage/' + (''),
/// todo profile photo path
imageBuilder: (context, imageProvider) => CircleAvatar(
@@ -224,7 +223,7 @@ class FeedScreen extends StatelessWidget {
),
SizedBox(height: 16.0),
CachedNetworkImage(
imageUrl: dotenv.env['STORAGE_URL']! + (post.image),
imageUrl: baseUrl + '/storage/' + (post.image),
imageBuilder: (context, imageProvider) => Stack(
children: [
ClipRRect(

View File

@@ -8,6 +8,6 @@ part 'feed_service.g.dart';
abstract class FeedService {
factory FeedService(Dio dio, {String baseUrl}) = _FeedService;
@GET('/blogPosts/index')
@GET('/api/blogPosts/index')
Future<FeedBlogPostSettingsModel> getBlocPostList();
}

View File

@@ -24,31 +24,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<FeedBlogPostSettingsModel>(Options(
final _result = await _dio.fetch<Map<String, dynamic>>(_setStreamType<FeedBlogPostSettingsModel>(Options(
method: 'GET',
headers: _headers,
extra: _extra,
)
.compose(
_dio.options,
'/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;
}
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 {

View File

@@ -1116,4 +1116,4 @@ const List<String> citiesList = const [
"Ясногорск",
"Ясный",
"Яхрома",
];
];

View File

@@ -19,15 +19,12 @@ 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,8 +32,7 @@ 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
@@ -67,10 +63,8 @@ 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
@@ -81,12 +75,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 +109,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 +118,15 @@ 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;
}

View File

@@ -1,7 +1,7 @@
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
import 'package:flutter/material.dart';
class AdditionalInformationScreen extends StatefulWidget {

View File

@@ -1,10 +1,10 @@
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:flutter/services.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:eatvio_app/widgets/custom_drop_down.dart';
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class BloodPressureScreen extends StatefulWidget {
final UserRegistrationSheet sheet;

View File

@@ -1,10 +1,9 @@
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:flutter/services.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class BodyCircumferencesScreen extends StatefulWidget {
final UserRegistrationSheet sheet;

View File

@@ -1,8 +1,8 @@
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
import 'package:eatvio_app/features/registration/consts/cities_list.dart';
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/widgets/custom_drop_down.dart';
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
import 'package:flutter/material.dart';
import 'package:flutter_typeahead/flutter_typeahead.dart';

View File

@@ -1,6 +1,6 @@
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
import 'package:flutter/material.dart';

View File

@@ -1,7 +1,7 @@
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:flutter/cupertino.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:flutter/cupertino.dart';
import 'package:intl/intl.dart';
class DateOfBirthScreen extends StatefulWidget {
@@ -92,26 +92,22 @@ class _DateOfBirthScreenState extends State<DateOfBirthScreen> {
void _showDialog(Widget child) {
showCupertinoModalPopup<void>(
context: context,
builder: (BuildContext context) =>
Container(
height: 216,
padding: const EdgeInsets.only(top: 6.0),
// The Bottom margin is provided to align the popup above the system
// navigation bar.
margin: EdgeInsets.only(
bottom: MediaQuery
.of(context)
.viewInsets
.bottom,
),
// Provide a background color for the popup.
color: CupertinoColors.systemBackground.resolveFrom(context),
// Use a SafeArea widget to avoid system overlaps.
child: SafeArea(
top: false,
child: child,
),
),
builder: (BuildContext context) => Container(
height: 216,
padding: const EdgeInsets.only(top: 6.0),
// The Bottom margin is provided to align the popup above the system
// navigation bar.
margin: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
),
// Provide a background color for the popup.
color: CupertinoColors.systemBackground.resolveFrom(context),
// Use a SafeArea widget to avoid system overlaps.
child: SafeArea(
top: false,
child: child,
),
),
);
}
}

View File

@@ -1,6 +1,6 @@
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
import 'package:flutter/material.dart';

View File

@@ -1,6 +1,6 @@
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
import 'package:flutter/material.dart';
@@ -38,7 +38,8 @@ class _FavoriteSportsScreenState extends State<FavoriteSportsScreen> {
SizedBox(height: 2.v),
CustomTextFormField(
controller: enterInformationController,
hintText: "Я занимаюсь плаванием , почти каждый вечер прогулки на свежем воздухе, пару раз в месяц играю в волейбол. Стараюсь не сидеть на месте!",
hintText:
"Я занимаюсь плаванием , почти каждый вечер прогулки на свежем воздухе, пару раз в месяц играю в волейбол. Стараюсь не сидеть на месте!",
textInputAction: TextInputAction.done,
maxLines: 8,
onChanged: (newValue) {

View File

@@ -1,6 +1,6 @@
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:flutter/material.dart';
class GenderScreen extends StatefulWidget {

View File

@@ -1,9 +1,9 @@
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
import 'package:flutter/services.dart';
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class HeightScreen extends StatefulWidget {
final UserRegistrationSheet sheet;

View File

@@ -1,7 +1,7 @@
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
import 'package:flutter/material.dart';
class MedicineIntakeScreen extends StatefulWidget {

View File

@@ -1,6 +1,6 @@
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
import 'package:flutter/material.dart';

View File

@@ -1,22 +1,22 @@
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_state.dart';
import 'package:eatvio_app/features/registration/presentation/pages/allergies_screen.dart';
import 'package:eatvio_app/features/registration/presentation/pages/city_of_living_screen.dart';
import 'package:eatvio_app/features/registration/presentation/pages/favorite_foods_screen.dart';
import 'package:eatvio_app/features/registration/presentation/pages/height_screen.dart';
import 'package:eatvio_app/features/registration/presentation/pages/name_screen.dart';
import 'package:eatvio_app/locator_service.dart';
import 'package:eatvio_app/features/registration/presentation/pages/additional_information_screen.dart';
import 'package:eatvio_app/features/registration/presentation/pages/allergies_screen.dart';
import 'package:eatvio_app/features/registration/presentation/pages/blood_pressure_screen.dart';
import 'package:eatvio_app/features/registration/presentation/pages/body_circumferences_screen.dart';
import 'package:eatvio_app/features/registration/presentation/pages/city_of_living_screen.dart';
import 'package:eatvio_app/features/registration/presentation/pages/credentials_screen.dart';
import 'package:eatvio_app/features/registration/presentation/pages/date_of_birth_screen.dart';
import 'package:eatvio_app/features/registration/presentation/pages/favorite_foods_screen.dart';
import 'package:eatvio_app/features/registration/presentation/pages/favorite_sports_screen.dart';
import 'package:eatvio_app/features/registration/presentation/pages/gender_screen.dart';
import 'package:eatvio_app/features/registration/presentation/pages/height_screen.dart';
import 'package:eatvio_app/features/registration/presentation/pages/language_select_screen.dart';
import 'package:eatvio_app/features/registration/presentation/pages/medicine_intake_screen.dart';
import 'package:eatvio_app/features/registration/presentation/pages/name_screen.dart';
import 'package:eatvio_app/features/registration/presentation/pages/weight_screen.dart';
import 'package:eatvio_app/locator_service.dart';
import 'package:eatvio_app/widgets/app_bar/appbar_title_image.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

View File

@@ -1,9 +1,9 @@
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
import 'package:flutter/services.dart';
import 'package:eatvio_app/data/models/userRegistrationModel/user_registration_model.dart';
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class WeightScreen extends StatefulWidget {
final UserRegistrationSheet sheet;

View File

@@ -7,7 +7,7 @@ part 'registration_service.g.dart';
abstract class RegistrationService {
factory RegistrationService(Dio dio, {String baseUrl}) = _RegistrationService;
@POST('/register')
@POST('/api/register')
Future<void> register({
@Body() required Map<String, dynamic> sheet,
});

View File

@@ -32,7 +32,7 @@ class _RegistrationService implements RegistrationService {
)
.compose(
_dio.options,
'/register',
'/api/register',
queryParameters: queryParameters,
data: _data,
)
@@ -44,9 +44,7 @@ class _RegistrationService implements RegistrationService {
}
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 {

Some files were not shown because too many files have changed in this diff Show More