forked from eatvio/eatvio_app
feat(order info): added order info screen
This commit is contained in:
@@ -12,8 +12,7 @@ part of 'settings_state.dart';
|
||||
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',
|
||||
);
|
||||
'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');
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SettingsState {
|
||||
@@ -21,53 +20,49 @@ mixin _$SettingsState {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(
|
||||
ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails,
|
||||
ProfileModel profile,
|
||||
)
|
||||
loaded,
|
||||
required TResult Function(ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails, ProfileModel profile)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(
|
||||
ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails,
|
||||
ProfileModel profile,
|
||||
)?
|
||||
loaded,
|
||||
TResult? Function(ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails, ProfileModel profile)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(
|
||||
ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails,
|
||||
ProfileModel profile,
|
||||
)?
|
||||
loaded,
|
||||
TResult Function(ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails, ProfileModel profile)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>(
|
||||
TResult Function(_SettingsState value) $default, {
|
||||
required TResult Function(SettingsStateLoading value) loading,
|
||||
required TResult Function(SettingsStateLoaded value) loaded,
|
||||
required TResult Function(SettingsStateError value) error,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>(
|
||||
TResult? Function(_SettingsState value)? $default, {
|
||||
TResult? Function(SettingsStateLoading value)? loading,
|
||||
TResult? Function(SettingsStateLoaded value)? loaded,
|
||||
TResult? Function(SettingsStateError value)? error,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>(
|
||||
TResult Function(_SettingsState value)? $default, {
|
||||
@@ -75,15 +70,15 @@ mixin _$SettingsState {
|
||||
TResult Function(SettingsStateLoaded value)? loaded,
|
||||
TResult Function(SettingsStateError value)? error,
|
||||
required TResult orElse(),
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $SettingsStateCopyWith<$Res> {
|
||||
factory $SettingsStateCopyWith(
|
||||
SettingsState value,
|
||||
$Res Function(SettingsState) then,
|
||||
) = _$SettingsStateCopyWithImpl<$Res, SettingsState>;
|
||||
SettingsState value, $Res Function(SettingsState) then) =
|
||||
_$SettingsStateCopyWithImpl<$Res, SettingsState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -103,9 +98,8 @@ class _$SettingsStateCopyWithImpl<$Res, $Val extends SettingsState>
|
||||
/// @nodoc
|
||||
abstract class _$$SettingsStateImplCopyWith<$Res> {
|
||||
factory _$$SettingsStateImplCopyWith(
|
||||
_$SettingsStateImpl value,
|
||||
$Res Function(_$SettingsStateImpl) then,
|
||||
) = __$$SettingsStateImplCopyWithImpl<$Res>;
|
||||
_$SettingsStateImpl value, $Res Function(_$SettingsStateImpl) then) =
|
||||
__$$SettingsStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -113,9 +107,8 @@ class __$$SettingsStateImplCopyWithImpl<$Res>
|
||||
extends _$SettingsStateCopyWithImpl<$Res, _$SettingsStateImpl>
|
||||
implements _$$SettingsStateImplCopyWith<$Res> {
|
||||
__$$SettingsStateImplCopyWithImpl(
|
||||
_$SettingsStateImpl _value,
|
||||
$Res Function(_$SettingsStateImpl) _then,
|
||||
) : super(_value, _then);
|
||||
_$SettingsStateImpl _value, $Res Function(_$SettingsStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of SettingsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -145,12 +138,9 @@ class _$SettingsStateImpl implements _SettingsState {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(
|
||||
ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails,
|
||||
ProfileModel profile,
|
||||
)
|
||||
loaded,
|
||||
required TResult Function(ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails, ProfileModel profile)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return $default();
|
||||
@@ -161,12 +151,9 @@ class _$SettingsStateImpl implements _SettingsState {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(
|
||||
ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails,
|
||||
ProfileModel profile,
|
||||
)?
|
||||
loaded,
|
||||
TResult? Function(ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails, ProfileModel profile)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return $default?.call();
|
||||
@@ -177,12 +164,9 @@ class _$SettingsStateImpl implements _SettingsState {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(
|
||||
ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails,
|
||||
ProfileModel profile,
|
||||
)?
|
||||
loaded,
|
||||
TResult Function(ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails, ProfileModel profile)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -236,20 +220,18 @@ abstract class _SettingsState implements SettingsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$SettingsStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$SettingsStateLoadingImplCopyWith(
|
||||
_$SettingsStateLoadingImpl value,
|
||||
$Res Function(_$SettingsStateLoadingImpl) then,
|
||||
) = __$$SettingsStateLoadingImplCopyWithImpl<$Res>;
|
||||
factory _$$SettingsStateLoadingImplCopyWith(_$SettingsStateLoadingImpl value,
|
||||
$Res Function(_$SettingsStateLoadingImpl) then) =
|
||||
__$$SettingsStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$SettingsStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$SettingsStateCopyWithImpl<$Res, _$SettingsStateLoadingImpl>
|
||||
implements _$$SettingsStateLoadingImplCopyWith<$Res> {
|
||||
__$$SettingsStateLoadingImplCopyWithImpl(
|
||||
_$SettingsStateLoadingImpl _value,
|
||||
$Res Function(_$SettingsStateLoadingImpl) _then,
|
||||
) : super(_value, _then);
|
||||
__$$SettingsStateLoadingImplCopyWithImpl(_$SettingsStateLoadingImpl _value,
|
||||
$Res Function(_$SettingsStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of SettingsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -280,12 +262,9 @@ class _$SettingsStateLoadingImpl implements SettingsStateLoading {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(
|
||||
ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails,
|
||||
ProfileModel profile,
|
||||
)
|
||||
loaded,
|
||||
required TResult Function(ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails, ProfileModel profile)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loading();
|
||||
@@ -296,12 +275,9 @@ class _$SettingsStateLoadingImpl implements SettingsStateLoading {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(
|
||||
ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails,
|
||||
ProfileModel profile,
|
||||
)?
|
||||
loaded,
|
||||
TResult? Function(ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails, ProfileModel profile)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loading?.call();
|
||||
@@ -312,12 +288,9 @@ class _$SettingsStateLoadingImpl implements SettingsStateLoading {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(
|
||||
ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails,
|
||||
ProfileModel profile,
|
||||
)?
|
||||
loaded,
|
||||
TResult Function(ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails, ProfileModel profile)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -371,16 +344,14 @@ abstract class SettingsStateLoading implements SettingsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$SettingsStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$SettingsStateLoadedImplCopyWith(
|
||||
_$SettingsStateLoadedImpl value,
|
||||
$Res Function(_$SettingsStateLoadedImpl) then,
|
||||
) = __$$SettingsStateLoadedImplCopyWithImpl<$Res>;
|
||||
factory _$$SettingsStateLoadedImplCopyWith(_$SettingsStateLoadedImpl value,
|
||||
$Res Function(_$SettingsStateLoadedImpl) then) =
|
||||
__$$SettingsStateLoadedImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({
|
||||
ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails,
|
||||
ProfileModel profile,
|
||||
});
|
||||
$Res call(
|
||||
{ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails,
|
||||
ProfileModel profile});
|
||||
|
||||
$ProfileSettingsModelCopyWith<$Res> get profileSettings;
|
||||
$ProfileDetailsModelCopyWith<$Res> get profileDetails;
|
||||
@@ -391,10 +362,9 @@ abstract class _$$SettingsStateLoadedImplCopyWith<$Res> {
|
||||
class __$$SettingsStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$SettingsStateCopyWithImpl<$Res, _$SettingsStateLoadedImpl>
|
||||
implements _$$SettingsStateLoadedImplCopyWith<$Res> {
|
||||
__$$SettingsStateLoadedImplCopyWithImpl(
|
||||
_$SettingsStateLoadedImpl _value,
|
||||
$Res Function(_$SettingsStateLoadedImpl) _then,
|
||||
) : super(_value, _then);
|
||||
__$$SettingsStateLoadedImplCopyWithImpl(_$SettingsStateLoadedImpl _value,
|
||||
$Res Function(_$SettingsStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of SettingsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -405,25 +375,20 @@ class __$$SettingsStateLoadedImplCopyWithImpl<$Res>
|
||||
Object? profileDetails = null,
|
||||
Object? profile = null,
|
||||
}) {
|
||||
return _then(
|
||||
_$SettingsStateLoadedImpl(
|
||||
profileSettings:
|
||||
null == profileSettings
|
||||
? _value.profileSettings
|
||||
: profileSettings // ignore: cast_nullable_to_non_nullable
|
||||
as ProfileSettingsModel,
|
||||
profileDetails:
|
||||
null == profileDetails
|
||||
? _value.profileDetails
|
||||
: profileDetails // ignore: cast_nullable_to_non_nullable
|
||||
as ProfileDetailsModel,
|
||||
profile:
|
||||
null == profile
|
||||
? _value.profile
|
||||
: profile // ignore: cast_nullable_to_non_nullable
|
||||
as ProfileModel,
|
||||
),
|
||||
);
|
||||
return _then(_$SettingsStateLoadedImpl(
|
||||
profileSettings: null == profileSettings
|
||||
? _value.profileSettings
|
||||
: profileSettings // ignore: cast_nullable_to_non_nullable
|
||||
as ProfileSettingsModel,
|
||||
profileDetails: null == profileDetails
|
||||
? _value.profileDetails
|
||||
: profileDetails // ignore: cast_nullable_to_non_nullable
|
||||
as ProfileDetailsModel,
|
||||
profile: null == profile
|
||||
? _value.profile
|
||||
: profile // ignore: cast_nullable_to_non_nullable
|
||||
as ProfileModel,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of SettingsState
|
||||
@@ -460,11 +425,10 @@ class __$$SettingsStateLoadedImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
|
||||
class _$SettingsStateLoadedImpl implements SettingsStateLoaded {
|
||||
const _$SettingsStateLoadedImpl({
|
||||
required this.profileSettings,
|
||||
required this.profileDetails,
|
||||
required this.profile,
|
||||
});
|
||||
const _$SettingsStateLoadedImpl(
|
||||
{required this.profileSettings,
|
||||
required this.profileDetails,
|
||||
required this.profile});
|
||||
|
||||
@override
|
||||
final ProfileSettingsModel profileSettings;
|
||||
@@ -501,21 +465,16 @@ class _$SettingsStateLoadedImpl implements SettingsStateLoaded {
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$SettingsStateLoadedImplCopyWith<_$SettingsStateLoadedImpl> get copyWith =>
|
||||
__$$SettingsStateLoadedImplCopyWithImpl<_$SettingsStateLoadedImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(
|
||||
ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails,
|
||||
ProfileModel profile,
|
||||
)
|
||||
loaded,
|
||||
required TResult Function(ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails, ProfileModel profile)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loaded(profileSettings, profileDetails, profile);
|
||||
@@ -526,12 +485,9 @@ class _$SettingsStateLoadedImpl implements SettingsStateLoaded {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(
|
||||
ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails,
|
||||
ProfileModel profile,
|
||||
)?
|
||||
loaded,
|
||||
TResult? Function(ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails, ProfileModel profile)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loaded?.call(profileSettings, profileDetails, profile);
|
||||
@@ -542,12 +498,9 @@ class _$SettingsStateLoadedImpl implements SettingsStateLoaded {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(
|
||||
ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails,
|
||||
ProfileModel profile,
|
||||
)?
|
||||
loaded,
|
||||
TResult Function(ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails, ProfileModel profile)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -596,11 +549,10 @@ class _$SettingsStateLoadedImpl implements SettingsStateLoaded {
|
||||
}
|
||||
|
||||
abstract class SettingsStateLoaded implements SettingsState {
|
||||
const factory SettingsStateLoaded({
|
||||
required final ProfileSettingsModel profileSettings,
|
||||
required final ProfileDetailsModel profileDetails,
|
||||
required final ProfileModel profile,
|
||||
}) = _$SettingsStateLoadedImpl;
|
||||
const factory SettingsStateLoaded(
|
||||
{required final ProfileSettingsModel profileSettings,
|
||||
required final ProfileDetailsModel profileDetails,
|
||||
required final ProfileModel profile}) = _$SettingsStateLoadedImpl;
|
||||
|
||||
ProfileSettingsModel get profileSettings;
|
||||
ProfileDetailsModel get profileDetails;
|
||||
@@ -615,10 +567,9 @@ abstract class SettingsStateLoaded implements SettingsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$SettingsStateErrorImplCopyWith<$Res> {
|
||||
factory _$$SettingsStateErrorImplCopyWith(
|
||||
_$SettingsStateErrorImpl value,
|
||||
$Res Function(_$SettingsStateErrorImpl) then,
|
||||
) = __$$SettingsStateErrorImplCopyWithImpl<$Res>;
|
||||
factory _$$SettingsStateErrorImplCopyWith(_$SettingsStateErrorImpl value,
|
||||
$Res Function(_$SettingsStateErrorImpl) then) =
|
||||
__$$SettingsStateErrorImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
@@ -627,25 +578,23 @@ abstract class _$$SettingsStateErrorImplCopyWith<$Res> {
|
||||
class __$$SettingsStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$SettingsStateCopyWithImpl<$Res, _$SettingsStateErrorImpl>
|
||||
implements _$$SettingsStateErrorImplCopyWith<$Res> {
|
||||
__$$SettingsStateErrorImplCopyWithImpl(
|
||||
_$SettingsStateErrorImpl _value,
|
||||
$Res Function(_$SettingsStateErrorImpl) _then,
|
||||
) : super(_value, _then);
|
||||
__$$SettingsStateErrorImplCopyWithImpl(_$SettingsStateErrorImpl _value,
|
||||
$Res Function(_$SettingsStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of SettingsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({Object? errorMessage = null}) {
|
||||
return _then(
|
||||
_$SettingsStateErrorImpl(
|
||||
errorMessage:
|
||||
null == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
),
|
||||
);
|
||||
$Res call({
|
||||
Object? errorMessage = null,
|
||||
}) {
|
||||
return _then(_$SettingsStateErrorImpl(
|
||||
errorMessage: null == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -681,21 +630,16 @@ class _$SettingsStateErrorImpl implements SettingsStateError {
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$SettingsStateErrorImplCopyWith<_$SettingsStateErrorImpl> get copyWith =>
|
||||
__$$SettingsStateErrorImplCopyWithImpl<_$SettingsStateErrorImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(
|
||||
ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails,
|
||||
ProfileModel profile,
|
||||
)
|
||||
loaded,
|
||||
required TResult Function(ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails, ProfileModel profile)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return error(errorMessage);
|
||||
@@ -706,12 +650,9 @@ class _$SettingsStateErrorImpl implements SettingsStateError {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(
|
||||
ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails,
|
||||
ProfileModel profile,
|
||||
)?
|
||||
loaded,
|
||||
TResult? Function(ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails, ProfileModel profile)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return error?.call(errorMessage);
|
||||
@@ -722,12 +663,9 @@ class _$SettingsStateErrorImpl implements SettingsStateError {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(
|
||||
ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails,
|
||||
ProfileModel profile,
|
||||
)?
|
||||
loaded,
|
||||
TResult Function(ProfileSettingsModel profileSettings,
|
||||
ProfileDetailsModel profileDetails, ProfileModel profile)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
|
||||
@@ -18,9 +18,9 @@ class _ChangeEmailScreenState extends State<ChangeEmailScreen> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Смена Email-a'),
|
||||
title: const Text('Смена Email-a'),
|
||||
),
|
||||
body: Center(
|
||||
body: const Center(
|
||||
child: Text('Coming soon...'),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -18,9 +18,9 @@ class _ChangePasswordScreenState extends State<ChangePasswordScreen> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Смена пароля'),
|
||||
title: const Text('Смена пароля'),
|
||||
),
|
||||
body: Center(
|
||||
body: const Center(
|
||||
child: Text('Coming soon...'),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -33,13 +33,13 @@ class _GeneralInfoScreenState extends State<GeneralInfoScreen> {
|
||||
late SelectionPopupModel isPublicProfile;
|
||||
|
||||
final List<SelectionPopupModel> genderSelectionPopupList = [
|
||||
SelectionPopupModel(id: 0, title: 'Женский', value: 'female'),
|
||||
SelectionPopupModel(id: 1, title: 'Мужской', value: 'male'),
|
||||
const SelectionPopupModel(id: 0, title: 'Женский', value: 'female'),
|
||||
const SelectionPopupModel(id: 1, title: 'Мужской', value: 'male'),
|
||||
];
|
||||
|
||||
final List<SelectionPopupModel> isPublicProfileSelectionPopupList = [
|
||||
SelectionPopupModel(id: 0, title: 'Только зарегистрированным', value: false),
|
||||
SelectionPopupModel(id: 1, title: 'Всем', value: true),
|
||||
const SelectionPopupModel(id: 0, title: 'Только зарегистрированным', value: false),
|
||||
const SelectionPopupModel(id: 1, title: 'Всем', value: true),
|
||||
];
|
||||
|
||||
@override
|
||||
@@ -63,49 +63,49 @@ class _GeneralInfoScreenState extends State<GeneralInfoScreen> {
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Общая информация'),
|
||||
title: const Text('Общая информация'),
|
||||
),
|
||||
bottomSheet: _saveButton(),
|
||||
body: SingleChildScrollView(
|
||||
physics: const BouncingScrollPhysics(),
|
||||
padding: EdgeInsets.all(16) + EdgeInsets.only(bottom: 64),
|
||||
padding: const EdgeInsets.all(16) + const EdgeInsets.only(bottom: 64),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(s.first_name),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(
|
||||
controller: firstNameController,
|
||||
hintText: 'Введите имя',
|
||||
onChanged: (newValue) {},
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
const SizedBox(height: 16),
|
||||
Text(s.last_name),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(
|
||||
controller: lastNameController,
|
||||
hintText: 'Введите фамилию',
|
||||
onChanged: (newValue) {},
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
const SizedBox(height: 16),
|
||||
Text(s.date_of_birth),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 4),
|
||||
ListTile(
|
||||
onTap: onTapCalendar(context),
|
||||
trailing: Icon(
|
||||
Icons.keyboard_arrow_down_rounded,
|
||||
color: Colors.grey.shade700,
|
||||
),
|
||||
contentPadding: EdgeInsets.symmetric(horizontal: 12),
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
title: Text(selectedDate.format('dd MMMM yyyy', 'ru')),
|
||||
tileColor: Color(0xFFF6F6F6),
|
||||
tileColor: const Color(0xFFF6F6F6),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
Text('Пол'),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 16),
|
||||
const Text('Пол'),
|
||||
const SizedBox(height: 4),
|
||||
CustomDropDown(
|
||||
items: genderSelectionPopupList,
|
||||
value: gender,
|
||||
@@ -115,27 +115,27 @@ class _GeneralInfoScreenState extends State<GeneralInfoScreen> {
|
||||
});
|
||||
},
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
Text('Страна'),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 16),
|
||||
const Text('Страна'),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(
|
||||
controller: countryController,
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
Text('Город'),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 16),
|
||||
const Text('Город'),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(
|
||||
controller: cityController,
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
Text('Предпочтительный язык общения'),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 16),
|
||||
const Text('Предпочтительный язык общения'),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(
|
||||
controller: languageController,
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
Text('Показывать анкету'),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 16),
|
||||
const Text('Показывать анкету'),
|
||||
const SizedBox(height: 4),
|
||||
CustomDropDown(
|
||||
items: isPublicProfileSelectionPopupList,
|
||||
value: isPublicProfile,
|
||||
@@ -216,7 +216,7 @@ class _GeneralInfoScreenState extends State<GeneralInfoScreen> {
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: appTheme.blueA400,
|
||||
),
|
||||
child: Center(
|
||||
child: const Center(
|
||||
child: Text(
|
||||
'Сохранить',
|
||||
style: TextStyle(
|
||||
|
||||
@@ -43,16 +43,16 @@ class _OtherInfoScreenState extends State<OtherInfoScreen> {
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Прочая информаиця'),
|
||||
title: const Text('Прочая информаиця'),
|
||||
),
|
||||
bottomSheet: _saveButton(),
|
||||
body: SingleChildScrollView(
|
||||
padding: EdgeInsets.all(16) + EdgeInsets.only(bottom: 64),
|
||||
padding: const EdgeInsets.all(16) + const EdgeInsets.only(bottom: 64),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(s.allergies_presence),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(
|
||||
controller: aboutAllergyController,
|
||||
hintText: 'Например: орехи, мёд и т.д.',
|
||||
@@ -62,9 +62,9 @@ class _OtherInfoScreenState extends State<OtherInfoScreen> {
|
||||
maxLength: 250,
|
||||
onChanged: (newValue) {},
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
const SizedBox(height: 16),
|
||||
Text(s.do_you_take_pills),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(
|
||||
controller: aboutTakingPillsController,
|
||||
hintText: s.enter_information,
|
||||
@@ -74,9 +74,9 @@ class _OtherInfoScreenState extends State<OtherInfoScreen> {
|
||||
maxLines: 8,
|
||||
onChanged: (newValue) {},
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
const SizedBox(height: 16),
|
||||
Text(s.your_favorite_sports),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(
|
||||
controller: aboutSportHobbiesController,
|
||||
hintText:
|
||||
@@ -86,9 +86,9 @@ class _OtherInfoScreenState extends State<OtherInfoScreen> {
|
||||
maxLength: 250,
|
||||
onChanged: (newValue) {},
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
const SizedBox(height: 16),
|
||||
Text(s.favorite_foods),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(
|
||||
controller: favoriteFoodsController,
|
||||
hintText: s.enter_information,
|
||||
@@ -97,9 +97,9 @@ class _OtherInfoScreenState extends State<OtherInfoScreen> {
|
||||
maxLength: 250,
|
||||
onChanged: (newValue) {},
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
const SizedBox(height: 16),
|
||||
Text(s.unfavorite_foods),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(
|
||||
controller: unFavouriteFoodsController,
|
||||
hintText: s.enter_information,
|
||||
@@ -108,14 +108,14 @@ class _OtherInfoScreenState extends State<OtherInfoScreen> {
|
||||
maxLength: 250,
|
||||
onChanged: (newValue) {},
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
Text(
|
||||
const SizedBox(height: 16),
|
||||
const Text(
|
||||
'Дополнительная информация',
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
textAlign: TextAlign.start,
|
||||
),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(
|
||||
controller: additionalInfoController,
|
||||
maxLength: 250,
|
||||
@@ -152,7 +152,7 @@ class _OtherInfoScreenState extends State<OtherInfoScreen> {
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: appTheme.blueA400,
|
||||
),
|
||||
child: Center(
|
||||
child: const Center(
|
||||
child: Text(
|
||||
'Сохранить',
|
||||
style: TextStyle(
|
||||
|
||||
@@ -47,7 +47,7 @@ class _PhysicalActivityScreenState extends State<PhysicalActivityScreen> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Физическая нагрузка'),
|
||||
title: const Text('Физическая нагрузка'),
|
||||
),
|
||||
bottomSheet: _saveButton(),
|
||||
body: SingleChildScrollView(
|
||||
@@ -56,7 +56,7 @@ class _PhysicalActivityScreenState extends State<PhysicalActivityScreen> {
|
||||
child: Column(
|
||||
children: [
|
||||
RadioListTile<PhysicalActivity>(
|
||||
contentPadding: EdgeInsets.only(left: 8, right: 16),
|
||||
contentPadding: const EdgeInsets.only(left: 8, right: 16),
|
||||
title: const Text('1,2 — минимальный (сидячая работа, отсутствие физических нагрузок);'),
|
||||
value: PhysicalActivity.minimum,
|
||||
groupValue: _physicalActivity,
|
||||
@@ -67,7 +67,7 @@ class _PhysicalActivityScreenState extends State<PhysicalActivityScreen> {
|
||||
},
|
||||
),
|
||||
RadioListTile<PhysicalActivity>(
|
||||
contentPadding: EdgeInsets.only(left: 8, right: 16),
|
||||
contentPadding: const EdgeInsets.only(left: 8, right: 16),
|
||||
title: const Text('1,375 — низкий (тренировки не менее 20 мин 1–3 раза в неделю);'),
|
||||
value: PhysicalActivity.low,
|
||||
groupValue: _physicalActivity,
|
||||
@@ -78,7 +78,7 @@ class _PhysicalActivityScreenState extends State<PhysicalActivityScreen> {
|
||||
},
|
||||
),
|
||||
RadioListTile<PhysicalActivity>(
|
||||
contentPadding: EdgeInsets.only(left: 8, right: 16),
|
||||
contentPadding: const EdgeInsets.only(left: 8, right: 16),
|
||||
title: const Text('1,55 — умеренный (тренировки 30–60 мин 3–4 раза в неделю);'),
|
||||
value: PhysicalActivity.medium,
|
||||
groupValue: _physicalActivity,
|
||||
@@ -89,7 +89,7 @@ class _PhysicalActivityScreenState extends State<PhysicalActivityScreen> {
|
||||
},
|
||||
),
|
||||
RadioListTile<PhysicalActivity>(
|
||||
contentPadding: EdgeInsets.only(left: 8, right: 16),
|
||||
contentPadding: const EdgeInsets.only(left: 8, right: 16),
|
||||
title: const Text('1,7 — высокий (тренировки 30–60 мин 5–7 раза в неделю; тяжёлая физическая работа);'),
|
||||
value: PhysicalActivity.high,
|
||||
groupValue: _physicalActivity,
|
||||
@@ -100,7 +100,7 @@ class _PhysicalActivityScreenState extends State<PhysicalActivityScreen> {
|
||||
},
|
||||
),
|
||||
RadioListTile<PhysicalActivity>(
|
||||
contentPadding: EdgeInsets.only(left: 8, right: 16),
|
||||
contentPadding: const EdgeInsets.only(left: 8, right: 16),
|
||||
title: const Text('1,9 — экстремальный (несколько интенсивных тренировок в день'),
|
||||
value: PhysicalActivity.extreme,
|
||||
groupValue: _physicalActivity,
|
||||
@@ -154,7 +154,7 @@ class _PhysicalActivityScreenState extends State<PhysicalActivityScreen> {
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: appTheme.blueA400,
|
||||
),
|
||||
child: Center(
|
||||
child: const Center(
|
||||
child: Text(
|
||||
'Сохранить',
|
||||
style: TextStyle(
|
||||
|
||||
@@ -43,51 +43,51 @@ class _PhysicalFormScreenState extends State<PhysicalFormScreen> {
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Физическая форма'),
|
||||
title: const Text('Физическая форма'),
|
||||
),
|
||||
bottomSheet: _saveButton(),
|
||||
body: SingleChildScrollView(
|
||||
physics: const BouncingScrollPhysics(),
|
||||
padding: EdgeInsets.all(16) + EdgeInsets.only(bottom: 64),
|
||||
padding: const EdgeInsets.all(16) + const EdgeInsets.only(bottom: 64),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(s.chest_circumference),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(
|
||||
inputFormatters: [digitsOnly],
|
||||
controller: chestCircumferenceController,
|
||||
hintText: 'см',
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
const SizedBox(height: 16),
|
||||
Text(s.waist_circumference),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(
|
||||
inputFormatters: [digitsOnly],
|
||||
controller: waistCircumferenceController,
|
||||
hintText: 'см',
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
const SizedBox(height: 16),
|
||||
Text(s.hip_circumference),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(
|
||||
inputFormatters: [digitsOnly],
|
||||
controller: hipCircumferenceController,
|
||||
hintText: 'см',
|
||||
textInputAction: TextInputAction.done,
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
Text('Рост'),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 16),
|
||||
const Text('Рост'),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(
|
||||
inputFormatters: [digitsOnly],
|
||||
controller: heightController,
|
||||
hintText: 'см',
|
||||
textInputAction: TextInputAction.done,
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
Text('Вес'),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 16),
|
||||
const Text('Вес'),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(
|
||||
inputFormatters: [digitsOnly],
|
||||
controller: weightController,
|
||||
@@ -122,7 +122,7 @@ class _PhysicalFormScreenState extends State<PhysicalFormScreen> {
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: appTheme.blueA400,
|
||||
),
|
||||
child: Center(
|
||||
child: const Center(
|
||||
child: Text(
|
||||
'Сохранить',
|
||||
style: TextStyle(
|
||||
|
||||
@@ -38,8 +38,8 @@ class _PressureScreenState extends State<PressureScreen> {
|
||||
}
|
||||
|
||||
final List<SelectionPopupModel> selectionPopupList = [
|
||||
SelectionPopupModel(id: 0, title: 'Нет', value: false),
|
||||
SelectionPopupModel(id: 1, title: 'Да', value: true),
|
||||
const SelectionPopupModel(id: 0, title: 'Нет', value: false),
|
||||
const SelectionPopupModel(id: 1, title: 'Да', value: true),
|
||||
];
|
||||
|
||||
@override
|
||||
@@ -48,35 +48,35 @@ class _PressureScreenState extends State<PressureScreen> {
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Давление'),
|
||||
title: const Text('Давление'),
|
||||
),
|
||||
bottomSheet: _saveButton(),
|
||||
body: SingleChildScrollView(
|
||||
physics: const BouncingScrollPhysics(),
|
||||
padding: EdgeInsets.all(16) + EdgeInsets.only(bottom: 64),
|
||||
padding: const EdgeInsets.all(16) + const EdgeInsets.only(bottom: 64),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(s.up_pressure),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(
|
||||
controller: bloodPressureUpController,
|
||||
inputFormatters: [digitsOnly],
|
||||
hintText: "90",
|
||||
onChanged: (newValue) {},
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
const SizedBox(height: 16),
|
||||
Text(s.down_pressure),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(
|
||||
controller: bloodPressureDownController,
|
||||
inputFormatters: [digitsOnly],
|
||||
hintText: '90',
|
||||
onChanged: (newValue) {},
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
const SizedBox(height: 16),
|
||||
Text(s.do_you_have_hypotension_tendency),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 4),
|
||||
CustomDropDown(
|
||||
items: selectionPopupList,
|
||||
value: hypo,
|
||||
@@ -87,9 +87,9 @@ class _PressureScreenState extends State<PressureScreen> {
|
||||
});
|
||||
},
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
const SizedBox(height: 16),
|
||||
Text(s.do_you_have_hypertension_tendency),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 4),
|
||||
CustomDropDown(
|
||||
items: selectionPopupList,
|
||||
value: hyper,
|
||||
@@ -127,7 +127,7 @@ class _PressureScreenState extends State<PressureScreen> {
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: appTheme.blueA400,
|
||||
),
|
||||
child: Center(
|
||||
child: const Center(
|
||||
child: Text(
|
||||
'Сохранить',
|
||||
style: TextStyle(
|
||||
|
||||
@@ -44,10 +44,10 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
if (state is SettingsStateLoaded) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Настройки'),
|
||||
title: const Text('Настройки'),
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
padding: EdgeInsets.symmetric(vertical: 16),
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
physics: const BouncingScrollPhysics(),
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -71,16 +71,16 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
if (state is SettingsStateError) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Настройки'),
|
||||
title: const Text('Настройки'),
|
||||
),
|
||||
body: DataErrorWidget(onReload: () => settingsCubit.init()),
|
||||
);
|
||||
}
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Настройки'),
|
||||
title: const Text('Настройки'),
|
||||
),
|
||||
body: Loader(),
|
||||
body: const Loader(),
|
||||
);
|
||||
},
|
||||
),
|
||||
@@ -91,8 +91,8 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
'Дополнительаная информация',
|
||||
style: TextStyle(
|
||||
@@ -194,8 +194,8 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
'Уведомления',
|
||||
style: TextStyle(
|
||||
@@ -206,7 +206,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
),
|
||||
),
|
||||
_tile(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
onTap: () {
|
||||
setState(() {
|
||||
updatesNotificationsSwitchState = !updatesNotificationsSwitchState;
|
||||
@@ -235,7 +235,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
),
|
||||
_divider(context),
|
||||
_tile(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
onTap: () {
|
||||
setState(() {
|
||||
fillDiaryNotificationsSwitchState = !fillDiaryNotificationsSwitchState;
|
||||
@@ -264,7 +264,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
),
|
||||
_divider(context),
|
||||
_tile(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
onTap: () {
|
||||
setState(() {
|
||||
moodSwitchState = !moodSwitchState;
|
||||
@@ -293,7 +293,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
),
|
||||
_divider(context),
|
||||
_tile(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
onTap: () {
|
||||
setState(() {
|
||||
bedTimeSwitchState = !bedTimeSwitchState;
|
||||
@@ -328,8 +328,8 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
'О Eatvio',
|
||||
style: TextStyle(
|
||||
@@ -341,12 +341,12 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
),
|
||||
_tile(
|
||||
title: 'О компании',
|
||||
onTap: () async => await launchUrl(Uri.parse(baseUrl + '/ru/company-details')),
|
||||
onTap: () async => await launchUrl(Uri.parse('$baseUrl/ru/company-details')),
|
||||
),
|
||||
_divider(context),
|
||||
_tile(
|
||||
title: 'Пользовательское соглашение',
|
||||
onTap: () async => await launchUrl(Uri.parse(baseUrl + '/oferta_bs.pdf')),
|
||||
onTap: () async => await launchUrl(Uri.parse('$baseUrl/oferta_bs.pdf')),
|
||||
),
|
||||
],
|
||||
);
|
||||
@@ -354,7 +354,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
|
||||
_becomeConsultantButton(SettingsStateLoaded state) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: InkWell(
|
||||
onTap: () => GoRouter.of(context).pushNamed('becomeConsultantScreen'),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
@@ -365,7 +365,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: appTheme.blueA400,
|
||||
),
|
||||
child: Center(
|
||||
child: const Center(
|
||||
child: Text(
|
||||
'Стать консультантом',
|
||||
style: TextStyle(
|
||||
@@ -382,7 +382,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
|
||||
_deleteAccountButton(SettingsStateLoaded state) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: InkWell(
|
||||
onTap: () {},
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
@@ -391,9 +391,9 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
width: MediaQuery.of(context).size.width - 16,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: Color(0xFFEAEAEA),
|
||||
color: const Color(0xFFEAEAEA),
|
||||
),
|
||||
child: Center(
|
||||
child: const Center(
|
||||
child: Text(
|
||||
'Удалить аккаунт',
|
||||
style: TextStyle(
|
||||
@@ -419,14 +419,14 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
onTap: onTap,
|
||||
title: Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
height: 1,
|
||||
),
|
||||
),
|
||||
trailing: trailing ??
|
||||
Icon(
|
||||
const Icon(
|
||||
Icons.arrow_forward_ios_rounded,
|
||||
size: 12,
|
||||
color: Colors.black38,
|
||||
|
||||
Reference in New Issue
Block a user