verifyPhoneNumber method
Takes in M4eAuthPhoneNumberForm
parameter to send
verification-code (OTP) from m4e
Throws ServerException
if call to server fails
Throws ServerException
with NO_INTERNET_CONNECTION
error
code if device is not connected to the internet
Implementation
Future<UniqueId> verifyPhoneNumber(
M4eAuthPhoneNumberForm m4eAuthPhoneNumberForm) async {
if ((await _connectionChecker.hasConnection) ?? false) {
try {
final _userId =
await _authApi.verifyPhoneNumber(m4eAuthPhoneNumberForm);
return _userId;
} catch (e) {
rethrow;
}
}
throw ExceptionMessages.kNoInternetConnectionException;
}