setAddedCost method

void setAddedCost(
  1. {required String attributeName,
  2. required double addedCost}
)

Sets added cost.

Set the amount of additional cost for an attribute by name. Any additional cost, e.g. Minutes, TravelTime, Kilometers, can be modified with this method.

Parameters:

  • attributeName — The name of attribute.
  • addedCost — The added cost.

Implementation

void setAddedCost(
    {required String attributeName, required double addedCost}) {
  final coreAttributeName = _CString(attributeName);
  _withThrowingErrorHandler((errorHandler) {
    runtimecore.RT_PointBarrier_setAddedCost(
        _handle, coreAttributeName.bytes, addedCost, errorHandler);
  });
}