setTripAutoEnd function

Future<void> setTripAutoEnd(
  1. bool shouldAutoEnd
)

Implementation

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