forked from eatvio/eatvio_app
refactor(registration) Fixing issues in registration after refactoring Run Code Metrics
This commit is contained in:
@@ -11,10 +11,10 @@ import 'package:flutter/material.dart';
|
||||
|
||||
class NameScreen extends StatelessWidget {
|
||||
const NameScreen({Key? key}) : super(key: key);
|
||||
|
||||
static Widget builder(BuildContext context) {
|
||||
final sheet =
|
||||
ModalRoute.of(context)!.settings.arguments as UserRegistrationSheet;
|
||||
|
||||
return BlocProvider<NameBloc>(
|
||||
create: (context) => NameBloc(
|
||||
NameState(
|
||||
@@ -77,11 +77,13 @@ class NameScreen extends StatelessWidget {
|
||||
SizedBox(height: 21.v),
|
||||
BlocBuilder<NameBloc, NameState>(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(context, state));
|
||||
text: "continue".tr.toUpperCase(),
|
||||
margin: EdgeInsets.only(
|
||||
left: 16.h, right: 16.h, bottom: 50.v),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
onPressed: () => _onTapNext(
|
||||
context, state), // Assign callback function here
|
||||
);
|
||||
}),
|
||||
]))));
|
||||
}
|
||||
@@ -93,7 +95,7 @@ class NameScreen extends StatelessWidget {
|
||||
leading: AppbarLeadingImage(
|
||||
imagePath: ImageConstant.imgArrowLeft,
|
||||
margin: EdgeInsets.only(left: 16.h, top: 15.v, bottom: 15.v),
|
||||
onTap: onTapArrowLeft(context)),
|
||||
onTap: () => onTapArrowLeft(context)),
|
||||
centerTitle: true,
|
||||
title: AppbarTitleImage(imagePath: ImageConstant.imgLogoEatvio));
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ class _WeightScreenState extends State<WeightScreen> {
|
||||
leading: AppbarLeadingImage(
|
||||
imagePath: ImageConstant.imgArrowLeft,
|
||||
margin: EdgeInsets.only(left: 16.h, top: 15.v, bottom: 15.v),
|
||||
onTap: onTapArrowLeft(context)),
|
||||
onTap: () => onTapArrowLeft(context)),
|
||||
centerTitle: true,
|
||||
title: AppbarTitleImage(imagePath: ImageConstant.imgLogoEatvio));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user