forked from eatvio/eatvio_app
Layout fixes
This commit is contained in:
@@ -45,11 +45,7 @@ class MyProfileBloc extends Bloc<MyProfileEvent, MyProfileState> {
|
||||
// Если текущее состояние уже загружено, обновляем его
|
||||
var currentState = state as MyProfileLoadedState;
|
||||
// Обновляем значения контроллеров только если они уже были созданы
|
||||
if (currentState.firstNameFormController != null &&
|
||||
data['userDetails'] != null) {
|
||||
currentState.firstNameFormController!.text = 'asdasdasd';
|
||||
// Повторите для других контроллеров и полей данных
|
||||
}
|
||||
|
||||
emit((currentState).copyWith(
|
||||
chartPoints: data['chartPoints'],
|
||||
circumferences: data['circumferences'],
|
||||
@@ -97,6 +93,8 @@ class MyProfileBloc extends Bloc<MyProfileEvent, MyProfileState> {
|
||||
text: data['userDetails']['hip_circumference']?.toString()),
|
||||
weightController: TextEditingController(
|
||||
text: data['userDetails']['weight']?.toString()),
|
||||
weightFormController: TextEditingController(
|
||||
text: data['userDetails']['weight']?.toString()),
|
||||
firstNameFormController: TextEditingController(
|
||||
text: data['userDetails']['first_name']),
|
||||
lastNameFormController:
|
||||
@@ -111,12 +109,12 @@ class MyProfileBloc extends Bloc<MyProfileEvent, MyProfileState> {
|
||||
text: data['userDetails']['blood_pressure_up']?.toString()),
|
||||
downPressureFormController: TextEditingController(
|
||||
text: data['userDetails']['blood_pressure_down']?.toString()),
|
||||
allergiesFormController:
|
||||
TextEditingController(text: data['userDetails']['allergies']),
|
||||
pillsFormController:
|
||||
TextEditingController(text: data['userDetails']['pills']),
|
||||
sportsFormController:
|
||||
TextEditingController(text: data['userDetails']['sports']),
|
||||
allergiesFormController: TextEditingController(
|
||||
text: data['userDetails']['about_alergy']),
|
||||
pillsFormController: TextEditingController(
|
||||
text: data['userDetails']['about_taking_pils']),
|
||||
sportsFormController: TextEditingController(
|
||||
text: data['userDetails']['about_sport_hobbies']),
|
||||
));
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -123,6 +123,8 @@ class MyProfileLoadedState extends MyProfileState {
|
||||
TextEditingController? pillsFormController,
|
||||
TextEditingController? sportsFormController,
|
||||
String? token,
|
||||
TextEditingController? downPressureFormController,
|
||||
TextEditingController? upPressureFormController,
|
||||
}) {
|
||||
return MyProfileLoadedState(
|
||||
myProfileModelObj: myProfileModelObj ?? this.myProfileModelObj,
|
||||
|
||||
Reference in New Issue
Block a user