startFreeDrive method

  1. @override
Future<bool?> startFreeDrive(
  1. MapOptions options
)
override

Free-drive mode is a unique Mapbox Navigation SDK feature that allows drivers to navigate without a set destination. This mode is sometimes referred to as passive navigation. options options used to generate the route and used while navigating Begins to generate Route Progress

Implementation

@override
Future<bool?> startFreeDrive(MapOptions options) async {
  _routeEventSubscription = routeEventsListener!.listen(_onProgressData);
  final args = options.toMap();
  final result = await methodChannel.invokeMethod('startFreeDrive', args);
  if (result is bool) return result;
  log(result.toString());
  return false;
}