DA-115:add Authentication Type to verfiy account screen

merge-requests/111/head
Elham Rababah 6 years ago
parent 395a7947c3
commit 3d8f8680b3

@ -191,20 +191,13 @@ class _VerifyAccountState extends State<VerifyAccount> {
validator: validateCodeDigit)) validator: validateCodeDigit))
], ],
), ),
// buildSizedBox(40),
buildSizedBox(20), buildSizedBox(20),
buildText(), buildText(),
// buildSizedBox(10.0),
// Text()
buildSizedBox(40), buildSizedBox(40),
// buildSizedBox(),
RaisedButton( RaisedButton(
onPressed: () { onPressed: () {
verifyAccount( verifyAccount(
authProv, widget.changeLoadingStata); authProv, widget.changeLoadingStata);
// Navigator.of(context).pushNamed(HOME);
}, },
elevation: 0.0, elevation: 0.0,
child: Container( child: Container(
@ -293,6 +286,16 @@ class _VerifyAccountState extends State<VerifyAccount> {
*@desc: buildText *@desc: buildText
*/ */
RichText buildText() { RichText buildText() {
String medthodName;
switch (model['OTP_SendType']) {
case 1:
medthodName = 'SMS';
break;
case 2:
medthodName = 'WhatsApp';
break;
default:
}
var text = RichText( var text = RichText(
text: new TextSpan( text: new TextSpan(
style: new TextStyle( style: new TextStyle(
@ -302,7 +305,7 @@ class _VerifyAccountState extends State<VerifyAccount> {
new TextSpan( new TextSpan(
text: 'Login Code ', text: 'Login Code ',
style: TextStyle(fontWeight: FontWeight.w700)), style: TextStyle(fontWeight: FontWeight.w700)),
new TextSpan(text: 'By SMS, Please enter the code') new TextSpan(text: 'By ${medthodName}, Please enter the code')
])); ]));
return text; return text;
} }

Loading…
Cancel
Save