resendOtp method

Future<bool> resendOtp(
  1. String contact,
  2. AuthMethod method
)

Implementation

Future<bool> resendOtp(String contact, AuthMethod method) async {
  _setLoading(true);
  _setError(null);
  final result = await _authService.resendOtp(contact, method);
  return result.fold(
    (_) {
      _setLoading(false);
      return true;
    },
    (error) {
      _setError(error);
      _setLoading(false);
      return false;
    },
  );
}