callPlaceDetail method

Future<PlaceDetailResponse?> callPlaceDetail()

Implementation

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