forked from eatvio/eatvio_app
127 lines
4.1 KiB
Dart
127 lines
4.1 KiB
Dart
import 'package:eatvio_app/features/profile/models/profile_model.dart';
|
||
import 'package:eatvio_app/generated/l10n.dart';
|
||
import 'package:eatvio_app/theme/theme_helper.dart';
|
||
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
|
||
import 'package:flutter/material.dart';
|
||
import 'package:go_router/go_router.dart';
|
||
|
||
class OtherInfoScreen extends StatefulWidget {
|
||
final ProfileDetailsModel profileDetailsModel;
|
||
|
||
const OtherInfoScreen({
|
||
super.key,
|
||
required this.profileDetailsModel,
|
||
});
|
||
|
||
@override
|
||
State<OtherInfoScreen> createState() => _OtherInfoScreenState();
|
||
}
|
||
|
||
class _OtherInfoScreenState extends State<OtherInfoScreen> {
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
final s = S.of(context);
|
||
|
||
return Scaffold(
|
||
appBar: AppBar(
|
||
title: Text('Прочая информаиця'),
|
||
),
|
||
bottomSheet: _saveButton(),
|
||
body: SingleChildScrollView(
|
||
padding: EdgeInsets.all(16) + EdgeInsets.only(bottom: 64),
|
||
child: Column(
|
||
crossAxisAlignment: CrossAxisAlignment.start,
|
||
children: [
|
||
Text(s.allergies_presence),
|
||
SizedBox(height: 4),
|
||
CustomTextFormField(
|
||
hintText: 'Например: орехи, мёд и т.д.',
|
||
autofocus: true,
|
||
minLines: 2,
|
||
maxLines: 8,
|
||
onChanged: (newValue) {},
|
||
),
|
||
SizedBox(height: 16),
|
||
Text(s.do_you_take_pills),
|
||
SizedBox(height: 4),
|
||
CustomTextFormField(
|
||
hintText: s.enter_information,
|
||
autofocus: true,
|
||
minLines: 2,
|
||
maxLines: 8,
|
||
onChanged: (newValue) {},
|
||
),
|
||
SizedBox(height: 16),
|
||
Text(s.your_favorite_sports),
|
||
SizedBox(height: 4),
|
||
CustomTextFormField(
|
||
hintText:
|
||
"Я занимаюсь плаванием , почти каждый вечер прогулки на свежем воздухе, пару раз в месяц играю в волейбол. Стараюсь не сидеть на месте!",
|
||
autofocus: true,
|
||
maxLines: 8,
|
||
onChanged: (newValue) {},
|
||
),
|
||
SizedBox(height: 16),
|
||
Text(s.favorite_foods),
|
||
SizedBox(height: 4),
|
||
CustomTextFormField(
|
||
hintText: s.enter_information,
|
||
maxLines: 7,
|
||
minLines: 2,
|
||
onChanged: (newValue) {},
|
||
),
|
||
SizedBox(height: 16),
|
||
Text(s.unfavorite_foods),
|
||
SizedBox(height: 4),
|
||
CustomTextFormField(
|
||
hintText: s.enter_information,
|
||
maxLines: 7,
|
||
minLines: 2,
|
||
onChanged: (newValue) {},
|
||
),
|
||
SizedBox(height: 16),
|
||
Text(
|
||
'Дополнительная информация',
|
||
maxLines: 2,
|
||
overflow: TextOverflow.ellipsis,
|
||
textAlign: TextAlign.start,
|
||
),
|
||
SizedBox(height: 4),
|
||
CustomTextFormField(
|
||
hintText: "У меня крепкое здоровье, но последнее время часто утомляюсь, однако, это мне не мешает радоваться жизни",
|
||
maxLines: 8,
|
||
onChanged: (newValue) {},
|
||
),
|
||
],
|
||
),
|
||
),
|
||
);
|
||
}
|
||
|
||
_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,
|
||
),
|
||
),
|
||
),
|
||
),
|
||
);
|
||
}
|
||
}
|