getAsyncRouteManager method
AsyncRouteManager instance, which could be used for working with routing sessions. RouteSession
locationManager LocationManager instance
navigationManager NavigationManager instance
Returns AsyncRouteManager instance
Example:
// Get AsyncRouteManager for async route operations
if (_locationManager != null && _navigationManager != null) {
_asyncRouteManager = _sdk?.getAsyncRouteManager(
_locationManager!,
_navigationManager!,
);
if (_asyncRouteManager != null) {
print('AsyncRouteManager successfully initialized');
}
}
Implementation
@override
AsyncRouteManager getAsyncRouteManager(LocationManager locationManager, NavigationManager navigationManager) {
final _getAsyncRouteManagerFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
Pointer<Void> Function(Pointer<Void>, Pointer<Void>, Pointer<Void>),
Pointer<Void> Function(Pointer<Void>, Pointer<Void>, Pointer<Void>)
>('navigine_sdk_flutter_NavigineSdk_getAsyncRouteManager__LocationManager_NavigationManager'));
final _locationManagerHandle = navigine_sdk_flutter_LocationManager_ToFfi(locationManager);
final _navigationManagerHandle = navigine_sdk_flutter_NavigationManager_ToFfi(navigationManager);
final _handle = this.handle;
final __resultHandle = _getAsyncRouteManagerFfi(_handle, _locationManagerHandle, _navigationManagerHandle);
navigine_sdk_flutter_LocationManager_ReleaseFfiHandle(_locationManagerHandle);
navigine_sdk_flutter_NavigationManager_ReleaseFfiHandle(_navigationManagerHandle);
final _result = navigine_sdk_flutter_AsyncRouteManager_FromFfi(__resultHandle);
navigine_sdk_flutter_AsyncRouteManager_ReleaseFfiHandle(__resultHandle);
return _result;
}