|
|
|
|
@ -18,8 +18,6 @@ class SMSOTP {
|
|
|
|
|
|
|
|
|
|
int remainingTime = 600;
|
|
|
|
|
|
|
|
|
|
Future<Null> timer;
|
|
|
|
|
|
|
|
|
|
SMSOTP(
|
|
|
|
|
this.context,
|
|
|
|
|
this.type,
|
|
|
|
|
@ -337,12 +335,11 @@ class SMSOTP {
|
|
|
|
|
|
|
|
|
|
startTimer(setState) {
|
|
|
|
|
this.remainingTime--;
|
|
|
|
|
print(isClosed);
|
|
|
|
|
setState(() {
|
|
|
|
|
displayTime = this.getSecondsAsDigitalClock(this.remainingTime);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
timer = Future.delayed(Duration(seconds: 1), () {
|
|
|
|
|
Future.delayed(Duration(seconds: 1), () {
|
|
|
|
|
if (this.remainingTime > 0) {
|
|
|
|
|
if (isClosed == false) startTimer(setState);
|
|
|
|
|
} else {
|
|
|
|
|
|