shareTrip method

Future<ShareTripResponse?> shareTrip(
  1. String appTripId,
  2. String countryCOde,
  3. String phoneNUmber
)

Implementation

Future<ShareTripResponse?> shareTrip(
    String appTripId,
    String countryCOde,
    String phoneNUmber,
    ) async {
  try {
    ShareTripResponse? shareTripResponse = await kruzr_comm.shareTripById(
      appTripId,
      countryCOde,
      phoneNUmber,
    );
    return shareTripResponse;
  } on PlatformException catch (e, stackTrace) {
    if (kDebugMode) {
      print("Error in shareTripResponse");
      print(stackTrace);
      print(e);
    }
    return Future.error({"code": e.code, "message": e.message, "details": e.details});
  } on Exception catch (e, stackTrace) {
    if (kDebugMode) {
      print("Error in shareTripResponse");
      print(stackTrace);
      print(e);
    }
    return Future.error(PlatformException(code: "PLUGIN_ERROR", message: e.toString()));
  }
}