From 57cba4e78686b685e222a8c79f1cbaa677519a66 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Tue, 9 Jun 2020 11:27:57 +0300 Subject: [PATCH] fix verfiy account --- lib/widgets/auth/show_timer_text.dart | 8 +++++--- lib/widgets/auth/verfiy_account.dart | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/widgets/auth/show_timer_text.dart b/lib/widgets/auth/show_timer_text.dart index 3ee67312..1b77fd9a 100644 --- a/lib/widgets/auth/show_timer_text.dart +++ b/lib/widgets/auth/show_timer_text.dart @@ -4,6 +4,7 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/providers/auth_provider.dart'; import 'package:doctor_app_flutter/providers/patients_provider.dart'; +import 'package:doctor_app_flutter/routes.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; @@ -34,6 +35,8 @@ class _ShowTimerTextState extends State { setState(() { sec = sec - 1; if (sec == 0 && min == 0) { + Navigator.of(context).pushNamed(LOGIN); + min = 0; sec = 0; } else if (sec == 0) { @@ -72,11 +75,10 @@ class _ShowTimerTextState extends State { resendActivatioinCode(); }, child: Text( - min == 0 && sec == 0 ? 'Resend Login Code' : timerText, + timerText, style: TextStyle( fontSize: 3.0 * SizeConfig.textMultiplier, - color: - min == 0 && sec == 0 ? Colors.blue : Hexcolor('#B8382C'), + color: Hexcolor('#B8382C'), fontWeight: FontWeight.bold), ), ), diff --git a/lib/widgets/auth/verfiy_account.dart b/lib/widgets/auth/verfiy_account.dart index 9a4ad85c..feae82ce 100644 --- a/lib/widgets/auth/verfiy_account.dart +++ b/lib/widgets/auth/verfiy_account.dart @@ -100,6 +100,7 @@ class _VerifyAccountState extends State { child: TextFormField( textInputAction: TextInputAction.next, style: buildTextStyle(), + autofocus: true, maxLength: 1, textAlign: TextAlign.center, keyboardType: TextInputType.number,