HyperTrack class Null safety
This plugin allows you to use Hypertrack SDK for Flutter apps to get realtime device location
Properties
-
deviceId
→ Future<
String> -
A string which is used to uniquely identify the user.
read-only
-
isAvailable
→ Future<
bool> -
Reflects availability of the device for the Nearby search
read-only
-
isTracking
→ Future<
bool> -
Reflects the tracking intent for the device
read-only
-
location
→ Future<
Result< Location, LocationError> > -
Reflects the current location of the user or an outage reason
read-only
-
onAvailabilityChanged
→ Stream<
bool> -
Subscribe to availability changes
read-only
-
onError
→ Stream<
Set< HyperTrackError> > -
Subscribe to tracking errors
read-only
-
onTrackingChanged
→ Stream<
bool> -
Subscribe to tracking intent changes
read-only
Methods
-
addGeotag(
JSONObject data) → Future< Result< Location, LocationError> > - Adds a new geotag
-
setAvailability(
bool available) → void - Sets the availability of the device for the Nearby search
-
setMetadata(
JSONObject data) → void - Sets the metadata for the device
-
setName(
String name) → void - Sets the name for the device
-
startTracking(
) → void - Expresses an intent to start location tracking for the device
-
stopTracking(
) → void - Stops location tracking immediately
-
sync(
) → void - Syncs device state with HyperTrack servers
Static Methods
-
initialize(
String publishableKey, {bool? requireBackgroundTrackingPermission, bool? loggingEnabled, bool? allowMockLocations}) → Future< HyperTrack> - Creates an SDK instance