refactor(registration) Fixing issues in registration after refactoring Run Code Metrics

This commit is contained in:
2024-03-14 15:46:08 +03:00
parent b616ee898e
commit 52c62988e6
2 changed files with 10 additions and 8 deletions

View File

@@ -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));
}

View File

@@ -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));
}