Created
July 24, 2019 18:58
-
-
Save VB10/db84173123248cfd7e4ef2f22bc9136a to your computer and use it in GitHub Desktop.
Heltho UI Verify View dart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bool _isVerifyComplete = false; | |
| @override | |
| void initState() { | |
| super.initState(); | |
| Future.delayed(Duration(milliseconds: UIHelper.Space500.toInt())).then((val) { | |
| setState(() { | |
| _isVerifyComplete = true; | |
| }); | |
| }).whenComplete(() { | |
| // When complete | |
| Future.delayed(Duration(milliseconds: UIHelper.Space300.toInt()), () { | |
| Navigator.of(context).pushNamed("/verifyPhone"); | |
| }); | |
| }); | |
| } | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| body: Padding( | |
| padding: EdgeInsets.symmetric(horizontal: UIHelper.Space20), | |
| child: Center( | |
| child: _isVerifyComplete ? _succesVerify : _verifyViewColumn), | |
| ), | |
| ); | |
| } | |
| Widget get _verifyViewColumn => Column( | |
| mainAxisAlignment: MainAxisAlignment.center, | |
| crossAxisAlignment: CrossAxisAlignment.center, | |
| children: <Widget>[ | |
| CircularProgressIndicator( | |
| valueColor: AlwaysStoppedAnimation<Color>(Colors.yellow), | |
| ), | |
| UIHelper.verticalSpace, | |
| Text("Verifying Your Mobile Number") | |
| ], | |
| ); | |
| Widget get _succesVerify => Column( | |
| mainAxisAlignment: MainAxisAlignment.start, | |
| crossAxisAlignment: CrossAxisAlignment.center, | |
| children: <Widget>[ | |
| Spacer( | |
| flex: 2, | |
| ), | |
| Expanded( | |
| flex: 6, | |
| child: Column( | |
| children: <Widget>[ | |
| Icon( | |
| FontAwesomeIcons.checkCircle, | |
| color: Colors.green, | |
| size: UIHelper.dynamicHeight(UIHelper.Space200), | |
| ), | |
| UIHelper.verticalSpace, | |
| Text( | |
| "Verification Code Send on your Registered Mobile Number ", | |
| textAlign: TextAlign.center, | |
| style: phoneTitleTextStyle, | |
| ), | |
| ], | |
| ), | |
| ), | |
| Spacer( | |
| flex: 2, | |
| ), | |
| ], | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment