setAutoTripStartOnlyIfVehicleConnected function
Future<void>
setAutoTripStartOnlyIfVehicleConnected(
- bool shouldAutoStartOnlyIfVehicleConnected
)
Implementation
Future<void> setAutoTripStartOnlyIfVehicleConnected(
bool shouldAutoStartOnlyIfVehicleConnected,
) async {
try {
await platform.invokeMethod('setAutoTripStartOnlyIfVehicleConnected', {
"shouldAutoStartOnlyIfVehicleConnected":
shouldAutoStartOnlyIfVehicleConnected,
});
return;
} on PlatformException catch (e, stacktrace) {
if (kDebugMode) {
print("Error in setAutoTripStartOnlyIfVehicleConnected");
print(e);
print(stacktrace);
}
rethrow;
} catch (e, stacktrace) {
if (kDebugMode) {
print("Error in setAutoTripStartOnlyIfVehicleConnected");
print(e);
print(stacktrace);
}
throw PlatformException(code: "PLUGIN_ERROR", message: e.toString());
}
}