callNearby method

Future<NearbyResponse?> callNearby()

Implementation

Future<NearbyResponse?> callNearby() async {
  try {
    String? result = await restApi.hateOsNearby(toMap());
    print(result);
    return result != null
        ? NearbyResponse.fromMap(json.decode(result))
        : null;
  } on PlatformException catch (e) {
    return Future.error(e);
  }
}