fix scrolling in verification

merge-requests/709/head
Elham Rababah 3 years ago
parent 2b8caab71d
commit 362d9425cd

@ -71,7 +71,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
// mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: 40, height: SizeConfig.heightMultiplier * 3,
), ),
if(authenticationViewModel.isFromLogin) if(authenticationViewModel.isFromLogin)
InkWell( InkWell(
@ -85,7 +85,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
Column( Column(
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: 20, height: SizeConfig.heightMultiplier*4,
), ),
authenticationViewModel.user != null && isMoreOption == false authenticationViewModel.user != null && isMoreOption == false
? Column( ? Column(
@ -96,27 +96,27 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
AppText( AppText(
TranslationBase.of(context).welcomeBack, TranslationBase.of(context).welcomeBack,
fontSize:12, fontSize:SizeConfig.getTextMultiplierBasedOnWidth()*4,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
), ),
AppText( AppText(
Helpers.capitalize(authenticationViewModel.user.doctorName), Helpers.capitalize(authenticationViewModel.user.doctorName),
fontSize: 24, fontSize: SizeConfig.getTextMultiplierBasedOnWidth()*6,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
SizedBox( SizedBox(
height: 20, height: SizeConfig.heightMultiplier*4,
), ),
AppText( AppText(
TranslationBase.of(context).accountInfo , TranslationBase.of(context).accountInfo ,
fontSize: 16, fontSize: SizeConfig.getTextMultiplierBasedOnWidth()*5,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
SizedBox( SizedBox(
height: 20, height: SizeConfig.heightMultiplier*4
), ),
Container( Container(
padding: EdgeInsets.all(15), padding: EdgeInsets.all(15),
@ -142,7 +142,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
TextOverflow.ellipsis, TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 16, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *4.5,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,), fontWeight: FontWeight.w700,),
@ -153,7 +153,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
TranslationBase TranslationBase
.of(context) .of(context)
.verifyWith, .verifyWith,
fontSize: 14, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *4.5,
color: Color(0xFF575757), color: Color(0xFF575757),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
@ -162,7 +162,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
authenticationViewModel.user authenticationViewModel.user
.logInTypeID, .logInTypeID,
context), context),
fontSize: 14, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *4.5,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
@ -187,7 +187,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
: '--', : '--',
textAlign: textAlign:
TextAlign.right, TextAlign.right,
fontSize: 13, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *4.5,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
@ -206,7 +206,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
: '--', : '--',
textAlign: textAlign:
TextAlign.right, TextAlign.right,
fontSize: 14, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *4.5,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Color(0xFF575757), color: Color(0xFF575757),
) )
@ -218,19 +218,25 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
), ),
), ),
SizedBox( SizedBox(
height: 20, height: SizeConfig.heightMultiplier*3,
), ),
Row( Row(
children: [ children: [
//todo add translation
AppText( AppText(
"Please Verify", "Please Verify",
fontSize: 16, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 5,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
], ],
) ),
SizedBox(
height: SizeConfig.heightMultiplier*2,
),
], ],
) )
: Column( : Column(
@ -244,7 +250,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
child: AppText( child: AppText(
TranslationBase.of(context) TranslationBase.of(context)
.verifyLoginWith , .verifyLoginWith ,
fontSize: 18, fontSize: SizeConfig.getTextMultiplierBasedOnWidth()* 4 ,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
textAlign: TextAlign.left, textAlign: TextAlign.left,
@ -254,7 +260,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
TranslationBase.of(context) TranslationBase.of(context)
.verifyFingerprint2, .verifyFingerprint2,
fontSize: fontSize:
SizeConfig.textMultiplier * 2.5, SizeConfig.getTextMultiplierBasedOnWidth()* 4,
textAlign: TextAlign.start, textAlign: TextAlign.start,
), ),
]), ]),
@ -383,34 +389,32 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
), ),
), ),
bottomSheet: authenticationViewModel.user == null ? SizedBox(height: 0,) : Container( bottomSheet: authenticationViewModel.user == null ? SizedBox(height: 0,) : Container(
height: 90, // color: Colors.green,
height: SizeConfig.heightMultiplier * 10 ,
width: double.infinity, width: double.infinity,
child: Center( child: Center(
child: FractionallySizedBox( child: FractionallySizedBox(
widthFactor: 0.9, widthFactor: 0.9,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
SecondaryButton( AppButton(
label: TranslationBase title: TranslationBase
.of(context) .of(context)
.useAnotherAccount, .useAnotherAccount,
color: Color(0xFFD02127), color: Color(0xFFD02127),
//fontWeight: FontWeight.w700,
onTap: () { fontWeight: FontWeight.w700,
height: SizeConfig.heightMultiplier * (SizeConfig.isHeightShort? 8 : 6),
hPadding: 1,
onPressed: () {
authenticationViewModel.deleteUser(); authenticationViewModel.deleteUser();
authenticationViewModel.setAppStatus(APP_STATUS.UNAUTHENTICATED); authenticationViewModel.setAppStatus(APP_STATUS.UNAUTHENTICATED);
// Navigator.pushAndRemoveUntil(
// AppGlobal.CONTEX,
// FadePage(
// page: RootPage(),
// ),
// (r) => false);
// Navigator.of(context).pushNamed(LOGIN);
}, },
), ),
SizedBox(height: 25,) // SizedBox(height: SizeConfig.heightMultiplier * (SizeConfig.isHeightShort? 1 : 3),)
], ],
), ),
), ),

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
@ -29,19 +30,18 @@ class MethodTypeCard extends StatelessWidget {
color: HexColor('#707070'), color: HexColor('#707070'),
width: 0.1), width: 0.1),
), ),
height: 170, height: SizeConfig.heightMultiplier * (SizeConfig.isHeightShort? 22 : 15),
child: Padding( child: Center(
padding: EdgeInsets.fromLTRB(10, 15, 10, 15),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Row( Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Image.asset( Image.asset(
assetPath, assetPath,
height: 60, width: SizeConfig.widthMultiplier* 12,
width: 60,
), ),
], ],
), ),
@ -50,7 +50,7 @@ class MethodTypeCard extends StatelessWidget {
), ),
AppText( AppText(
label, label,
fontSize: 12, fontSize: SizeConfig.getTextMultiplierBasedOnWidth()* 2.5,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
) )

@ -89,7 +89,7 @@ class _VerificationMethodsListState extends State<VerificationMethodsList> {
assetPath: 'assets/images/login/more_icon.png', assetPath: 'assets/images/login/more_icon.png',
onTap: widget.onShowMore, onTap: widget.onShowMore,
label: TranslationBase.of(context).moreVerification, label: TranslationBase.of(context).moreVerification,
height: 0, height: 40,
); );
} }
} }

@ -22,6 +22,7 @@ class AppButton extends StatefulWidget {
final double radius; final double radius;
final double vPadding; final double vPadding;
final double hPadding; final double hPadding;
final double height;
AppButton({ AppButton({
@required this.onPressed, @required this.onPressed,
@ -39,7 +40,7 @@ class AppButton extends StatefulWidget {
this.hPadding = 0, this.hPadding = 0,
this.radius = 8.0, this.radius = 8.0,
this.hasBorder = false, this.hasBorder = false,
this.borderColor, this.borderColor, this.height,
}); });
_AppButtonState createState() => _AppButtonState(); _AppButtonState createState() => _AppButtonState();
@ -49,7 +50,7 @@ class _AppButtonState extends State<AppButton> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
// height: MediaQuery.of(context).size.height * 0.075, height: widget.height,
child: IgnorePointer( child: IgnorePointer(
ignoring: widget.loading ||widget.disabled, ignoring: widget.loading ||widget.disabled,
child: RawMaterialButton( child: RawMaterialButton(

Loading…
Cancel
Save