forked from eatvio/eatvio_app
feat(registration): finished layout for new registration screen
This commit is contained in:
3
assets/icons/check.svg
Normal file
3
assets/icons/check.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="12" height="9" viewBox="0 0 12 9" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.16229 6.8625L10.5185 0.50625C10.6685 0.35625 10.8435 0.28125 11.0435 0.28125C11.2435 0.28125 11.4185 0.35625 11.5685 0.50625C11.7185 0.65625 11.7935 0.834375 11.7935 1.04063C11.7935 1.24688 11.7185 1.425 11.5685 1.575L4.68729 8.475C4.53729 8.625 4.36229 8.7 4.16229 8.7C3.96229 8.7 3.78729 8.625 3.63729 8.475L0.412289 5.25C0.262289 5.1 0.190414 4.92188 0.196664 4.71563C0.202914 4.50938 0.281039 4.33125 0.431039 4.18125C0.581039 4.03125 0.759164 3.95625 0.965414 3.95625C1.17166 3.95625 1.34979 4.03125 1.49979 4.18125L4.16229 6.8625Z" fill="#16A249"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 668 B |
11
assets/icons/check_filled.svg
Normal file
11
assets/icons/check_filled.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect opacity="0.2" width="20" height="20" rx="6" fill="#16A249"/>
|
||||
<g clip-path="url(#clip0_1823_10218)">
|
||||
<path d="M8.16229 12.8625L14.5185 6.50625C14.6685 6.35625 14.8435 6.28125 15.0435 6.28125C15.2435 6.28125 15.4185 6.35625 15.5685 6.50625C15.7185 6.65625 15.7935 6.83438 15.7935 7.04063C15.7935 7.24688 15.7185 7.425 15.5685 7.575L8.68729 14.475C8.53729 14.625 8.36229 14.7 8.16229 14.7C7.96229 14.7 7.78729 14.625 7.63729 14.475L4.41229 11.25C4.26229 11.1 4.19041 10.9219 4.19666 10.7156C4.20291 10.5094 4.28104 10.3313 4.43104 10.1813C4.58104 10.0313 4.75916 9.95625 4.96541 9.95625C5.17166 9.95625 5.34979 10.0313 5.49979 10.1813L8.16229 12.8625Z" fill="#16A249"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_1823_10218">
|
||||
<rect width="12" height="9" fill="white" transform="translate(4 6)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 911 B |
12
assets/icons/close_mark.svg
Normal file
12
assets/icons/close_mark.svg
Normal file
@@ -0,0 +1,12 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_1846_342)">
|
||||
<path d="M5.33333 16C3.85185 16 2.59259 15.4815 1.55556 14.4444C0.518518 13.4074 0 12.1481 0 10.6667V5.33333C0 3.85185 0.518518 2.59259 1.55556 1.55556C2.59259 0.518518 3.85185 0 5.33333 0H10.6667C12.1481 0 13.4074 0.518518 14.4444 1.55556C15.4815 2.59259 16 3.85185 16 5.33333V10.6667C16 12.1481 15.4815 13.4074 14.4444 14.4444C13.4074 15.4815 12.1481 16 10.6667 16H5.33333ZM5.33333 14.2222H10.6667C11.6444 14.2222 12.4815 13.8741 13.1778 13.1778C13.8741 12.4815 14.2222 11.6444 14.2222 10.6667V5.33333C14.2222 4.35556 13.8741 3.51852 13.1778 2.82222C12.4815 2.12593 11.6444 1.77778 10.6667 1.77778H5.33333C4.35556 1.77778 3.51852 2.12593 2.82222 2.82222C2.12593 3.51852 1.77778 4.35556 1.77778 5.33333V10.6667C1.77778 11.6444 2.12593 12.4815 2.82222 13.1778C3.51852 13.8741 4.35556 14.2222 5.33333 14.2222Z" fill="#D22121"/>
|
||||
<rect x="4.81836" y="10.9749" width="8" height="1" rx="0.5" transform="rotate(-45 4.81836 10.9749)" fill="#D22121"/>
|
||||
<rect x="5.52539" y="5.31799" width="8" height="1" rx="0.5" transform="rotate(45 5.52539 5.31799)" fill="#D22121"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_1846_342">
|
||||
<rect width="16" height="16" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -131,6 +131,7 @@ class PrimaryColors {
|
||||
Color get greenA70001 => const Color(0XFF00BE13);
|
||||
|
||||
Color get green => const Color(0XFF0BB450);
|
||||
Color get darkGreen => const Color(0XFF16A249);
|
||||
|
||||
// LightGreen
|
||||
Color get lightGreen300 => const Color(0XFFB2DF8A);
|
||||
@@ -163,7 +164,7 @@ class PrimaryColors {
|
||||
Color get transparentBlue => const Color(0xFF2F80ED).withValues(alpha: 0.1);
|
||||
|
||||
Color get lightGray0 => const Color(0xFFF6F6F6);
|
||||
|
||||
|
||||
Color get darkGrey => const Color(0xFF5B656F);
|
||||
|
||||
Color get lightGray00 => const Color(0xFFE9E9EA);
|
||||
|
||||
@@ -2,7 +2,9 @@ import 'package:eatvio_app/core/theme/custom_text_style.dart';
|
||||
import 'package:eatvio_app/core/theme/theme_helper.dart';
|
||||
import 'package:eatvio_app/core/widgets/custom_outlined_button.dart';
|
||||
import 'package:eatvio_app/core/widgets/custom_text_form_field.dart';
|
||||
import 'package:eatvio_app/features/create_diet/presentation/widgets/error_widget.dart';
|
||||
import 'package:eatvio_app/features/registration_v2/cubit/registration_cubit.dart';
|
||||
import 'package:eatvio_app/features/registration_v2/cubit/registration_state.dart';
|
||||
import 'package:eatvio_app/features/registration_v2/presentation/widgets/sex_widget.dart';
|
||||
import 'package:eatvio_app/generated/l10n.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -15,75 +17,84 @@ class FirstStepContent extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final s = S.of(context);
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
return BlocBuilder<RegistrationCubitV2, RegistrationStateV2>(
|
||||
builder: (context, state) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(s.first_name, style: TextStyles.textSMedium.copyWith(color: appTheme.black)),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(hintText: s.your_name),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(s.last_name, style: TextStyles.textSMedium.copyWith(color: appTheme.black)),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(hintText: s.your_last_name),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(s.email, style: TextStyles.textSMedium.copyWith(color: appTheme.black)),
|
||||
CustomTextFormField(hintText: s.type_email),
|
||||
const SizedBox(height: 12),
|
||||
Text(s.phone, style: TextStyles.textSMedium.copyWith(color: appTheme.black)),
|
||||
const CustomTextFormField(hintText: '+7 (999) 999 99 99'),
|
||||
const SizedBox(height: 12),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(s.date_of_birth, style: TextStyles.textSMedium.copyWith(color: appTheme.black)),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(
|
||||
textInputAction: TextInputAction.done,
|
||||
hintText: '01.01.2000',
|
||||
keyboardType: TextInputType.number,
|
||||
inputFormatters: [maskFormatterForBirthday],
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(s.first_name, style: TextStyles.textSMedium.copyWith(color: appTheme.black)),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(hintText: s.your_name, hasError: !state.isFirstNameValid),
|
||||
if (!state.isFirstNameValid) ...[const SizedBox(height: 4), ValidationErrorWidget(error: s.first_name_validation_error)],
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(s.last_name, style: TextStyles.textSMedium.copyWith(color: appTheme.black)),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(hintText: s.your_last_name, hasError: !state.isLastNameValid),
|
||||
if (!state.isLastNameValid) ...[const SizedBox(height: 4), ValidationErrorWidget(error: s.last_name_error)],
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
const Expanded(child: SexWidget()),
|
||||
const SizedBox(height: 12),
|
||||
Text(s.email, style: TextStyles.textSMedium.copyWith(color: appTheme.black)),
|
||||
CustomTextFormField(hintText: s.type_email, hasError: !state.isEmailValid),
|
||||
if (!state.isEmailValid) ...[const SizedBox(height: 4), ValidationErrorWidget(error: s.email_error)],
|
||||
const SizedBox(height: 12),
|
||||
Text(s.phone, style: TextStyles.textSMedium.copyWith(color: appTheme.black)),
|
||||
const CustomTextFormField(hintText: '+7 (999) 999 99 99'),
|
||||
const SizedBox(height: 12),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(s.date_of_birth, style: TextStyles.textSMedium.copyWith(color: appTheme.black)),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(
|
||||
textInputAction: TextInputAction.done,
|
||||
hintText: '01.01.2000',
|
||||
keyboardType: TextInputType.number,
|
||||
inputFormatters: [maskFormatterForBirthday],
|
||||
hasError: !state.isBirthdayValid,
|
||||
),
|
||||
if (!state.isBirthdayValid) ...[const SizedBox(height: 4), ValidationErrorWidget(error: s.date_of_birth_error)],
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
const Expanded(child: SexWidget()),
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
CustomOutlinedButton(
|
||||
onPressed: () {
|
||||
context.read<RegistrationCubitV2>().nextStep();
|
||||
},
|
||||
text: s.next,
|
||||
height: 52,
|
||||
buttonTextStyle: TextStyles.textSSemibold.copyWith(color: appTheme.whiteA700),
|
||||
buttonStyle: ButtonStyle(side: const WidgetStatePropertyAll(BorderSide.none), backgroundColor: WidgetStatePropertyAll(appTheme.blueA400)),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
CustomOutlinedButton(
|
||||
onPressed: () {
|
||||
context.read<RegistrationCubitV2>().nextStep();
|
||||
},
|
||||
text: s.next,
|
||||
height: 52,
|
||||
buttonTextStyle: TextStyles.textSSemibold.copyWith(color: appTheme.whiteA700),
|
||||
buttonStyle: ButtonStyle(side: const WidgetStatePropertyAll(BorderSide.none), backgroundColor: WidgetStatePropertyAll(appTheme.blueA400)),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,11 @@ import 'package:eatvio_app/core/theme/custom_text_style.dart';
|
||||
import 'package:eatvio_app/core/theme/theme_helper.dart';
|
||||
import 'package:eatvio_app/features/registration_v2/cubit/registration_cubit.dart';
|
||||
import 'package:eatvio_app/features/registration_v2/cubit/registration_state.dart';
|
||||
import 'package:eatvio_app/generated/l10n.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
|
||||
class PasswordField extends StatefulWidget {
|
||||
const PasswordField({super.key, required this.cubit});
|
||||
@@ -13,8 +16,10 @@ class PasswordField extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _PasswordFieldState extends State<PasswordField> {
|
||||
bool copied = false;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final s = S.of(context);
|
||||
return BlocBuilder<RegistrationCubitV2, RegistrationStateV2>(
|
||||
bloc: widget.cubit,
|
||||
builder: (context, state) {
|
||||
@@ -26,10 +31,43 @@ class _PasswordFieldState extends State<PasswordField> {
|
||||
width: double.infinity,
|
||||
child: Row(
|
||||
children: [
|
||||
Text('Klknasd978!9', style: TextStyles.textMMediumAuto.copyWith(color: appTheme.black)),
|
||||
Text('qweqweqwe', style: TextStyles.textMMediumAuto.copyWith(color: appTheme.black)),
|
||||
const Spacer(),
|
||||
GestureDetector(
|
||||
onTap: copied
|
||||
? null
|
||||
: () async {
|
||||
Clipboard.setData(const ClipboardData(text: 'qweqwe'));
|
||||
setState(() {
|
||||
copied = true;
|
||||
});
|
||||
Future.delayed(const Duration(seconds: 3), () {
|
||||
setState(() {
|
||||
copied = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
child: SvgPicture.asset(
|
||||
copied ? 'assets/icons/check_filled.svg' : 'assets/icons/copy2.svg',
|
||||
height: 20,
|
||||
width: 20,
|
||||
colorFilter: copied ? null : ColorFilter.mode(appTheme.black, BlendMode.srcIn),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (copied) ...[
|
||||
const SizedBox(height: 6),
|
||||
Row(
|
||||
children: [
|
||||
SvgPicture.asset('assets/icons/check.svg', height: 10, width: 10),
|
||||
const SizedBox(width: 4),
|
||||
Text(s.copied2, style: TextStyles.textSMedium.copyWith(color: appTheme.darkGreen)),
|
||||
],
|
||||
),
|
||||
],
|
||||
SizedBox(height: copied ? 18 : 12),
|
||||
],
|
||||
);
|
||||
},
|
||||
|
||||
@@ -5,8 +5,9 @@ import 'package:eatvio_app/core/theme/custom_text_style.dart';
|
||||
import 'package:eatvio_app/core/theme/theme_helper.dart';
|
||||
import 'package:eatvio_app/core/widgets/custom_outlined_button.dart';
|
||||
import 'package:eatvio_app/core/widgets/custom_text_form_field.dart';
|
||||
import 'package:eatvio_app/core/widgets/show_error_dialog.dart';
|
||||
import 'package:eatvio_app/features/create_diet/presentation/widgets/error_widget.dart';
|
||||
import 'package:eatvio_app/features/registration_v2/cubit/registration_cubit.dart';
|
||||
import 'package:eatvio_app/features/registration_v2/cubit/registration_state.dart';
|
||||
import 'package:eatvio_app/features/registration_v2/presentation/widgets/phisical_activity.dart';
|
||||
import 'package:eatvio_app/features/registration_v2/presentation/widgets/show_successful_registration_bottom_sheet.dart';
|
||||
import 'package:eatvio_app/generated/l10n.dart';
|
||||
@@ -21,100 +22,105 @@ class SecondStepContent extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final s = S.of(context);
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(s.last_step, style: TextStyles.textFS24FW700.copyWith(color: appTheme.black)),
|
||||
const SizedBox(height: 12),
|
||||
Text(s.user_data_desc, style: TextStyles.textSMedium.copyWith(color: appTheme.black)),
|
||||
const SizedBox(height: 16),
|
||||
Row(
|
||||
return BlocBuilder<RegistrationCubitV2, RegistrationStateV2>(
|
||||
builder: (context, state) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(s.height, style: TextStyles.textSMedium.copyWith(color: appTheme.black)),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(hintText: s.type_height),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(s.weight, style: TextStyles.textSMedium.copyWith(color: appTheme.black)),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(hintText: s.type_weight),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(s.email, style: TextStyles.textSMedium.copyWith(color: appTheme.black)),
|
||||
const PhisicalActivity(),
|
||||
const SizedBox(height: 12),
|
||||
const Spacer(),
|
||||
Row(
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
context.read<RegistrationCubitV2>().prevStep();
|
||||
},
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
child: Ink(
|
||||
height: 52,
|
||||
width: 52,
|
||||
decoration: BoxDecoration(color: appTheme.gray50, borderRadius: BorderRadius.circular(20)),
|
||||
child: Center(child: Icon(Icons.arrow_back_ios_new_rounded, color: appTheme.blueA400, size: 24)),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Expanded(
|
||||
child: CustomOutlinedButton(
|
||||
onPressed: () {
|
||||
showSuccessfulRegistrationBottomSheet(context, context.read<RegistrationCubitV2>());
|
||||
// showErrorDialog(context);
|
||||
},
|
||||
text: s.register,
|
||||
height: 52,
|
||||
buttonTextStyle: TextStyles.textSSemibold.copyWith(color: appTheme.whiteA700),
|
||||
buttonStyle: ButtonStyle(side: const WidgetStatePropertyAll(BorderSide.none), backgroundColor: WidgetStatePropertyAll(appTheme.blueA400)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Center(
|
||||
child: RichText(
|
||||
textAlign: TextAlign.center,
|
||||
text: TextSpan(
|
||||
text: 'Нажимая “Зарегистрироваться”, Вы соглашаетесь \n',
|
||||
style: const TextStyle(fontSize: 12, color: Colors.black),
|
||||
Text(s.last_step, style: TextStyles.textFS24FW700.copyWith(color: appTheme.black)),
|
||||
const SizedBox(height: 12),
|
||||
Text(s.user_data_desc, style: TextStyles.textSMedium.copyWith(color: appTheme.black)),
|
||||
const SizedBox(height: 16),
|
||||
Row(
|
||||
children: [
|
||||
const TextSpan(text: 'c '),
|
||||
if (!hidePlans) ...[
|
||||
TextSpan(
|
||||
text: ' Публичной офертой',
|
||||
style: TextStyle(fontSize: 12, color: appTheme.blueA400, decorationColor: appTheme.blueA400, decoration: TextDecoration.underline),
|
||||
recognizer: TapGestureRecognizer()..onTap = () async => await launchUrl(Uri.parse('${sl<AppConfig>().baseUrl}/oferta_bs.pdf')),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(s.height, style: TextStyles.textSMedium.copyWith(color: appTheme.black)),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(hintText: s.type_height, hasError: !state.isHeightValid),
|
||||
if (!state.isHeightValid) ValidationErrorWidget(error: s.height_error),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(s.weight, style: TextStyles.textSMedium.copyWith(color: appTheme.black)),
|
||||
const SizedBox(height: 4),
|
||||
CustomTextFormField(hintText: s.type_weight, hasError: !state.isWeightValid),
|
||||
if (!state.isWeightValid) ValidationErrorWidget(error: s.weight_error),
|
||||
],
|
||||
),
|
||||
const TextSpan(text: ' и '),
|
||||
],
|
||||
TextSpan(
|
||||
text: 'Политикой конфиденциальности\nи защитой персональных данных',
|
||||
style: TextStyle(fontSize: 12, color: appTheme.blueA400, decorationColor: appTheme.blueA400, decoration: TextDecoration.underline),
|
||||
recognizer: TapGestureRecognizer()..onTap = () async => await launchUrl(Uri.parse('${sl<AppConfig>().baseUrl}/docs/privacy.pdf')),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
],
|
||||
const SizedBox(height: 12),
|
||||
Text(s.phisical_activity, style: TextStyles.textSMedium.copyWith(color: appTheme.black)),
|
||||
const PhisicalActivity(),
|
||||
const SizedBox(height: 12),
|
||||
const Spacer(),
|
||||
Row(
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
context.read<RegistrationCubitV2>().prevStep();
|
||||
},
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
child: Ink(
|
||||
height: 52,
|
||||
width: 52,
|
||||
decoration: BoxDecoration(color: appTheme.gray50, borderRadius: BorderRadius.circular(20)),
|
||||
child: Center(child: Icon(Icons.arrow_back_ios_new_rounded, color: appTheme.blueA400, size: 24)),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Expanded(
|
||||
child: CustomOutlinedButton(
|
||||
onPressed: () {
|
||||
showRegistrationBottomSheet(context, context.read<RegistrationCubitV2>(), false, () async {});
|
||||
},
|
||||
text: s.register,
|
||||
height: 52,
|
||||
buttonTextStyle: TextStyles.textSSemibold.copyWith(color: appTheme.whiteA700),
|
||||
buttonStyle: ButtonStyle(side: const WidgetStatePropertyAll(BorderSide.none), backgroundColor: WidgetStatePropertyAll(appTheme.blueA400)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Center(
|
||||
child: RichText(
|
||||
textAlign: TextAlign.center,
|
||||
text: TextSpan(
|
||||
text: 'Нажимая “Зарегистрироваться”, Вы соглашаетесь \n',
|
||||
style: const TextStyle(fontSize: 12, color: Colors.black),
|
||||
children: [
|
||||
const TextSpan(text: 'c '),
|
||||
if (!hidePlans) ...[
|
||||
TextSpan(
|
||||
text: ' Публичной офертой',
|
||||
style: TextStyle(fontSize: 12, color: appTheme.blueA400, decorationColor: appTheme.blueA400, decoration: TextDecoration.underline),
|
||||
recognizer: TapGestureRecognizer()..onTap = () async => await launchUrl(Uri.parse('${sl<AppConfig>().baseUrl}/oferta_bs.pdf')),
|
||||
),
|
||||
const TextSpan(text: ' и '),
|
||||
],
|
||||
TextSpan(
|
||||
text: 'Политикой конфиденциальности\nи защитой персональных данных',
|
||||
style: TextStyle(fontSize: 12, color: appTheme.blueA400, decorationColor: appTheme.blueA400, decoration: TextDecoration.underline),
|
||||
recognizer: TapGestureRecognizer()..onTap = () async => await launchUrl(Uri.parse('${sl<AppConfig>().baseUrl}/docs/privacy.pdf')),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:eatvio_app/core/theme/custom_text_style.dart';
|
||||
import 'package:eatvio_app/core/theme/theme_helper.dart';
|
||||
import 'package:eatvio_app/features/create_diet/presentation/widgets/error_widget.dart';
|
||||
import 'package:eatvio_app/features/registration_v2/cubit/registration_cubit.dart';
|
||||
import 'package:eatvio_app/features/registration_v2/cubit/registration_state.dart';
|
||||
import 'package:eatvio_app/generated/l10n.dart';
|
||||
@@ -14,31 +15,70 @@ class SexWidget extends StatelessWidget {
|
||||
final s = S.of(context);
|
||||
return BlocBuilder<RegistrationCubitV2, RegistrationStateV2>(
|
||||
builder: (context, state) {
|
||||
return Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
return Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(s.sex, style: TextStyles.textSMedium.copyWith(color: appTheme.black)),
|
||||
InkWell(
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(s.sex, style: TextStyles.textSMedium.copyWith(color: appTheme.black)),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
context.read<RegistrationCubitV2>().setGender('male');
|
||||
},
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
child: Ink(
|
||||
height: 60,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFF6F6F6),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
border: state.isGenderValid
|
||||
? state.gender == 'male'
|
||||
? Border.all(width: 2, color: appTheme.blueA400)
|
||||
: null
|
||||
: Border.all(width: 1, color: appTheme.red),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
s.male_short,
|
||||
style: TextStyle(
|
||||
color: state.gender == 'male' ? appTheme.blueA400 : const Color(0xFF323F4B),
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Expanded(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
context.read<RegistrationCubitV2>().setGender('male');
|
||||
context.read<RegistrationCubitV2>().setGender('female');
|
||||
},
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
child: Ink(
|
||||
height: 52,
|
||||
height: 60,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFF6F6F6),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
border: state.gender == 'male' ? Border.all(width: 2, color: appTheme.blueA400) : null,
|
||||
border: state.isGenderValid
|
||||
? state.gender == 'female'
|
||||
? Border.all(width: 2, color: appTheme.blueA400)
|
||||
: null
|
||||
: Border.all(width: 1, color: appTheme.red),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
s.male_short,
|
||||
s.female_short,
|
||||
style: TextStyle(
|
||||
color: state.gender == 'male' ? appTheme.blueA400 : const Color(0xFF323F4B),
|
||||
color: state.gender == 'female' ? appTheme.blueA400 : const Color(0xFF323F4B),
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
@@ -46,36 +86,10 @@ class SexWidget extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Expanded(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
context.read<RegistrationCubitV2>().setGender('female');
|
||||
},
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
child: Ink(
|
||||
height: 52,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFF6F6F6),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
border: state.gender == 'female' ? Border.all(width: 2, color: appTheme.blueA400) : null,
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
s.female_short,
|
||||
style: TextStyle(
|
||||
color: state.gender == 'female' ? appTheme.blueA400 : const Color(0xFF323F4B),
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (!state.isGenderValid) ...[const SizedBox(height: 4), ValidationErrorWidget(error: s.gender_error)],
|
||||
],
|
||||
);
|
||||
},
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import 'package:eatvio_app/core/theme/custom_text_style.dart';
|
||||
import 'package:eatvio_app/core/theme/theme_helper.dart';
|
||||
import 'package:eatvio_app/core/widgets/custom_outlined_button.dart';
|
||||
import 'package:eatvio_app/features/registration_v2/cubit/registration_cubit.dart';
|
||||
import 'package:eatvio_app/features/registration_v2/presentation/widgets/password_field.dart';
|
||||
import 'package:eatvio_app/generated/l10n.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
|
||||
void showSuccessfulRegistrationBottomSheet(BuildContext context, RegistrationCubitV2 cubit) {
|
||||
void showRegistrationBottomSheet(BuildContext context, RegistrationCubitV2 cubit, bool isSuccess, Future<void> Function() tryAgain) {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
@@ -14,14 +15,27 @@ void showSuccessfulRegistrationBottomSheet(BuildContext context, RegistrationCub
|
||||
builder: (context) => Container(
|
||||
margin: EdgeInsets.only(left: 8, right: 8, bottom: MediaQuery.of(context).viewInsets.bottom + MediaQuery.of(context).padding.bottom),
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: appTheme.whiteA700),
|
||||
child: SuccessfulBottomSheet(cubit: cubit),
|
||||
child: RegistrationBottomSheet(cubit: cubit, isSuccess: isSuccess),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
class SuccessfulBottomSheet extends StatelessWidget {
|
||||
const SuccessfulBottomSheet({super.key, required this.cubit});
|
||||
class RegistrationBottomSheet extends StatefulWidget {
|
||||
const RegistrationBottomSheet({super.key, required this.cubit, required this.isSuccess});
|
||||
final RegistrationCubitV2 cubit;
|
||||
final bool isSuccess;
|
||||
@override
|
||||
State<RegistrationBottomSheet> createState() => _RegistrationBottomSheetState();
|
||||
}
|
||||
|
||||
class _RegistrationBottomSheetState extends State<RegistrationBottomSheet> {
|
||||
late bool isSuccess;
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
isSuccess = widget.isSuccess;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final s = S.of(context);
|
||||
@@ -29,27 +43,64 @@ class SuccessfulBottomSheet extends StatelessWidget {
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 12.0),
|
||||
child: Row(
|
||||
children: [
|
||||
SvgPicture.asset('assets/icons/sucess.svg', height: 16, width: 16),
|
||||
const SizedBox(width: 8),
|
||||
Text(s.registration_completed, style: TextStyles.textFS22FW600.copyWith(color: appTheme.black)),
|
||||
],
|
||||
),
|
||||
),
|
||||
children: isSuccess
|
||||
? [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 12.0),
|
||||
child: Row(
|
||||
children: [
|
||||
SvgPicture.asset('assets/icons/sucess.svg', height: 16, width: 16),
|
||||
const SizedBox(width: 8),
|
||||
Text(s.registration_completed, style: TextStyles.textFS22FW600.copyWith(color: appTheme.black)),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 16.0),
|
||||
child: Text(s.acc_has_been_created, style: TextStyles.textMMediumAuto.copyWith(color: appTheme.darkGrey)),
|
||||
),
|
||||
PasswordField(cubit: cubit),
|
||||
Text(s.password_desc, style: TextStyles.textSMedium.copyWith(color: appTheme.darkGrey)),
|
||||
const SizedBox(width: 20),
|
||||
//button
|
||||
],
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 16.0),
|
||||
child: Text(s.acc_has_been_created, style: TextStyles.textMMediumAuto.copyWith(color: appTheme.darkGrey)),
|
||||
),
|
||||
PasswordField(cubit: widget.cubit),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20.0),
|
||||
child: Text(s.password_desc, style: TextStyles.textSMedium.copyWith(color: appTheme.darkGrey)),
|
||||
),
|
||||
|
||||
CustomOutlinedButton(
|
||||
text: s.login,
|
||||
height: 52,
|
||||
buttonTextStyle: TextStyles.textMSemibold.copyWith(color: appTheme.whiteA700),
|
||||
buttonStyle: ButtonStyle(side: const WidgetStatePropertyAll(BorderSide.none), backgroundColor: WidgetStatePropertyAll(appTheme.blueA400)),
|
||||
onPressed: () async {},
|
||||
),
|
||||
const SizedBox(width: 20),
|
||||
//button
|
||||
]
|
||||
: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 12.0),
|
||||
child: Row(
|
||||
children: [
|
||||
SvgPicture.asset('assets/icons/close_mark.svg', height: 16, width: 16),
|
||||
const SizedBox(width: 8),
|
||||
Text(s.signUpFailed, style: TextStyles.textFS22FW600.copyWith(color: appTheme.black)),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 16.0),
|
||||
child: Text(s.error_desc, style: TextStyles.textMMediumAuto.copyWith(color: appTheme.darkGrey)),
|
||||
),
|
||||
CustomOutlinedButton(
|
||||
text: s.try_again,
|
||||
height: 52,
|
||||
buttonTextStyle: TextStyles.textMSemibold.copyWith(color: appTheme.whiteA700),
|
||||
buttonStyle: ButtonStyle(side: const WidgetStatePropertyAll(BorderSide.none), backgroundColor: WidgetStatePropertyAll(appTheme.blueA400)),
|
||||
onPressed: () async {},
|
||||
),
|
||||
const SizedBox(width: 20),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -11,17 +11,12 @@ class StepProgress extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return BlocBuilder<RegistrationCubitV2, RegistrationStateV2>(
|
||||
builder: (context, state) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
context.read<RegistrationCubitV2>().nextStep();
|
||||
},
|
||||
child: LinearProgressIndicator(
|
||||
value: state.step == 0 ? 0.5 : 1,
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
color: appTheme.blueA400,
|
||||
backgroundColor: appTheme.greyD9,
|
||||
minHeight: 8,
|
||||
),
|
||||
return LinearProgressIndicator(
|
||||
value: state.step == 0 ? 0.5 : 1,
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
color: appTheme.blueA400,
|
||||
backgroundColor: appTheme.greyD9,
|
||||
minHeight: 8,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -232,6 +232,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"continueButton": MessageLookupByLibrary.simpleMessage("Продолжить"),
|
||||
"continue_": MessageLookupByLibrary.simpleMessage("Продолжить"),
|
||||
"copied": MessageLookupByLibrary.simpleMessage("cкопирован"),
|
||||
"copied2": MessageLookupByLibrary.simpleMessage("Скопировано!"),
|
||||
"copy": MessageLookupByLibrary.simpleMessage("Скопировать"),
|
||||
"copy_link": MessageLookupByLibrary.simpleMessage("Скопировать ссылку"),
|
||||
"copy_referral_link": MessageLookupByLibrary.simpleMessage(
|
||||
@@ -279,6 +280,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"Дата старта начала консультации установлена",
|
||||
),
|
||||
"date_of_birth": MessageLookupByLibrary.simpleMessage("Дата рождения"),
|
||||
"date_of_birth_error": MessageLookupByLibrary.simpleMessage(
|
||||
"Некорректная дата рождения",
|
||||
),
|
||||
"day": MessageLookupByLibrary.simpleMessage("День"),
|
||||
"dayComment": MessageLookupByLibrary.simpleMessage(
|
||||
"Комментарий ко всему дню",
|
||||
@@ -334,6 +338,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"email_empty": MessageLookupByLibrary.simpleMessage(
|
||||
"Необходимо ввести адрес электронной почты",
|
||||
),
|
||||
"email_error": MessageLookupByLibrary.simpleMessage(
|
||||
"Некорректный адрес электронной почты",
|
||||
),
|
||||
"email_invalid": MessageLookupByLibrary.simpleMessage(
|
||||
"Некорректный адрес электронной почты",
|
||||
),
|
||||
@@ -352,6 +359,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"enter_information": MessageLookupByLibrary.simpleMessage(
|
||||
"Введите информацию...",
|
||||
),
|
||||
"error_desc": MessageLookupByLibrary.simpleMessage(
|
||||
"Произошла ошибка. Мы уже работаем над её устранением. Попробуйте позже",
|
||||
),
|
||||
"exit": MessageLookupByLibrary.simpleMessage("Выйти"),
|
||||
"expand": MessageLookupByLibrary.simpleMessage("Показать полностью"),
|
||||
"explainResonOfCancelation": MessageLookupByLibrary.simpleMessage(
|
||||
@@ -391,6 +401,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"first_name_short": MessageLookupByLibrary.simpleMessage(
|
||||
"В имени должен быть минимум 1 символ",
|
||||
),
|
||||
"first_name_validation_error": MessageLookupByLibrary.simpleMessage(
|
||||
"Имя обязательно к заполнению",
|
||||
),
|
||||
"fit_type": MessageLookupByLibrary.simpleMessage("Поддержание формы"),
|
||||
"fit_type_desc": MessageLookupByLibrary.simpleMessage(
|
||||
"План питания для поддержания формы сбалансированный и разнообразный, чтобы обеспечить организм всеми необходимыми питательными веществами. Общие принципы: \n● Дробное питание; \n● Разнообразие продуктов; \n● Контроль порций; \n● Питьевой режим; \n● Ограничение вредных продуктов;",
|
||||
@@ -410,6 +423,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"from_a_to_z": MessageLookupByLibrary.simpleMessage("Название: А-Я"),
|
||||
"from_z_to_a": MessageLookupByLibrary.simpleMessage("Название: Я-А"),
|
||||
"gallery": MessageLookupByLibrary.simpleMessage("Галерея"),
|
||||
"gender_error": MessageLookupByLibrary.simpleMessage("Выберите пол"),
|
||||
"general_info": MessageLookupByLibrary.simpleMessage("Общая информация"),
|
||||
"go_to_diary": MessageLookupByLibrary.simpleMessage("Перейти в дневник"),
|
||||
"gr": MessageLookupByLibrary.simpleMessage("гр"),
|
||||
@@ -427,6 +441,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"Враждебные высказывания",
|
||||
),
|
||||
"height": MessageLookupByLibrary.simpleMessage("Рост"),
|
||||
"height_error": MessageLookupByLibrary.simpleMessage("Введите рост"),
|
||||
"height_measurements": MessageLookupByLibrary.simpleMessage("Замер роста"),
|
||||
"hide": MessageLookupByLibrary.simpleMessage("Свернуть"),
|
||||
"hip_circumference": MessageLookupByLibrary.simpleMessage("Обхват бедер"),
|
||||
@@ -454,6 +469,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"last_name_empty": MessageLookupByLibrary.simpleMessage(
|
||||
"Фамилия обязательна для заполнения",
|
||||
),
|
||||
"last_name_error": MessageLookupByLibrary.simpleMessage(
|
||||
"Фамилия обязательна для заполнения",
|
||||
),
|
||||
"last_name_short": MessageLookupByLibrary.simpleMessage(
|
||||
"В фамилии должен быть минимум 6 символов",
|
||||
),
|
||||
@@ -474,6 +492,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"Ссылка успешно скопирована",
|
||||
),
|
||||
"loading": MessageLookupByLibrary.simpleMessage("Загрузка..."),
|
||||
"login": MessageLookupByLibrary.simpleMessage("Войти в аккаунт"),
|
||||
"lower": MessageLookupByLibrary.simpleMessage("Нижнее"),
|
||||
"mail_was_copied": MessageLookupByLibrary.simpleMessage(
|
||||
"Почта успешно скопирована",
|
||||
@@ -591,7 +610,13 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"pending_payment": MessageLookupByLibrary.simpleMessage("Ожидается оплата"),
|
||||
"personal": MessageLookupByLibrary.simpleMessage("Персональные"),
|
||||
"personal_diet_state": MessageLookupByLibrary.simpleMessage("Персональная"),
|
||||
"phisical_activity": MessageLookupByLibrary.simpleMessage(
|
||||
"Уровень физической активности",
|
||||
),
|
||||
"phone": MessageLookupByLibrary.simpleMessage("Телефон"),
|
||||
"phone_error": MessageLookupByLibrary.simpleMessage(
|
||||
"Некорректный номер телефона",
|
||||
),
|
||||
"photo": MessageLookupByLibrary.simpleMessage("Фото"),
|
||||
"physical_fitness": MessageLookupByLibrary.simpleMessage(
|
||||
"Физическая форма",
|
||||
@@ -681,6 +706,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"settings": MessageLookupByLibrary.simpleMessage("Настройки"),
|
||||
"sex": MessageLookupByLibrary.simpleMessage("Пол"),
|
||||
"share": MessageLookupByLibrary.simpleMessage("Поделиться"),
|
||||
"signUpFailed": MessageLookupByLibrary.simpleMessage(
|
||||
"Регистрация не удалась!",
|
||||
),
|
||||
"skip": MessageLookupByLibrary.simpleMessage("Пропустить"),
|
||||
"slim": MessageLookupByLibrary.simpleMessage("Похудение"),
|
||||
"slim_type": MessageLookupByLibrary.simpleMessage("Похудение"),
|
||||
@@ -818,6 +846,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"weapon": MessageLookupByLibrary.simpleMessage("Оружие"),
|
||||
"weight": MessageLookupByLibrary.simpleMessage("Вес"),
|
||||
"weight_chart": MessageLookupByLibrary.simpleMessage("График веса"),
|
||||
"weight_error": MessageLookupByLibrary.simpleMessage("Введите вес"),
|
||||
"weight_measurements": MessageLookupByLibrary.simpleMessage("Замер веса"),
|
||||
"wellness": MessageLookupByLibrary.simpleMessage("Улучшение самочувствия"),
|
||||
"wellness_type": MessageLookupByLibrary.simpleMessage(
|
||||
|
||||
@@ -3683,6 +3683,126 @@ class S {
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Имя обязательно к заполнению`
|
||||
String get first_name_validation_error {
|
||||
return Intl.message(
|
||||
'Имя обязательно к заполнению',
|
||||
name: 'first_name_validation_error',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Фамилия обязательна для заполнения`
|
||||
String get last_name_error {
|
||||
return Intl.message(
|
||||
'Фамилия обязательна для заполнения',
|
||||
name: 'last_name_error',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Некорректный адрес электронной почты`
|
||||
String get email_error {
|
||||
return Intl.message(
|
||||
'Некорректный адрес электронной почты',
|
||||
name: 'email_error',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Некорректный номер телефона`
|
||||
String get phone_error {
|
||||
return Intl.message(
|
||||
'Некорректный номер телефона',
|
||||
name: 'phone_error',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Выберите пол`
|
||||
String get gender_error {
|
||||
return Intl.message(
|
||||
'Выберите пол',
|
||||
name: 'gender_error',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Некорректная дата рождения`
|
||||
String get date_of_birth_error {
|
||||
return Intl.message(
|
||||
'Некорректная дата рождения',
|
||||
name: 'date_of_birth_error',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Введите рост`
|
||||
String get height_error {
|
||||
return Intl.message(
|
||||
'Введите рост',
|
||||
name: 'height_error',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Введите вес`
|
||||
String get weight_error {
|
||||
return Intl.message(
|
||||
'Введите вес',
|
||||
name: 'weight_error',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Уровень физической активности`
|
||||
String get phisical_activity {
|
||||
return Intl.message(
|
||||
'Уровень физической активности',
|
||||
name: 'phisical_activity',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Скопировано!`
|
||||
String get copied2 {
|
||||
return Intl.message('Скопировано!', name: 'copied2', desc: '', args: []);
|
||||
}
|
||||
|
||||
/// `Войти в аккаунт`
|
||||
String get login {
|
||||
return Intl.message('Войти в аккаунт', name: 'login', desc: '', args: []);
|
||||
}
|
||||
|
||||
/// `Регистрация не удалась!`
|
||||
String get signUpFailed {
|
||||
return Intl.message(
|
||||
'Регистрация не удалась!',
|
||||
name: 'signUpFailed',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Произошла ошибка. Мы уже работаем над её устранением. Попробуйте позже`
|
||||
String get error_desc {
|
||||
return Intl.message(
|
||||
'Произошла ошибка. Мы уже работаем над её устранением. Попробуйте позже',
|
||||
name: 'error_desc',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class AppLocalizationDelegate extends LocalizationsDelegate<S> {
|
||||
|
||||
@@ -436,6 +436,19 @@
|
||||
"registration_completed": "Регистрация завершена!",
|
||||
"acc_has_been_created": "Ваш аккаунт создан. Для входа используйте этот пароль:",
|
||||
"password_desc": "Сохраните его в надежном месте! Вы сможете изменить пароль в настройках профиля",
|
||||
"acc_has_been_created_btn": "Войти в аккаунт"
|
||||
"acc_has_been_created_btn": "Войти в аккаунт",
|
||||
"first_name_validation_error": "Имя обязательно к заполнению",
|
||||
"last_name_error": "Фамилия обязательна для заполнения",
|
||||
"email_error": "Некорректный адрес электронной почты",
|
||||
"phone_error": "Некорректный номер телефона",
|
||||
"gender_error": "Выберите пол",
|
||||
"date_of_birth_error": "Некорректная дата рождения",
|
||||
"height_error": "Введите рост",
|
||||
"weight_error": "Введите вес",
|
||||
"phisical_activity": "Уровень физической активности",
|
||||
"copied2": "Скопировано!",
|
||||
"login": "Войти в аккаунт",
|
||||
"signUpFailed": "Регистрация не удалась!",
|
||||
"error_desc": "Произошла ошибка. Мы уже работаем над её устранением. Попробуйте позже"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user