diff --git a/lib/localization/ru/ru_translations.dart b/lib/localization/ru/ru_translations.dart index 820010a4..57762bce 100644 --- a/lib/localization/ru/ru_translations.dart +++ b/lib/localization/ru/ru_translations.dart @@ -23,6 +23,8 @@ final Map ru = { "waist_circumference": "Обхват талии", "initial_measurements": "Первичные замеры", + "male": "Мужской", + "female": "Женский", // weight Screen "weight_measurements": "Замер веса", "your_weight": "Ваш вес:", "height_measurements": "Замер роста", "your_height": "Ваш рост:", diff --git a/lib/presentation/profile/my_profile_screen/my_settings_screen.dart b/lib/presentation/profile/my_profile_screen/my_settings_screen.dart index f3f0f1ad..8cf4d561 100644 --- a/lib/presentation/profile/my_profile_screen/my_settings_screen.dart +++ b/lib/presentation/profile/my_profile_screen/my_settings_screen.dart @@ -28,6 +28,9 @@ class MySettingsScreen extends StatelessWidget { } else if (state is MyProfileLoadedState) { // Данные загружены, можно строить экран. return _buildSetingsScreen(context, state); + } else if (state is MyProfileErrorState) { + // Произошла ошибка при загрузке данных. + return Center(child: Text(state.errorMessage)); } else { // Другие состояния, если они есть. return Container(); // Пустой контейнер для необработанных состояний. @@ -210,8 +213,7 @@ class _ExpandableListState extends State { @override Widget build(BuildContext context) { - return Column( - crossAxisAlignment: CrossAxisAlignment.stretch, + return ListView( children: [ GestureDetector( onTap: () { @@ -237,8 +239,103 @@ class _ExpandableListState extends State { Padding( padding: const EdgeInsets.only(left: 16.0), child: Column( - //children: widget.items.map((item) => Text(item)).toList(), - children: [Text(widget.items.join('\n'))]), + children: [ + TextField( + decoration: InputDecoration(labelText: 'first_name'.tr), + ), + TextField( + decoration: InputDecoration(labelText: 'last_name'.tr), + ), + // Поле даты рождения, предполагается, что 'reg_form.date_of_birth' это функция для получения даты рождения + TextField( + decoration: InputDecoration(labelText: 'date_of_birth'.tr), + onTap: () { + // Вставьте здесь логику для отображения выбора даты + }, + ), + // Поле выбора пола + Row( + children: [ + Radio(value: 'male'.tr, groupValue: null, onChanged: null), + Text('Male'), + Radio(value: 'female'.tr, groupValue: null, onChanged: null), + Text('Female'), + ], + ), + TextField( + decoration: InputDecoration(labelText: 'country'.tr), + ), + TextField( + decoration: InputDecoration(labelText: 'place_of_living'.tr), + ), + // Поле выбора языка + DropdownButton( + value: null, + onChanged: (newValue) { + // Вставьте здесь логику для обработки выбора языка + }, + items: ['russian'.tr].map((String language) { + return DropdownMenuItem( + value: language, + child: Text(language), + ); + }).toList(), + ), + // Поля для ввода чисел + TextField( + decoration: InputDecoration(labelText: 'weight_measurements'.tr), + keyboardType: TextInputType.number, + ), + TextField( + decoration: InputDecoration(labelText: 'height_measurements'.tr), + keyboardType: TextInputType.number, + ), + TextField( + decoration: InputDecoration(labelText: 'chest_circumference'.tr), + keyboardType: TextInputType.number, + ), + TextField( + decoration: InputDecoration(labelText: 'waist_circumference'.tr), + keyboardType: TextInputType.number, + ), + TextField( + decoration: InputDecoration(labelText: 'hip_circumference'.tr), + keyboardType: TextInputType.number, + ), + TextField( + decoration: InputDecoration(labelText: 'up_pressure'.tr), + keyboardType: TextInputType.number, + ), + TextField( + decoration: InputDecoration(labelText: 'down_pressure'), + keyboardType: TextInputType.number, + ), + // Переключатели + Row( + children: [ + Switch(value: false, onChanged: null), + Text('do_you_have_hypotension_tendency'.tr), + ], + ), + Row( + children: [ + Switch(value: false, onChanged: null), + Text('do_you_have_hypertension_tendency'.tr), + ], + ), + // Поля для ввода текста + TextField( + decoration: InputDecoration(labelText: 'allergies_presence'.tr), + maxLines: null, + ), + TextField( + decoration: InputDecoration(labelText: 'do_you_take_pills'.tr), + maxLines: null, + ), + TextField( + decoration: InputDecoration(labelText: 'your_favorite_sports'.tr), + maxLines: null, + ),]), ), Divider(), ],