refactor(diary): Compiled version apk: profile, settings, diarym registration, auth, navigation bar

This commit is contained in:
2024-04-10 17:07:56 +03:00
parent f4ddb7285c
commit bbbc20a15a
11 changed files with 164 additions and 133 deletions

View File

@@ -255,7 +255,7 @@ class _ExpandableListState extends State<ExpandableList> {
],
),
NextStepButton(
onPressed: sendData(state),
onPressed: () => sendProfileData(state),
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
text: "save".tr.toUpperCase(),
margin: EdgeInsets.only(top: 20.h, bottom: 20.h)),
@@ -326,6 +326,7 @@ class _ExpandableListState extends State<ExpandableList> {
}
Future<void> sendProfileData(MyProfileLoadedState? state) async {
print("asd");
try {
// Создаем JSON объект с данными профиля
Map<String, dynamic> profileData = {
@@ -350,8 +351,7 @@ class _ExpandableListState extends State<ExpandableList> {
'has_hypo': state?.hypoFormController,
'has_hyper': state?.hyperFormController,
'activity_coefficient':
determineActivityFactor(state?.selectedActivity ?? 'сидячий')
.toString,
determineActivityFactor(state?.selectedActivity ?? 'сидячий'),
};
final box = await Hive.openBox('token');
final token = box.get('token');