addGeotag method Null safety

Future<Result<Location, LocationError>> addGeotag(
  1. String orderHandle,
  2. OrderStatus orderStatus,
  3. JSONObject data
)

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:

  • orderHandle - Order handle.
  • orderStatus - Order status.
  • data - Geotag data JSON. Returns current location if success or LocationError if failure.

Implementation

static Future<Result<Location, LocationError>> addGeotag(
    String orderHandle, OrderStatus orderStatus, JSONObject data) {
  return _invokeSdkMethod<Map<Object?, Object?>>(SdkMethod.addGeotag,
          serializeGeotagData(orderHandle, orderStatus, data, null))
      .then((value) {
    return deserializeLocationResult(value);
  });
}