fix verfiy account

merge-requests/104/head
Elham Rababah 6 years ago
parent 610ae3c1fb
commit 57cba4e786

@ -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/config/size_config.dart';
import 'package:doctor_app_flutter/providers/auth_provider.dart'; import 'package:doctor_app_flutter/providers/auth_provider.dart';
import 'package:doctor_app_flutter/providers/patients_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:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -34,6 +35,8 @@ class _ShowTimerTextState extends State<ShowTimerText> {
setState(() { setState(() {
sec = sec - 1; sec = sec - 1;
if (sec == 0 && min == 0) { if (sec == 0 && min == 0) {
Navigator.of(context).pushNamed(LOGIN);
min = 0; min = 0;
sec = 0; sec = 0;
} else if (sec == 0) { } else if (sec == 0) {
@ -72,11 +75,10 @@ class _ShowTimerTextState extends State<ShowTimerText> {
resendActivatioinCode(); resendActivatioinCode();
}, },
child: Text( child: Text(
min == 0 && sec == 0 ? 'Resend Login Code' : timerText, timerText,
style: TextStyle( style: TextStyle(
fontSize: 3.0 * SizeConfig.textMultiplier, fontSize: 3.0 * SizeConfig.textMultiplier,
color: color: Hexcolor('#B8382C'),
min == 0 && sec == 0 ? Colors.blue : Hexcolor('#B8382C'),
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
), ),

@ -100,6 +100,7 @@ class _VerifyAccountState extends State<VerifyAccount> {
child: TextFormField( child: TextFormField(
textInputAction: TextInputAction.next, textInputAction: TextInputAction.next,
style: buildTextStyle(), style: buildTextStyle(),
autofocus: true,
maxLength: 1, maxLength: 1,
textAlign: TextAlign.center, textAlign: TextAlign.center,
keyboardType: TextInputType.number, keyboardType: TextInputType.number,

Loading…
Cancel
Save