startTimer method

void startTimer(
  1. dynamic context
)

Implementation

void startTimer(context) {
  if (_timer != null) {
    _timer!.cancel();
  }
  _timer = Timer.periodic(Duration(seconds: 1), (timer) {
    if (start <= 0) {
      closedialog(context, "Verification Completed");
      _timer!.cancel();
    } else {
      start--;
    }
  });
}