HyperTrack class Null safety
This plugin allows you to use HyperTrack SDK for Flutter apps
Constructors
Static Properties
-
deviceId
→ Future<
String> -
Returns a string that is used to uniquely identify the device.
read-only
-
errors
→ Future<
Set< HyperTrackError> > -
Returns a list of errors that blocks the SDK from tracking.
read-only
-
errorsSubscription
→ Stream<
Set< HyperTrackError> > -
Subscribe to tracking errors.
read-only
-
isAvailable
→ Future<
bool> -
Reflects availability of the device for the Nearby search.
read-only
-
isAvailableSubscription
→ Stream<
bool> -
Subscribe to availability changes.
read-only
-
isTracking
→ Future<
bool> -
Reflects the tracking intent for the device.
read-only
-
isTrackingSubscription
→ Stream<
bool> -
Subscribe to tracking intent changes.
read-only
-
location
→ Future<
Result< Location, LocationError> > -
Reflects the current location of the user or an outage reason.
read-only
-
locationSubscription
→ Stream<
Result< Location, LocationError> > -
Subscribe to location changes.
read-only
-
metadata
→ Future<
JSONObject> -
Gets the metadata that is set for the device.
read-only
-
name
→ Future<
String> -
Gets the name that is set for the device.
read-only
-
orders
→ Future<
Map< String, Order> > -
Gets the active orders for the worker. The orders are sorted with the
ordering in which the worker should complete them.
read-only
-
ordersSubscription
→ Stream<
Map< String, Order> > -
Subscribe to changes in the orders assigned to the worker
read-only
-
workerHandle
→ Future<
String> -
A primary identifier that uniquely identifies the worker outside of
HyperTrack.
Example: email, phone number, database id
It is usually obtained and set when the worker logs into the app.
Set it to an empty string "" when the worker logs out of the app to
un-bind the device from the worker and avoid unintentional tracking.
read-only
Static Methods
-
addGeotag(
String orderHandle, OrderStatus orderStatus, JSONObject data) → Future< Result< Location, LocationError> > - Adds a new geotag. Check Shift tracking and Clock In/Out tagging docs to learn how to use Order handle and Order status params. Accepts:
-
addGeotagDeprecated(
JSONObject data) → Future< Result< Location, LocationError> > - Deprecated. Use addGeotag with orderHandle and orderStatus instead.
-
addGeotagWithExpectedLocation(
String orderHandle, OrderStatus orderStatus, JSONObject data, Location expectedLocation) → Future< Result< LocationWithDeviation, LocationError> > - Adds a new geotag with expected location. Check Shift tracking doc to learn how to use Order handle and Order status params. Accepts:
-
addGeotagWithExpectedLocationDeprecated(
JSONObject data, Location expectedLocation) → Future< Result< LocationWithDeviation, LocationError> > - Deprecated. Use addGeotagWithExpectedLocation with orderHandle and orderStatus instead.
-
locate(
) → Stream< Result< Location, Set< >HyperTrackError> > - Requests one-time location update and returns the Location once it is available, or LocationError.
-
setIsAvailable(
bool available) → void - Sets the availability of the device for the Nearby search.
-
setIsTracking(
bool tracking) → void - Sets the tracking intent for the device.
-
setMetadata(
JSONObject data) → void - Sets the metadata for the device.
-
setName(
String name) → void - Sets the name for the device.
-
setWorkerHandle(
String workerHandle) → void - A primary identifier that uniquely identifies the worker outside of HyperTrack. Example: email, phone number, database id It is usually obtained and set when the worker logs into the app. Set it to an empty string "" when the worker logs out of the app to un-bind the device from the worker and avoid unintentional tracking.