diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index bbf607e7..e484a472 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -396,7 +396,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Distribution: ITVIO, OOO (VL68C36HYS)";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 68;
+ CURRENT_PROJECT_VERSION = 69;
DEVELOPMENT_TEAM = VL68C36HYS;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -546,7 +546,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Distribution: ITVIO, OOO (VL68C36HYS)";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 68;
+ CURRENT_PROJECT_VERSION = 69;
DEVELOPMENT_TEAM = VL68C36HYS;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -584,7 +584,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Distribution: ITVIO, OOO (VL68C36HYS)";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 68;
+ CURRENT_PROJECT_VERSION = 69;
DEVELOPMENT_TEAM = VL68C36HYS;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index d9e83314..7e814e8a 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -21,7 +21,7 @@
CFBundleSignature
????
CFBundleVersion
- 68
+ 69
ITSAppUsesNonExemptEncryption
LSRequiresIPhoneOS
diff --git a/lib/core/credentials_storage.dart b/lib/core/credentials_storage.dart
deleted file mode 100644
index 05001744..00000000
--- a/lib/core/credentials_storage.dart
+++ /dev/null
@@ -1,33 +0,0 @@
-import 'package:eatvio_app/core/locator_service.dart';
-import 'package:shared_preferences/shared_preferences.dart';
-
-abstract class CredentialsStorage {
- static bool haveCredentialsInStorage() {
- try {
- if (sl().getString('email') == null || sl().getString('password') == null) {
- return false;
- } else {
- return true;
- }
- } catch (e) {
- return false;
- }
- }
-
- static Map getCredentialsFromStorage() {
- return {
- 'email': (sl().getString('email'))!,
- 'password': (sl().getString('password'))!,
- };
- }
-
- static Future saveCredentials(String email, String password) async {
- await sl().setString('email', email);
- await sl().setString('password', password);
- }
-
- static Future removeCredentials() async {
- sl().remove('email');
- sl().remove('password');
- }
-}
diff --git a/lib/core/locator_service.dart b/lib/core/locator_service.dart
index 54ed3a9d..724d8b59 100644
--- a/lib/core/locator_service.dart
+++ b/lib/core/locator_service.dart
@@ -109,7 +109,6 @@ import 'package:eatvio_app/features/settings/services/settings_service.dart';
import 'package:eatvio_app/features/user_details/presentation/cubit/user_details_cubit.dart';
import 'package:get_it/get_it.dart';
import 'package:eatvio_app/features/profile/presentation/bloc/plans_cubit/plans_cubit.dart' as profile_plans;
-import 'package:shared_preferences/shared_preferences.dart';
final sl = GetIt.instance;
@@ -252,5 +251,4 @@ Future init() async {
],
),
);
- sl.registerLazySingleton(() async => SharedPreferences.getInstance());
}
diff --git a/lib/core/token_storage.dart b/lib/core/token_storage.dart
index fec596c5..f67e919c 100644
--- a/lib/core/token_storage.dart
+++ b/lib/core/token_storage.dart
@@ -1,10 +1,10 @@
import 'package:shared_preferences/shared_preferences.dart';
-import 'locator_service.dart';
abstract class TokenStorage {
- static bool haveTokenInStorage() {
+ static Future haveTokenInStorage() async {
+ final sharedPreferences = await SharedPreferences.getInstance();
try {
- if (sl().getString('token') == null) {
+ if (sharedPreferences.getString('token') == null) {
return false;
} else {
return true;
@@ -14,19 +14,27 @@ abstract class TokenStorage {
}
}
- static String? getTokenFromStorage() => sl().getString('token');
-
- static Future saveTokenInStorage(String token) async {
- await sl().setString('token', token);
+ static Future getTokenFromStorage() async {
+ final sharedPreferences = await SharedPreferences.getInstance();
+ return sharedPreferences.getString('token');
}
- static Future removeTokenInStorage() async => (await sl().remove('token'));
+ static Future saveTokenInStorage(String token) async {
+ final sharedPreferences = await SharedPreferences.getInstance();
+ await sharedPreferences.setString('token', token);
+ }
+
+ static Future removeTokenInStorage() async {
+ final sharedPreferences = await SharedPreferences.getInstance();
+ await sharedPreferences.remove('token');
+ }
}
abstract class SocketIdStorage {
- static bool haveSocketIdInStorage() {
+ static Future haveSocketIdInStorage() async {
+ final sharedPreferences = await SharedPreferences.getInstance();
try {
- if (sl().getString('socketId') == null) {
+ if (sharedPreferences.getString('socketId') == null) {
return false;
} else {
return true;
@@ -36,11 +44,18 @@ abstract class SocketIdStorage {
}
}
- static String? getSocketIdFromStorage() => sl().getString('socketId');
-
- static Future saveSocketIdInStorage(String socketId) async {
- await sl().setString('socketId', socketId);
+ static Future getSocketIdFromStorage() async {
+ final sharedPreferences = await SharedPreferences.getInstance();
+ return sharedPreferences.getString('socketId');
}
- static Future removeSocketIdInStorage() async => (await sl().remove('socketId'));
+ static Future saveSocketIdInStorage(String socketId) async {
+ final sharedPreferences = await SharedPreferences.getInstance();
+ await sharedPreferences.setString('socketId', socketId);
+ }
+
+ static Future removeSocketIdInStorage() async {
+ final sharedPreferences = await SharedPreferences.getInstance();
+ await sharedPreferences.remove('socketId');
+ }
}
diff --git a/lib/core/widgets/custom_drop_down.dart b/lib/core/widgets/custom_drop_down.dart
index aca39b44..9580afe7 100644
--- a/lib/core/widgets/custom_drop_down.dart
+++ b/lib/core/widgets/custom_drop_down.dart
@@ -2,7 +2,8 @@ import 'package:eatvio_app/core/data/selectionPopupModel/selection_popup_model.d
import 'package:flutter/material.dart';
class CustomDropDown extends StatelessWidget {
- const CustomDropDown({super.key,
+ const CustomDropDown({
+ super.key,
this.alignment,
this.width,
this.focusNode,
@@ -48,12 +49,7 @@ class CustomDropDown extends StatelessWidget {
@override
Widget build(BuildContext context) {
- return alignment != null
- ? Align(
- alignment: alignment ?? Alignment.center,
- child: _buildDropDownWidget(context),
- )
- : _buildDropDownWidget(context);
+ return alignment != null ? Align(alignment: alignment ?? Alignment.center, child: _buildDropDownWidget(context)) : _buildDropDownWidget(context);
}
DropdownButtonFormField _buildDropDownWidget(BuildContext context) {
@@ -61,7 +57,7 @@ class CustomDropDown extends StatelessWidget {
focusNode: focusNode ?? FocusNode(),
icon: const Icon(Icons.keyboard_arrow_down_rounded),
autofocus: autofocus!,
- value: value,
+ initialValue: value,
isDense: true,
isExpanded: true,
items: items?.map((SelectionPopupModel item) {
@@ -69,12 +65,7 @@ class CustomDropDown extends StatelessWidget {
value: item,
child: Text(
item.title,
- style: hintStyle ??
- const TextStyle(
- fontSize: 16,
- fontWeight: FontWeight.w400,
- color: Colors.black,
- ),
+ style: hintStyle ?? const TextStyle(fontSize: 16, fontWeight: FontWeight.w400, color: Colors.black),
),
);
}).toList(),
@@ -90,19 +81,9 @@ class CustomDropDown extends StatelessWidget {
InputDecoration _buildInputDecoration(BuildContext context) {
return InputDecoration(
- labelStyle: const TextStyle(
- fontSize: 16,
- color: Colors.black,
- fontWeight: FontWeight.w400,
- ),
+ labelStyle: const TextStyle(fontSize: 16, color: Colors.black, fontWeight: FontWeight.w400),
hintText: hintText ?? "",
- hintStyle: hintStyle ??
- TextStyle(
- fontSize: 16,
- fontWeight: FontWeight.w400,
- color: Colors.grey.shade400,
- height: 1,
- ),
+ hintStyle: hintStyle ?? TextStyle(fontSize: 16, fontWeight: FontWeight.w400, color: Colors.grey.shade400, height: 1),
prefixIcon: prefix,
prefixIconConstraints: prefixConstraints,
suffixIcon: suffix,
@@ -111,18 +92,9 @@ class CustomDropDown extends StatelessWidget {
contentPadding: const EdgeInsets.symmetric(vertical: 16, horizontal: 12),
fillColor: const Color(0xFFF6F6F6),
filled: filled,
- border: const OutlineInputBorder(
- borderRadius: BorderRadius.all(Radius.circular(20)),
- borderSide: BorderSide.none,
- ),
- enabledBorder: const OutlineInputBorder(
- borderRadius: BorderRadius.all(Radius.circular(20)),
- borderSide: BorderSide.none,
- ),
- focusedBorder: const OutlineInputBorder(
- borderRadius: BorderRadius.all(Radius.circular(20)),
- borderSide: BorderSide.none,
- ),
+ border: const OutlineInputBorder(borderRadius: BorderRadius.all(Radius.circular(20)), borderSide: BorderSide.none),
+ enabledBorder: const OutlineInputBorder(borderRadius: BorderRadius.all(Radius.circular(20)), borderSide: BorderSide.none),
+ focusedBorder: const OutlineInputBorder(borderRadius: BorderRadius.all(Radius.circular(20)), borderSide: BorderSide.none),
);
}
}
diff --git a/lib/core/widgets/custom_drop_down_button.dart b/lib/core/widgets/custom_drop_down_button.dart
index 714382e7..ac8f3c2b 100644
--- a/lib/core/widgets/custom_drop_down_button.dart
+++ b/lib/core/widgets/custom_drop_down_button.dart
@@ -3,14 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
class CustomDropDownButton extends StatelessWidget {
- const CustomDropDownButton({
- super.key,
- required this.items,
- required this.onChanged,
- this.value,
- this.hint,
- this.hasError = false,
- });
+ const CustomDropDownButton({super.key, required this.items, required this.onChanged, this.value, this.hint, this.hasError = false});
final T? value;
final List> items;
final void Function(T?)? onChanged;
@@ -20,11 +13,7 @@ class CustomDropDownButton extends StatelessWidget {
Widget build(BuildContext context) {
return DropdownButtonFormField(
hint: hint,
- icon: SvgPicture.asset(
- 'assets/icons/arrow_down2.svg',
- width: 12,
- height: 8,
- ),
+ icon: SvgPicture.asset('assets/icons/arrow_down2.svg', width: 12, height: 8),
borderRadius: BorderRadius.circular(20),
dropdownColor: appTheme.lightGray0,
decoration: InputDecoration(
@@ -43,7 +32,7 @@ class CustomDropDownButton extends StatelessWidget {
fillColor: appTheme.lightGray0,
filled: true,
),
- value: value,
+ initialValue: value,
items: items,
onChanged: onChanged,
);
diff --git a/lib/features/consultant/become_consultant/presentation/pages/registration_as_screen.dart b/lib/features/consultant/become_consultant/presentation/pages/registration_as_screen.dart
index 76b90a26..b8fed20b 100644
--- a/lib/features/consultant/become_consultant/presentation/pages/registration_as_screen.dart
+++ b/lib/features/consultant/become_consultant/presentation/pages/registration_as_screen.dart
@@ -23,81 +23,105 @@ class _RegistrationAsScreenState extends State {
children: [
const Padding(
padding: EdgeInsets.symmetric(horizontal: 16),
- child: Text(
- 'Регистрация в качестве',
- style: TextStyle(
- fontSize: 24,
- fontWeight: FontWeight.w700,
- height: 1.1,
- ),
- ),
+ child: Text('Регистрация в качестве', style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, height: 1.1)),
),
const SizedBox(height: 16),
- RadioListTile(
- value: RegistrationAsType.physical,
- groupValue: registrationAsType,
- title: const Text(
- 'Физического лица',
- style: TextStyle(
- fontSize: 18,
- height: 1,
+ Column(
+ children: [
+ Row(
+ children: [
+ Radio(
+ value: RegistrationAsType.physical,
+ // ignore: deprecated_member_use
+ groupValue: registrationAsType,
+ activeColor: appTheme.blueA400,
+ // ignore: deprecated_member_use
+ onChanged: (value) {
+ setState(() {
+ registrationAsType = value!;
+ });
+ },
+ ),
+ const Expanded(
+ child: Padding(
+ padding: EdgeInsets.symmetric(horizontal: 8),
+ child: Text('Физического лица', style: TextStyle(fontSize: 18, height: 1)),
+ ),
+ ),
+ ],
),
- ),
- activeColor: appTheme.blueA400,
- onChanged: (value) {},
- contentPadding: const EdgeInsets.symmetric(horizontal: 8),
- ),
- RadioListTile(
- value: RegistrationAsType.selfBusy,
- groupValue: registrationAsType,
- title: const Text(
- 'Самозанятого',
- style: TextStyle(
- fontSize: 18,
- height: 1,
+ Row(
+ children: [
+ Radio(
+ value: RegistrationAsType.selfBusy,
+ // ignore: deprecated_member_use
+ groupValue: registrationAsType,
+ activeColor: appTheme.blueA400,
+ // ignore: deprecated_member_use
+ onChanged: (value) {
+ setState(() {
+ registrationAsType = value!;
+ });
+ },
+ ),
+ const Expanded(
+ child: Padding(
+ padding: EdgeInsets.symmetric(horizontal: 8),
+ child: Text('Самозанятого', style: TextStyle(fontSize: 18, height: 1)),
+ ),
+ ),
+ ],
),
- ),
- onChanged: null,
- contentPadding: const EdgeInsets.symmetric(horizontal: 8),
- ),
- RadioListTile(
- value: RegistrationAsType.iP,
- groupValue: registrationAsType,
- title: const Text(
- 'Индивидуального предпринимателя',
- style: TextStyle(
- fontSize: 18,
- height: 1,
+ Row(
+ children: [
+ Radio(
+ value: RegistrationAsType.iP,
+ // ignore: deprecated_member_use
+ groupValue: registrationAsType,
+ activeColor: appTheme.blueA400,
+ // ignore: deprecated_member_use
+ onChanged: (value) {
+ setState(() {
+ registrationAsType = value!;
+ });
+ },
+ ),
+ const Expanded(
+ child: Padding(
+ padding: EdgeInsets.symmetric(horizontal: 8),
+ child: Text('Индивидуального предпринимателя', style: TextStyle(fontSize: 18, height: 1)),
+ ),
+ ),
+ ],
),
- ),
- onChanged: null,
- contentPadding: const EdgeInsets.symmetric(horizontal: 8),
- ),
- RadioListTile(
- value: RegistrationAsType.ooo,
- groupValue: registrationAsType,
- title: const Text(
- 'Общества с ограниченной ответственностью',
- style: TextStyle(
- fontSize: 18,
- height: 1,
+ Row(
+ children: [
+ Radio(
+ value: RegistrationAsType.ooo,
+ // ignore: deprecated_member_use
+ groupValue: registrationAsType,
+ activeColor: appTheme.blueA400,
+ // ignore: deprecated_member_use
+ onChanged: (value) {
+ setState(() {
+ registrationAsType = value!;
+ });
+ },
+ ),
+ const Expanded(
+ child: Padding(
+ padding: EdgeInsets.symmetric(horizontal: 8),
+ child: Text('Общества с ограниченной ответственностью', style: TextStyle(fontSize: 18, height: 1)),
+ ),
+ ),
+ ],
),
- ),
- onChanged: null,
- contentPadding: const EdgeInsets.symmetric(horizontal: 8),
- ),
- Padding(
- padding: const EdgeInsets.symmetric(
- horizontal: 16,
- vertical: 16,
- ),
- child: _divider(context),
+ ],
),
+ Padding(padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16), child: _divider(context)),
const Padding(
padding: EdgeInsets.symmetric(horizontal: 16),
- child: Text(
- '* На данный момент регистрация доступна только в качестве физического лица. Остальные варианты скоро появятся',
- ),
+ child: Text('* На данный момент регистрация доступна только в качестве физического лица. Остальные варианты скоро появятся'),
),
],
),
@@ -108,10 +132,7 @@ class _RegistrationAsScreenState extends State {
return Container(
height: 0.4,
width: MediaQuery.of(context).size.width - 32,
- decoration: BoxDecoration(
- color: Colors.black26,
- borderRadius: BorderRadius.circular(16),
- ),
+ decoration: BoxDecoration(color: Colors.black26, borderRadius: BorderRadius.circular(16)),
);
}
}
diff --git a/lib/features/registration/presentation/pages/gender_screen.dart b/lib/features/registration/presentation/pages/gender_screen.dart
index 4403b54e..e58df3d4 100644
--- a/lib/features/registration/presentation/pages/gender_screen.dart
+++ b/lib/features/registration/presentation/pages/gender_screen.dart
@@ -27,48 +27,46 @@ class _GenderScreenState extends State {
padding: const EdgeInsets.only(bottom: 80, top: 16, left: 16, right: 16),
child: Column(
children: [
- RadioListTile(
- contentPadding: EdgeInsets.zero,
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(16),
- ),
- title: const Text('Мужской'),
- value: 'male',
- groupValue: currentValue,
- onChanged: (newValue) {
- final registrationCubit = context.read();
- registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(gender: 'male'));
- setState(() {
- currentValue = 'male';
- });
- },
- secondary: Image.asset(
- 'assets/images/img_male.png',
- width: 40,
- height: 40,
- ),
+ Row(
+ children: [
+ Radio(
+ value: 'male',
+ // ignore: deprecated_member_use
+ groupValue: currentValue,
+ // ignore: deprecated_member_use
+ onChanged: (newValue) {
+ final registrationCubit = context.read();
+ registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(gender: 'male'));
+ setState(() {
+ currentValue = 'male';
+ });
+ },
+ ),
+ Expanded(
+ child: Row(children: [Image.asset('assets/images/img_male.png', width: 40, height: 40), const SizedBox(width: 8), const Text('Мужской')]),
+ ),
+ ],
),
const SizedBox(height: 16),
- RadioListTile(
- contentPadding: EdgeInsets.zero,
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(16),
- ),
- title: const Text('Женский'),
- value: 'female',
- groupValue: currentValue,
- onChanged: (newValue) {
- final registrationCubit = context.read();
- registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(gender: 'female'));
- setState(() {
- currentValue = 'female';
- });
- },
- secondary: Image.asset(
- 'assets/images/img_female.png',
- width: 40,
- height: 40,
- ),
+ Row(
+ children: [
+ Radio(
+ value: 'female',
+ // ignore: deprecated_member_use
+ groupValue: currentValue,
+ // ignore: deprecated_member_use
+ onChanged: (newValue) {
+ final registrationCubit = context.read();
+ registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(gender: 'female'));
+ setState(() {
+ currentValue = 'female';
+ });
+ },
+ ),
+ Expanded(
+ child: Row(children: [Image.asset('assets/images/img_female.png', width: 40, height: 40), const SizedBox(width: 8), const Text('Женский')]),
+ ),
+ ],
),
],
),
diff --git a/lib/features/settings/presentation/pages/physical_activity_screen.dart b/lib/features/settings/presentation/pages/physical_activity_screen.dart
index 3c6b000c..df91a4f6 100644
--- a/lib/features/settings/presentation/pages/physical_activity_screen.dart
+++ b/lib/features/settings/presentation/pages/physical_activity_screen.dart
@@ -7,10 +7,7 @@ import 'package:go_router/go_router.dart';
class PhysicalActivityScreen extends StatefulWidget {
final SettingsEntity settingsEntity;
- const PhysicalActivityScreen({
- super.key,
- required this.settingsEntity,
- });
+ const PhysicalActivityScreen({super.key, required this.settingsEntity});
@override
State createState() => _PhysicalActivityScreenState();
@@ -46,69 +43,108 @@ class _PhysicalActivityScreenState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
- appBar: AppBar(
- title: const Text('Физическая нагрузка'),
- ),
+ appBar: AppBar(title: const Text('Физическая нагрузка')),
bottomSheet: _saveButton(),
body: SingleChildScrollView(
physics: const BouncingScrollPhysics(),
padding: const EdgeInsets.only(top: 16, bottom: 80),
child: Column(
children: [
- RadioListTile(
- contentPadding: const EdgeInsets.only(left: 8, right: 16),
- title: const Text('1,2 — минимальный (сидячая работа, отсутствие физических нагрузок);'),
- value: PhysicalActivity.minimum,
- groupValue: _physicalActivity,
- onChanged: (PhysicalActivity? value) {
- setState(() {
- _physicalActivity = value;
- });
- },
+ Row(
+ children: [
+ Radio(
+ value: PhysicalActivity.minimum,
+ // ignore: deprecated_member_use
+ groupValue: _physicalActivity,
+ // ignore: deprecated_member_use
+ onChanged: (PhysicalActivity? value) {
+ setState(() {
+ _physicalActivity = value;
+ });
+ },
+ ),
+ const Expanded(
+ child: Padding(
+ padding: EdgeInsets.only(left: 8, right: 16),
+ child: Text('1,2 — минимальный (сидячая работа, отсутствие физических нагрузок);'),
+ ),
+ ),
+ ],
),
- RadioListTile(
- contentPadding: const EdgeInsets.only(left: 8, right: 16),
- title: const Text('1,375 — низкий (тренировки не менее 20 мин 1–3 раза в неделю);'),
- value: PhysicalActivity.low,
- groupValue: _physicalActivity,
- onChanged: (PhysicalActivity? value) {
- setState(() {
- _physicalActivity = value;
- });
- },
+ Row(
+ children: [
+ Radio(
+ value: PhysicalActivity.low,
+ // ignore: deprecated_member_use
+ groupValue: _physicalActivity,
+ // ignore: deprecated_member_use
+ onChanged: (PhysicalActivity? value) {
+ setState(() {
+ _physicalActivity = value;
+ });
+ },
+ ),
+ const Expanded(
+ child: Padding(padding: EdgeInsets.only(left: 8, right: 16), child: Text('1,375 — низкий (тренировки не менее 20 мин 1–3 раза в неделю);')),
+ ),
+ ],
),
- RadioListTile(
- contentPadding: const EdgeInsets.only(left: 8, right: 16),
- title: const Text('1,55 — умеренный (тренировки 30–60 мин 3–4 раза в неделю);'),
- value: PhysicalActivity.medium,
- groupValue: _physicalActivity,
- onChanged: (PhysicalActivity? value) {
- setState(() {
- _physicalActivity = value;
- });
- },
+ Row(
+ children: [
+ Radio(
+ value: PhysicalActivity.medium,
+ // ignore: deprecated_member_use
+ groupValue: _physicalActivity,
+ // ignore: deprecated_member_use
+ onChanged: (PhysicalActivity? value) {
+ setState(() {
+ _physicalActivity = value;
+ });
+ },
+ ),
+ const Expanded(
+ child: Padding(padding: EdgeInsets.only(left: 8, right: 16), child: Text('1,55 — умеренный (тренировки 30–60 мин 3–4 раза в неделю);')),
+ ),
+ ],
),
- RadioListTile(
- contentPadding: const EdgeInsets.only(left: 8, right: 16),
- title: const Text('1,7 — высокий (тренировки 30–60 мин 5–7 раза в неделю; тяжёлая физическая работа);'),
- value: PhysicalActivity.high,
- groupValue: _physicalActivity,
- onChanged: (PhysicalActivity? value) {
- setState(() {
- _physicalActivity = value;
- });
- },
+ Row(
+ children: [
+ Radio(
+ value: PhysicalActivity.high,
+ // ignore: deprecated_member_use
+ groupValue: _physicalActivity,
+ // ignore: deprecated_member_use
+ onChanged: (PhysicalActivity? value) {
+ setState(() {
+ _physicalActivity = value;
+ });
+ },
+ ),
+ const Expanded(
+ child: Padding(
+ padding: EdgeInsets.only(left: 8, right: 16),
+ child: Text('1,7 — высокий (тренировки 30–60 мин 5–7 раза в неделю; тяжёлая физическая работа);'),
+ ),
+ ),
+ ],
),
- RadioListTile(
- contentPadding: const EdgeInsets.only(left: 8, right: 16),
- title: const Text('1,9 — экстремальный (несколько интенсивных тренировок в день'),
- value: PhysicalActivity.extreme,
- groupValue: _physicalActivity,
- onChanged: (PhysicalActivity? value) {
- setState(() {
- _physicalActivity = value;
- });
- },
+ Row(
+ children: [
+ Radio(
+ value: PhysicalActivity.extreme,
+ // ignore: deprecated_member_use
+ groupValue: _physicalActivity,
+ // ignore: deprecated_member_use
+ onChanged: (PhysicalActivity? value) {
+ setState(() {
+ _physicalActivity = value;
+ });
+ },
+ ),
+ const Expanded(
+ child: Padding(padding: EdgeInsets.only(left: 8, right: 16), child: Text('1,9 — экстремальный (несколько интенсивных тренировок в день')),
+ ),
+ ],
),
],
),
@@ -141,8 +177,8 @@ class _PhysicalActivityScreenState extends State {
}
widget.settingsEntity.settingsCubit.updateProfileDetails(
profileDetailsModel: (widget.settingsEntity.settingsCubit.state as SettingsStateLoaded).profileDetails.copyWith(
- activityCoefficient: activityCoefficient,
- ),
+ activityCoefficient: activityCoefficient,
+ ),
);
GoRouter.of(context).pop();
},
@@ -150,19 +186,11 @@ class _PhysicalActivityScreenState extends State {
child: Ink(
height: 52,
width: MediaQuery.of(context).size.width - 32,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(20),
- color: appTheme.blueA400,
- ),
+ decoration: BoxDecoration(borderRadius: BorderRadius.circular(20), color: appTheme.blueA400),
child: const Center(
child: Text(
'Сохранить',
- style: TextStyle(
- color: Colors.white,
- height: 1,
- fontWeight: FontWeight.w600,
- fontSize: 18,
- ),
+ style: TextStyle(color: Colors.white, height: 1, fontWeight: FontWeight.w600, fontSize: 18),
),
),
),
diff --git a/pubspec.yaml b/pubspec.yaml
index c8638b7e..3b33303b 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
name: eatvio_app
description: A new Flutter project.
-version: 1.2.9+69
+version: 1.2.10+70
publish_to: 'none'
environment: