SitumSdk class

Main entry point for the Situm Flutter SDK. Use SitumSdk to start positioning, calculate routes and fetch resources.

var situmSdk = SitumSdk();
// Set up your credentials:
situmSdk.init();
situmSdk.setApiKey(situmUser, situmApiKey);
// Set up location listeners:
situmSdk.onLocationUpdate((location) {
  ...
});
situmSdk.onLocationStatus((status) {
  ...
});
situmSdk.onLocationError((error) {
  ...
});

Constructors

SitumSdk()
Main entry point for the Situm Flutter SDK. Use SitumSdk to start positioning, calculate routes and fetch resources.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearCache() Future<void>
fetchBuildingInfo(String buildingIdentifier) Future<BuildingInfo>
Downloads all the building data for the selected building. This info includes Floors, indoor and outdoor Pois, events and paths. It also download floor maps and PoiCategory icons to local storage.
fetchBuildings() Future<List<Building>>
Downloads all the buildings for the current user.
fetchPoiCategories() Future<List<PoiCategory>>
fetchPoiFromBuilding(String buildingIdentifier, String poiIdentifier) Future<Poi?>
Returns the given indoor POI for the given building.
fetchPoisFromBuilding(String buildingIdentifier) Future<List<Poi>>
Returns the complete list of indoor POIs of the given building.
getDeviceId() Future<String>
init([String? situmUser, String? situmApiKey]) Future<void>
Initializes and authenticates SitumSdk.
internalEnableGeofenceListening() → void
Enables internal calls to native Geofence listeners. Receiving Geofence callbacks involves the execution of certain processes with a computational cost that we have chosen to avoid by default. This method activates those processes while preventing collisions with onEnterGeofences and onExitGeofences. Do not use this method as it is intended for internal use by the Situm AR module (that you will find on the situm_flutter_ar package).
internalSetMethodCallARDelegate(dynamic delegate(InternalCall call)) → void
Set a native MethodCall delegate. Do not use this method as it is intended for internal use by the Situm AR module (that you will find on the situm_flutter_ar package).
internalSetMethodCallMapDelegate(dynamic delegate(InternalCall call)) → void
Set a native MethodCall delegate. Do not use this method as it is intended for internal use by the map viewer module.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDirectionsRequested(OnDirectionsRequestedCallback callback) → void
Get notified when the user requests a route to any destination.
onEnterGeofences(OnEnteredGeofencesCallback callback) Future<void>
Get notified when the user enters a Geofence. Call this method before the positioning is started.
onExitGeofences(OnExitedGeofencesCallback callback) Future<void>
Get notified when the user exits a Geofence. Call this method before the positioning is started.
onLocationError(OnLocationErrorCallback callback) Future<void>
Get notified about positioning errors. See requestLocationUpdates.
onLocationStatus(OnLocationStatusCallback callback) Future<void>
Get notified about positioning status changes. See requestLocationUpdates.
onLocationUpdate(OnLocationUpdateCallback callback) Future<void>
Get notified about location updates. See requestLocationUpdates.
onNavigationCancellation(OnNavigationCancellationCallback callback) Future<void>
Sets a callback that will be notified when the navigation is cancelled. This may happen due to user interaction or a call to stopNavigation.
onNavigationDestinationReached(OnNavigationDestinationReachedCallback callback) Future<void>
Sets a callback that will be notified when the destination is reached. This will happen when the user is close to the destination by less than the distanceToGoalThreshold of NavigationRequest.
onNavigationOutOfRoute(OnNavigationOutOfRouteCallback callback) Future<void>
Sets a callback that will be notified when the current user gets out of the current route.
onNavigationProgress(OnNavigationProgressCallback callback) Future<void>
Sets a callback that will be notified on every navigation progress.
onNavigationStart(OnNavigationStartCallback callback) Future<void>
Sets a callback that will be notified when the navigation starts.
prefetchPositioningInfo(List<String> buildingIdentifiers, {PrefetchOptions? options}) Future<String>
Downloads all the necessary information to start positioning. This includes Building, BuildingInfo and the building's model. Downloaded information will be saved in cache.
removeUpdates() Future<void>
Stops positioning.
requestDirections(DirectionsRequest directionsRequest) Future<SitumRoute>
Requests directions between two Points using the given DirectionsRequest.
requestLocationUpdates(LocationRequest locationRequest) Future<void>
Starts positioning. Use onLocationUpdate, onLocationStatus and onLocationError callbacks to receive location updates, status changes and positioning errors.
requestNavigation(DirectionsRequest directionsRequest, NavigationRequest navigationRequest) Future<SitumRoute>
Requests navigation between two Points, using the given DirectionsRequest and NavigationRequest.
setApiKey(String situmApiKey) Future<void>
Authenticate yourself into our SDK to start positioning, navigating and using further functionalities of our SDK.
setConfiguration(ConfigurationOptions options) Future<void>
Sets the SDK ConfigurationOptions.
setDashboardURL(String? url) Future<void>
Sets the API's base URL to retrieve the data. Make sure you follow the next steps:
stopNavigation() Future<void>
Stops navigation if running.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited