obtainAvailability method
country
should be the ISO Alpha-2 country code.
Implementation
Future<List<dynamic>> obtainAvailability({
required String jwt,
required double latitude,
required double longitude,
required String country,
}) async {
assert(latitude >= -90 || latitude <= 90);
assert(latitude >= -180 || latitude <= 180);
final response = await http.get(
Uri.parse("$baseUrl/availability/$latitude/$longitude?country=$country"),
headers: {HttpHeaders.authorizationHeader: jwt},
);
final decode = json.decode(response.body);
return decode;
}