MapBoxNavigation constructor

MapBoxNavigation({
  1. ValueSetter<RouteEvent>? onRouteEvent,
})

Implementation

factory MapBoxNavigation({ValueSetter<RouteEvent>? onRouteEvent}) {
  if (_instance == null) {
    MethodChannel methodChannel = const MethodChannel('flutter_mapbox');
    EventChannel eventChannel = const EventChannel('flutter_mapbox/events');
    _instance =
        MapBoxNavigation.private(methodChannel, eventChannel, onRouteEvent);
  }
  return _instance!;
}