shareTrip function
Implementation
Future<ShareTripResponse?> shareTrip(
String appTripId,
String countryCode,
String phoneNumber,
) async {
try {
String? result = await platform.invokeMethod('shareTripWith', {
"appTripId": appTripId,
"countryCode": countryCode,
"phoneNumber": phoneNumber,
});
if (kDebugMode) {
print("Received Shared Trip Detains from sdk: $shareTrip");
}
return ShareTripResponse.fromJson(jsonDecode(result!));
} catch (e, stacktrace) {
if (kDebugMode) {
print("Error in shareTrip");
print(e);
print(stacktrace);
}
return null;
}
}