autoRetrievalTimeLeft property

Duration autoRetrievalTimeLeft

autoRetrievalTimeLeft can be used to display a reverse countdown, starting from _autoRetrievalTimeOutDuration.inSecondss till 0, and can show the the listening for OTP view, and also the time left.

After this timer is exhausted, the device no longer tries to auto-fetch the OTP, and requires user to manually enter it.

Implementation

Duration get autoRetrievalTimeLeft {
  final otpTickDuration = Duration(
    seconds: (_otpAutoRetrievalTimer?.tick ?? 0),
  );
  return _autoRetrievalTimeOutDuration - otpTickDuration;
}