sendOtp method
Implementation
@override
Future<AuthResult<void>> sendOtp(String contact, AuthMethod method) async {
try {
final response = await _client.post(
Uri.parse('$baseUrl/auth/send-otp'),
headers: _headers,
body: jsonEncode({'contact': contact, 'method': method.name}),
);
return _handleResponse(response);
} catch (e) {
return AuthResult.failure(AuthException(e.toString(), code: 'network-error'));
}
}