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
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
-
addExternalArData(
String? message) → Future< void> -
addExternalLocation(
ExternalLocation externalLocation) → Future< void> - Adds an external location.
-
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.
-
logout(
) → Future< void> - Invalidate user's token and remove it from internal credentials, if exist.
-
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 StatusNames to learn about the possible statuses that you might receive.
-
onLocationUpdate(
OnLocationUpdateCallback callback) → Future< void> - Get notified about location updates. See requestLocationUpdates.
- Sets a callback that will be notified when the navigation is cancelled. This may happen due to user interaction or a call to stopNavigation.
- 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.
- Sets a callback that will be notified when the current user gets out of the current route.
- Sets a callback that will be notified on every navigation progress.
- Sets a callback that will be notified when the navigation starts.
-
openUrlInDefaultBrowser(
String url) → void - Opens the given URL in the system's default browser. This method is used internally but has been exposed publicly as it is useful in common use-cases such as handling Poi description interactions.
-
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.
-
removeAutoStop(
) → Future< void> - Disable any AutoStopCriteria previously requested.
-
removeUpdates(
) → Future< void> - Stops positioning.
-
requestAutoStop(
AutoStopCriteria criteria) → Future< void> - Stop positioning automatically under the given criteria.
-
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.
- 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:
-
setUserPass(
String user, String pass) → Future< void> - Don't use this method, you probably want to call setApiKey.
- Stops navigation if running.
-
toString(
) → String -
A string representation of this object.
inherited
- Update SDK with the MapView navigation states. Do not use this method as it is intended for internal use by the map viewer module.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited