forked from eatvio/eatvio_app
126 lines
3.9 KiB
Dart
126 lines
3.9 KiB
Dart
import 'package:eatvio_app/core/utils/image_constant.dart';
|
||
import 'package:eatvio_app/generated/l10n.dart';
|
||
import 'package:eatvio_app/theme/theme_helper.dart';
|
||
import 'package:eatvio_app/widgets/custom_drop_down.dart';
|
||
import 'package:eatvio_app/widgets/custom_image_view.dart';
|
||
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
|
||
import 'package:flutter/material.dart';
|
||
import 'package:flutter/services.dart';
|
||
import 'package:go_router/go_router.dart';
|
||
|
||
class PressureScreen extends StatefulWidget {
|
||
const PressureScreen({super.key});
|
||
|
||
@override
|
||
State<PressureScreen> createState() => _PressureScreenState();
|
||
}
|
||
|
||
class _PressureScreenState extends State<PressureScreen> {
|
||
final digitsOnly = FilteringTextInputFormatter.digitsOnly;
|
||
final chestCircumferenceController = TextEditingController();
|
||
final waistCircumferenceController = TextEditingController();
|
||
final hipCircumferenceController = TextEditingController();
|
||
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
final s = S.of(context);
|
||
|
||
return Scaffold(
|
||
appBar: AppBar(
|
||
title: Text('Физическая форма'),
|
||
),
|
||
bottomSheet: _saveButton(),
|
||
body: SingleChildScrollView(
|
||
physics: const BouncingScrollPhysics(),
|
||
padding: EdgeInsets.symmetric(vertical: 16, horizontal: 8),
|
||
child: Column(
|
||
crossAxisAlignment: CrossAxisAlignment.start,
|
||
children: [
|
||
Text(s.up_pressure),
|
||
SizedBox(height: 4),
|
||
CustomTextFormField(
|
||
inputFormatters: [digitsOnly],
|
||
hintText: "90",
|
||
onChanged: (newValue) {},
|
||
),
|
||
SizedBox(height: 16),
|
||
Text(s.down_pressure),
|
||
SizedBox(height: 4),
|
||
CustomTextFormField(
|
||
inputFormatters: [digitsOnly],
|
||
hintText: '90',
|
||
onChanged: (newValue) {},
|
||
),
|
||
SizedBox(height: 16),
|
||
Text(s.do_you_have_hypotension_tendency),
|
||
SizedBox(height: 4),
|
||
CustomDropDown(
|
||
icon: Container(
|
||
margin: EdgeInsets.all(16),
|
||
decoration: BoxDecoration(
|
||
borderRadius: BorderRadius.circular(4),
|
||
),
|
||
child: CustomImageView(
|
||
imagePath: ImageConstant.imgFavorite,
|
||
height: 16,
|
||
width: 16,
|
||
),
|
||
),
|
||
hintText: "Не выбрано",
|
||
onChanged: (newPopup) {
|
||
setState(() {});
|
||
},
|
||
),
|
||
SizedBox(height: 16),
|
||
Text(s.do_you_have_hypertension_tendency),
|
||
SizedBox(height: 4),
|
||
CustomDropDown(
|
||
icon: Container(
|
||
margin: EdgeInsets.all(16),
|
||
decoration: BoxDecoration(
|
||
borderRadius: BorderRadius.circular(4),
|
||
),
|
||
child: CustomImageView(
|
||
imagePath: ImageConstant.imgFavorite,
|
||
height: 16,
|
||
width: 16,
|
||
),
|
||
),
|
||
hintText: "Не выбрано",
|
||
onChanged: (newPopup) {
|
||
setState(() {});
|
||
},
|
||
),
|
||
],
|
||
),
|
||
),
|
||
);
|
||
}
|
||
|
||
_saveButton() {
|
||
return InkWell(
|
||
onTap: () => GoRouter.of(context).pop(),
|
||
borderRadius: BorderRadius.circular(20),
|
||
child: Ink(
|
||
height: 52,
|
||
width: MediaQuery.of(context).size.width - 16,
|
||
decoration: BoxDecoration(
|
||
borderRadius: BorderRadius.circular(20),
|
||
color: appTheme.blueA400,
|
||
),
|
||
child: Center(
|
||
child: Text(
|
||
'Сохранить',
|
||
style: TextStyle(
|
||
color: Colors.white,
|
||
height: 1,
|
||
fontWeight: FontWeight.w600,
|
||
fontSize: 18,
|
||
),
|
||
),
|
||
),
|
||
),
|
||
);
|
||
}
|
||
}
|