From 3d8f8680b32aed28d92a3ca54daa3bc2178e592a Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Thu, 11 Jun 2020 12:27:55 +0300 Subject: [PATCH] DA-115:add Authentication Type to verfiy account screen --- lib/widgets/auth/verfiy_account.dart | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/widgets/auth/verfiy_account.dart b/lib/widgets/auth/verfiy_account.dart index 0448c838..611bd315 100644 --- a/lib/widgets/auth/verfiy_account.dart +++ b/lib/widgets/auth/verfiy_account.dart @@ -191,20 +191,13 @@ class _VerifyAccountState extends State { validator: validateCodeDigit)) ], ), - // buildSizedBox(40), buildSizedBox(20), buildText(), - // buildSizedBox(10.0), - // Text() - buildSizedBox(40), - - // buildSizedBox(), RaisedButton( onPressed: () { verifyAccount( authProv, widget.changeLoadingStata); - // Navigator.of(context).pushNamed(HOME); }, elevation: 0.0, child: Container( @@ -293,6 +286,16 @@ class _VerifyAccountState extends State { *@desc: buildText */ RichText buildText() { + String medthodName; + switch (model['OTP_SendType']) { + case 1: + medthodName = 'SMS'; + break; + case 2: + medthodName = 'WhatsApp'; + break; + default: + } var text = RichText( text: new TextSpan( style: new TextStyle( @@ -302,7 +305,7 @@ class _VerifyAccountState extends State { new TextSpan( text: 'Login Code ', 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; }