minDistanceMeters property

double get minDistanceMeters

Get the minimum movement that triggers delivery.

Returns

  • double: The minimum movement in metres, measured from the last delivered position, that triggers delivery. 0 or less means the trigger is disabled.

See also:

Implementation

double get minDistanceMeters {
  final OperationResult resultString = objectMethod(
    pointerId,
    'PositionDataDeliveryPolicy',
    'minDistanceMeters',
  );

  return (resultString['result'] as num).toDouble();
}
set minDistanceMeters (double value)

Set the minimum movement that triggers delivery.

The distance is measured from the last position that was delivered, so a series of small movements adds up until together they cross the threshold. 0 or less disables the trigger. The new value applies from the next sample.

A value that is not a number counts as 0, and an infinite value as the largest finite threshold.

Parameters

  • value: (double) Minimum movement in metres. 0 or less disables the trigger.

See also:

Implementation

set minDistanceMeters(double value) {
  objectMethod(
    pointerId,
    'PositionDataDeliveryPolicy',
    'setMinDistanceMeters',
    args: DataDeliveryPolicy._clampedThreshold(value),
  );
}