Files
eatvio_app/lib/features/settings/presentation/pages/general_info_screen.dart

84 lines
2.4 KiB
Dart

import 'package:eatvio_app/generated/l10n.dart';
import 'package:eatvio_app/theme/theme_helper.dart';
import 'package:eatvio_app/widgets/custom_edit_text_form_field.dart';
import 'package:flutter/material.dart';
class GeneralInfoScreen extends StatefulWidget {
const GeneralInfoScreen({super.key});
@override
State<GeneralInfoScreen> createState() => _GeneralInfoScreenState();
}
class _GeneralInfoScreenState extends State<GeneralInfoScreen> {
final firstNameController = TextEditingController();
final lastNameController = 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.first_name),
SizedBox(height: 4),
CustomTextFormField(
controller: firstNameController,
textInputAction: TextInputAction.next,
hintText: 'Введите имя',
onChanged: (newValue) {},
),
SizedBox(height: 16),
Text(s.last_name),
SizedBox(height: 4),
CustomTextFormField(
controller: lastNameController,
textInputAction: TextInputAction.done,
hintText: 'Введите фамилию',
onChanged: (newValue) {},
),
],
),
),
);
}
_saveButton() {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 4),
child: InkWell(
onTap: () {},
borderRadius: BorderRadius.circular(12),
child: Ink(
height: 52,
width: MediaQuery.of(context).size.width - 16,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: appTheme.blueA400,
),
child: Center(
child: Text(
'Сохранить',
style: TextStyle(
color: Colors.white,
height: 1,
fontWeight: FontWeight.w600,
fontSize: 18,
),
),
),
),
),
);
}
}