|
|
|
|
@ -47,6 +47,7 @@ class SMSOTP {
|
|
|
|
|
bool isClosed = false;
|
|
|
|
|
displayDialog(BuildContext context) async {
|
|
|
|
|
double dialogWidth = MediaQuery.of(context).size.width * 0.90;
|
|
|
|
|
double dialogInputWidth = (dialogWidth / 4) - (SizeConfig.isWidthLarge?SizeConfig.getWidthMultiplier(width:dialogWidth )* 4.5: 20);
|
|
|
|
|
double dialogHeight = SizeConfig.isHeightVeryShort ?MediaQuery.of(context).size.height * 0.50:MediaQuery.of(context).size.height * 0.40;
|
|
|
|
|
return showDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
@ -56,6 +57,7 @@ class SMSOTP {
|
|
|
|
|
width: dialogWidth,
|
|
|
|
|
child: Material(
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: StatefulBuilder(builder: (context, setState) {
|
|
|
|
|
@ -79,14 +81,14 @@ class SMSOTP {
|
|
|
|
|
type == AuthMethodTypes.SMS
|
|
|
|
|
? DoctorApp.verify_sms_1
|
|
|
|
|
: DoctorApp.verify_whtsapp,
|
|
|
|
|
size: dialogWidth * 0.13,
|
|
|
|
|
size: SizeConfig.getHeightMultiplier(height:dialogHeight) * 9,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
IconButton(
|
|
|
|
|
icon: Icon(Icons.close),
|
|
|
|
|
iconSize: dialogWidth * 0.13,
|
|
|
|
|
iconSize: SizeConfig.getHeightMultiplier(height:dialogHeight) * 15,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
this.isClosed = true;
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
@ -96,7 +98,7 @@ class SMSOTP {
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
]),
|
|
|
|
|
SizedBox(height: SizeConfig.getHeightMultiplier(height:dialogHeight) * 10,),
|
|
|
|
|
SizedBox(height: SizeConfig.getHeightMultiplier(height:dialogHeight) * (SizeConfig.isHeightVeryShort?10:5),),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.only(top: 5, right: 5),
|
|
|
|
|
child: AppText(
|
|
|
|
|
@ -120,7 +122,7 @@ class SMSOTP {
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
width: (dialogWidth / 4) - 20,
|
|
|
|
|
width: dialogInputWidth,
|
|
|
|
|
height: SizeConfig.getHeightMultiplier(height:dialogHeight) * 30,
|
|
|
|
|
margin: EdgeInsets.symmetric(vertical: 2,horizontal: 5),
|
|
|
|
|
child: TextFormField(
|
|
|
|
|
@ -152,7 +154,7 @@ class SMSOTP {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: dialogWidth / 4 - 20,
|
|
|
|
|
width: dialogInputWidth,
|
|
|
|
|
height: SizeConfig.getHeightMultiplier(height:dialogHeight) * 30,
|
|
|
|
|
|
|
|
|
|
margin: EdgeInsets.symmetric(vertical: 2,horizontal: 5),
|
|
|
|
|
@ -186,7 +188,7 @@ class SMSOTP {
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.symmetric(vertical: 2,horizontal: 5),
|
|
|
|
|
width: dialogWidth / 4 - 20,
|
|
|
|
|
width: dialogInputWidth,
|
|
|
|
|
height: SizeConfig.getHeightMultiplier(height:dialogHeight) * 30,
|
|
|
|
|
child: TextFormField(
|
|
|
|
|
focusNode: focusD3,
|
|
|
|
|
@ -217,7 +219,7 @@ class SMSOTP {
|
|
|
|
|
validator: validateCodeDigit)),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.symmetric(vertical: 2,horizontal: 5),
|
|
|
|
|
width: dialogWidth / 4 - 20,
|
|
|
|
|
width: dialogInputWidth,
|
|
|
|
|
height: SizeConfig.getHeightMultiplier(height:dialogHeight) * 30,
|
|
|
|
|
|
|
|
|
|
child: TextFormField(
|
|
|
|
|
@ -261,7 +263,7 @@ class SMSOTP {
|
|
|
|
|
color: Colors.red,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontSize: SizeConfig.getTextMultiplierBasedOnWidth(width: dialogWidth) * 3.5,
|
|
|
|
|
)
|
|
|
|
|
])
|
|
|
|
|
],
|
|
|
|
|
@ -277,6 +279,7 @@ class SMSOTP {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|