forked from eatvio/eatvio_app
Progress bar fix, placeholder fix
This commit is contained in:
@@ -7,6 +7,8 @@ import 'package:eatvio_app/widgets/app_bar/custom_app_bar.dart';
|
||||
import 'package:eatvio_app/widgets/custom_outlined_button.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
enum Gender { male, female }
|
||||
|
||||
class GenderScreen extends StatefulWidget {
|
||||
const GenderScreen({Key? key}) : super(key: key);
|
||||
|
||||
@@ -23,6 +25,7 @@ class GenderScreen extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _GenderScreenState extends State<GenderScreen> {
|
||||
Gender? _gender;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
mediaQueryData = MediaQuery.of(context);
|
||||
@@ -36,14 +39,58 @@ class _GenderScreenState extends State<GenderScreen> {
|
||||
EdgeInsets.symmetric(horizontal: 16.h, vertical: 9.v),
|
||||
child: Column(children: [
|
||||
SizedBox(height: 7.v),
|
||||
_buildProgressIndicator(context),
|
||||
Container(
|
||||
height: 16.v,
|
||||
width: 343.h,
|
||||
decoration: BoxDecoration(
|
||||
color: theme.colorScheme.onPrimary,
|
||||
borderRadius: BorderRadius.circular(8.h),
|
||||
border: Border.all(
|
||||
color: theme.colorScheme.primary, width: 1.h)),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.h),
|
||||
child: LinearProgressIndicator(
|
||||
value: 0.16,
|
||||
backgroundColor: theme.colorScheme.onPrimary,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
appTheme.blueA400)))),
|
||||
SizedBox(height: 36.v),
|
||||
Text("your_gender".tr,
|
||||
style: theme.textTheme.headlineSmall),
|
||||
Spacer(flex: 33),
|
||||
Text(""),
|
||||
SizedBox(height: 20.v),
|
||||
Text(""),
|
||||
RadioListTile(
|
||||
title: Text('Мужской'),
|
||||
value: Gender.male,
|
||||
groupValue: _gender,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_gender = value as Gender?;
|
||||
});
|
||||
},
|
||||
secondary: Image.asset(
|
||||
_gender == Gender.male
|
||||
? 'assets/images/img_male.png'
|
||||
: 'assets/images/img_male.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
),
|
||||
),
|
||||
RadioListTile(
|
||||
title: Text('Женский'),
|
||||
value: Gender.female,
|
||||
groupValue: _gender,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_gender = value as Gender?;
|
||||
});
|
||||
},
|
||||
secondary: Image.asset(
|
||||
_gender == Gender.female
|
||||
? 'assets/images/img_female.png'
|
||||
: 'assets/images/img_female.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
),
|
||||
),
|
||||
Spacer(flex: 66),
|
||||
CustomOutlinedButton(
|
||||
text: "continue".tr.toUpperCase(),
|
||||
|
||||
Reference in New Issue
Block a user