CodedValueDomainDescription constructor
- required String name,
- required FieldType fieldType,
- required List<
CodedValueDescription> values,
Creates a new coded value domain description with the specified name and coded values.
Parameters:
name
— The coded value domain's name.fieldType
— The coded value domain's field type.values
— The coded value domain's coded values.
Implementation
factory CodedValueDomainDescription({
required String name,
required FieldType fieldType,
required List<CodedValueDescription> values,
}) {
_initializeArcGISEnvironmentIfNeeded();
final coreName = _CString(name);
final coreValues = values.toArray(
valueType: _ElementType.codedValueDescription,
);
final handle = _withThrowingErrorHandler((errorHandler) {
return runtimecore
.RT_CodedValueDomainDescription_createCorrectingFieldType(
coreName.bytes,
fieldType.coreValue,
coreValues._handle,
errorHandler,
);
});
final CodedValueDomainDescription object =
CodedValueDomainDescription._withHandle(handle);
object._values.value.setCache(values);
return object;
}