RangeDomainDescription constructor

RangeDomainDescription({
  1. required String name,
  2. required FieldType fieldType,
  3. required dynamic minValue,
  4. required dynamic maxValue,
})

Creates a new range domain description object with the specified name and values.

Parameters:

  • name — The range domain's name.
  • fieldType — The range domain's field type.
  • minValue — The range domain's minimum value.
  • maxValue — The range domain's maximum value.

Implementation

factory RangeDomainDescription({
  required String name,
  required FieldType fieldType,
  required dynamic minValue,
  required dynamic maxValue,
}) {
  _initializeArcGISEnvironmentIfNeeded();
  final coreName = _CString(name);
  final coreMinValue = _ElementExtension.fromDartValue(minValue);
  final coreMaxValue = _ElementExtension.fromDartValue(maxValue);
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_RangeDomainDescription_createCorrectingFieldType(
      coreName.bytes,
      fieldType.coreValue,
      coreMinValue._handle,
      coreMaxValue._handle,
      errorHandler,
    );
  });
  final RangeDomainDescription object =
      RangeDomainDescription._withHandle(handle);
  object._minValue.cache(minValue);
  object._maxValue.cache(maxValue);
  return object;
}