ArrowField constructor

ArrowField(
  1. String name,
  2. ArrowDataType type, {
  3. bool nullable = true,
  4. Map<String, String> metadata = const {},
  5. bool allowEmptyName = false,
})

Creates a field. Set allowEmptyName for unnamed standard Arrow fields. The default retains the stricter binding-oriented constructor contract.

Implementation

ArrowField(
  this.name,
  this.type, {
  this.nullable = true,
  Map<String, String> metadata = const {},
  bool allowEmptyName = false,
}) : metadata = _metadata(metadata) {
  if (name.isEmpty && !allowEmptyName) {
    throw ArgumentError.value(name, 'name', 'must not be empty');
  }
}