FieldDescription constructor

FieldDescription(
  1. {required String name,
  2. required FieldType fieldType}
)

Creates a new field description object with the specified name and type.

Parameters:

  • name — The field's name.
  • fieldType — The field's data type.

Implementation

factory FieldDescription(
    {required String name, required FieldType fieldType}) {
  _initializeArcGISEnvironmentIfNeeded();
  final coreName = _CString(name);
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_FieldDescription_createWithNameAndType(
        coreName.bytes, fieldType.coreValue, errorHandler);
  });
  return FieldDescription._withHandle(handle);
}