tracelet_web 0.5.1
tracelet_web: ^0.5.1 copied to clipboard
Web implementation of the Tracelet background geolocation plugin.
tracelet_web #
Web implementation of the Tracelet background geolocation plugin.
This package uses browser APIs (Geolocation, Permissions, fetch, navigator.onLine) to provide foreground-only location tracking on the web.
Important: The web platform does not support background location tracking. The Web Geolocation API only works while the page/tab is in the foreground.
Usage #
You should not depend on this package directly. Instead, depend on tracelet which automatically includes this package on web builds.
dependencies:
tracelet: ^0.5.0
For a full compatibility matrix of what works and what doesn't on web, see the Web Support Guide.
Features #
| Feature | Status | Notes |
|---|---|---|
getCurrentPosition |
Full | Via navigator.geolocation.getCurrentPosition() with auto-fallback |
start / watchPosition |
Partial | Foreground only. No background tab tracking. |
stop / stopWatchPosition |
Full | Via navigator.geolocation.clearWatch() |
| Geofencing | Emulated | Distance-based enter/exit/dwell computed in Dart |
| Persistence | In-memory | Lost on page refresh. Use HTTP sync for durability. |
| HTTP Sync | Full | Via browser fetch() API |
| Permissions | Partial | Via navigator.permissions.query() |
| Connectivity | Full | Via navigator.onLine events |
| Headless / Background | No | Not possible on web |
| System Settings | No | Cannot open OS settings from browser |
Related Packages #
| Package | Description |
|---|---|
tracelet |
App-facing Dart API — the only package you depend on |
tracelet_platform_interface |
Abstract platform interface |
tracelet_android |
Android implementation |
tracelet_ios |
iOS implementation |