finishCurrentTrip method

  1. @override
Future<void> finishCurrentTrip()
override

Ends the current ongoing trip.

This API will end the ongoing trip and set TripState back to .idle. The SDK is responsible for detecting trip start and end points. The SDK also provides hosting apps this API to call if they have their own reasons (like sensors or beacons) to believe that the user's trip has ended.

Precondition:

  • SDK should be in an active trip.

Implementation

@override
Future<void> finishCurrentTrip() async {
  await methodChannel.invokeMethod('finishCurrentTrip');
}