forked from eatvio/eatvio_app
refactor(all): refactor
This commit is contained in:
@@ -15,12 +15,13 @@ class GenderScreen extends StatefulWidget {
|
||||
|
||||
static Widget builder(BuildContext context, sheet) {
|
||||
return BlocProvider<GenderBloc>(
|
||||
create: (context) => GenderBloc(
|
||||
GenderState(
|
||||
genderModelObj: GenderModel(userRegistrationSheet: sheet),
|
||||
),
|
||||
)..add(GenderInitialEvent()),
|
||||
child: GenderScreen(),);
|
||||
create: (context) => GenderBloc(
|
||||
GenderState(
|
||||
genderModelObj: GenderModel(userRegistrationSheet: sheet),
|
||||
),
|
||||
)..add(GenderInitialEvent()),
|
||||
child: GenderScreen(),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -31,25 +32,33 @@ class _GenderScreenState extends State<GenderScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
mediaQueryData = MediaQuery.of(context);
|
||||
return BlocBuilder<GenderBloc, GenderState>(builder: (context, state) {
|
||||
return Scaffold(
|
||||
return BlocBuilder<GenderBloc, GenderState>(
|
||||
builder: (context, state) {
|
||||
return Scaffold(
|
||||
appBar: _buildAppBar(context),
|
||||
body: Container(
|
||||
width: double.maxFinite,
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.h, vertical: 9.v),
|
||||
child: Column(children: [
|
||||
width: double.maxFinite,
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.h, vertical: 9.v),
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 7.v),
|
||||
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),),),),
|
||||
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: (3 / 15).toDouble(),
|
||||
backgroundColor: theme.colorScheme.onPrimary,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(appTheme.blueA400),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 36.v),
|
||||
Text("your_gender".tr, style: theme.textTheme.headlineSmall),
|
||||
RadioListTile(
|
||||
@@ -75,15 +84,22 @@ class _GenderScreenState extends State<GenderScreen> {
|
||||
),
|
||||
),
|
||||
Spacer(flex: 66),
|
||||
BlocBuilder<GenderBloc, GenderState>(builder: (context, state) {
|
||||
return NextStepButton(
|
||||
BlocBuilder<GenderBloc, GenderState>(
|
||||
builder: (context, state) {
|
||||
return NextStepButton(
|
||||
text: "continue".tr.toUpperCase(),
|
||||
margin: EdgeInsets.only(left: 16.h, right: 16.h, bottom: 50.v),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
onPressed: onTapNext(state, context),);
|
||||
},),
|
||||
],),),);
|
||||
},);
|
||||
onPressed: onTapNext(state, context),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
onTapNext(GenderState state, BuildContext context) {
|
||||
|
||||
Reference in New Issue
Block a user