signUp method
Implementation
Future<dynamic> signUp(String hash) async {
String output = "";
final apiService = _ApiService();
if (_apiKey == null) {
throw ("API Key not initialized.");
}
if (_baseUrl == null) {
throw ("API Key not initialized.");
} else {
try {
final response = await apiService.post(
url: _baseUrl ?? " ",
endpoint: "users",
requestBody: {"hash": hash},
headers: {"x-api-key": _apiKey!},
);
// log("POST Response: $response");
// You can add parsing logic here if needed.
output = response;
return output;
} catch (error) {
rethrow;
}
}
}