HyperTrack class
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.
no setter
-
errors
→ Future<
Set< HyperTrackError> > -
Returns a list of errors that blocks the SDK from tracking.
no setter
-
errorsSubscription
→ Stream<
Set< HyperTrackError> > -
Subscribe to tracking errors.
no setter
-
isAvailable
→ Future<
bool> -
Reflects availability of the device for the Nearby search.
no setter
-
isAvailableSubscription
→ Stream<
bool> -
Subscribe to availability changes.
no setter
-
isTracking
→ Future<
bool> -
Reflects the tracking intent for the device.
no setter
-
isTrackingSubscription
→ Stream<
bool> -
Subscribe to tracking intent changes.
no setter
-
location
→ Future<
Result< Location, LocationError> > -
Reflects the current location of the user or an outage reason.
no setter
-
locationSubscription
→ Stream<
Result< Location, LocationError> > -
Subscribe to location changes.
no setter
-
metadata
→ Future<
JSONObject> -
Gets the metadata that is set for the device.
no setter
-
name
→ Future<
String> -
Gets the name that is set for the device.
no setter
-
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.
no setter
-
ordersSubscription
→ Stream<
Map< String, Order> > -
Subscribe to changes in the orders assigned to the worker
no setter
-
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.
no setter
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.