forked from eatvio/eatvio_app
feat(settings): add weight
This commit is contained in:
@@ -25,6 +25,7 @@ class _PhysicalFormScreenState extends State<PhysicalFormScreen> {
|
||||
final waistCircumferenceController = TextEditingController();
|
||||
final hipCircumferenceController = TextEditingController();
|
||||
final heightController = TextEditingController();
|
||||
final weightController = TextEditingController();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -33,6 +34,7 @@ class _PhysicalFormScreenState extends State<PhysicalFormScreen> {
|
||||
waistCircumferenceController.text = widget.settingsEntity.profileDetailsModel.waistCircumference.toString();
|
||||
hipCircumferenceController.text = widget.settingsEntity.profileDetailsModel.hipCircumference.toString();
|
||||
heightController.text = widget.settingsEntity.profileDetailsModel.height.toString();
|
||||
weightController.text = widget.settingsEntity.profileDetailsModel.weight.toString();
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -83,6 +85,15 @@ class _PhysicalFormScreenState extends State<PhysicalFormScreen> {
|
||||
hintText: 'см',
|
||||
textInputAction: TextInputAction.done,
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
Text('Вес'),
|
||||
SizedBox(height: 4),
|
||||
CustomTextFormField(
|
||||
inputFormatters: [digitsOnly],
|
||||
controller: weightController,
|
||||
hintText: 'кг',
|
||||
textInputAction: TextInputAction.done,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -98,6 +109,7 @@ class _PhysicalFormScreenState extends State<PhysicalFormScreen> {
|
||||
waistCircumference: int.parse(waistCircumferenceController.text),
|
||||
hipCircumference: int.parse(hipCircumferenceController.text),
|
||||
height: int.parse(heightController.text),
|
||||
weight: double.parse(weightController.text),
|
||||
),
|
||||
);
|
||||
GoRouter.of(context).pop();
|
||||
|
||||
Reference in New Issue
Block a user