Import
Dart
Initialization
.initialize
Initializes the positioning engine with your OneS1ght API key.Dart
.requestPermission
Requests the app permissions needed to use the positioning engine.Dart
.setLanguage
Sets the language of SDK log messages.ko: Korean, ja: Japanese, en: English, null: system language
Dart
.onDebugLog
Receives SDK logs.level: log level, message: log message
Dart
.reset
Undoes initialization and discards the current session. No new session is created; callinitialize again to continue (a different key also works).
Dart
State
.isInitialized
Returns whether initialization succeeded.Dart
.deviceAvailability
Tells whether the device supports positioning and, if not, why.
On Android, read it after
initialize(). Before that the SDK cannot tell and returns deviceNotSupported.
Dart
.googleMapKey
Returns the Google Maps API key for displaying the floor plan.Dart
.sdkVersion
Returns the native SDK version in use.For the plugin version, see
OneS1ght.pluginVersion.
Dart
Profiles
.createProfile
Creates a new personalization profile. Returns a unique profile ID on success.Dart
.identify
Links the profile that collected positioning data is grouped under. Setnull to unlink.
Dart
.fetchProfile
Fetches the profile’s attributes.Dart
.replaceProfile
Replaces the profile’s attributes. The previous data is deleted.Dart
.deleteProfile
Permanently deletes the profile.Dart
Space lookup
.buildings
Fetches every building that belongs to the tenant.Dart
.floors
Fetches the floors of a building.Dart
.floor
Fetches the details of the selected floor.Dart
.zones
Fetches every zone on the selected floor.Dart
.locators
Fetches the locators on the selected floor.Dart
Setting the floor
.setFloorMap
Sets the floor to start positioning on.Dart
.refreshZones
Fetches the latest zone data.Dart
Positioning session
.floorSession
Gets the locator session for the selected floor.Dart
.begin
Starts positioning the user.Dart
.end
Stops positioning the user.Dart
.pause · .resume
Pauses and resumes positioning. Unlikeend, the positioning engine inside the SDK keeps running.
Dart
.isRunning · .isPaused
Returns whether positioning is running and whether it is paused.Dart
Session events
.onPosition
Fires with the user’s coordinates in real time (4 times per second by default).Dart
.onZoneEnter · .onZoneExit
Fires when the user enters or exits a zone.Dart
.onZoneDwell
Fires when the dwell time in a zone exceeds the threshold (dwellSeconds).
Dart
.onTriggers
Fires when an in-space event (campaign) is triggered.Dart
.onFloorDetected
Fires when a locator’s BLE signal is received.Dart
.onStopped
Fires when positioning stops.Dart
.onConfigChanged
Fires when settings change in the console.Dart
Data upload
Coordinates are uploaded automatically every 300 entries or 60 seconds, as well as when the app goes to the background and onend().
.uploadPendingPositions
Uploads buffered coordinates immediately.Dart
.discardPendingPositions
Discards buffered coordinates.Dart
Error handling
Every failure is aOneS1ghtException. See Error codes for details.
Dart
Models
Lists areList<T>, bytes are Uint8List.
Coordinates
Building · Floor
Locator · FloorLocators
Zone
Trigger
Enums (
ConfigChange · StopReason · PermissionStatus · DeviceAvailability · LogLevel) may gain values in minor versions — keep a default in switch.
Limitations
- Every call is a
Futureand every event aStream— you can update the UI directly. - UWB positioning is foreground only — it stops in the background and resumes when the app returns.
- The coordinate buffer is kept in app memory — unsent coordinates are lost if the app is force-quit.
- Positioning does not work on the emulator.