getTripShareUrlById function
Implementation
Future<ShareableTripUrlResponseModel?> getTripShareUrlById(
String appTripId,
) async {
try {
String? result = await platform.invokeMethod('getTripShareUrlById', {
"appTripId": appTripId,
});
if (kDebugMode) {
print("Received Shareable Trip URL from sdk: $result");
}
return ShareableTripUrlResponseModel.fromJson(jsonDecode(result!));
} on PlatformException catch (e, stacktrace) {
if (kDebugMode) {
print("Error in getShareableURL");
print(e);
print(stacktrace);
}
rethrow;
} catch (e, stacktrace) {
if (kDebugMode) {
print("Error in getShareableURL");
print(e);
print(stacktrace);
}
throw PlatformException(code: "PLUGIN_ERROR", message: e.toString());
}
}