Field constructor

Field({
  1. Field_Kind? kind,
  2. Field_Cardinality? cardinality,
  3. int? number,
  4. String? name,
  5. String? typeUrl,
  6. int? oneofIndex,
  7. bool? packed,
  8. Iterable<Option>? options,
  9. String? jsonName,
  10. String? defaultValue,
})

Implementation

factory Field({
  Field_Kind? kind,
  Field_Cardinality? cardinality,
  $core.int? number,
  $core.String? name,
  $core.String? typeUrl,
  $core.int? oneofIndex,
  $core.bool? packed,
  $core.Iterable<Option>? options,
  $core.String? jsonName,
  $core.String? defaultValue,
}) {
  final _result = create();
  if (kind != null) {
    _result.kind = kind;
  }
  if (cardinality != null) {
    _result.cardinality = cardinality;
  }
  if (number != null) {
    _result.number = number;
  }
  if (name != null) {
    _result.name = name;
  }
  if (typeUrl != null) {
    _result.typeUrl = typeUrl;
  }
  if (oneofIndex != null) {
    _result.oneofIndex = oneofIndex;
  }
  if (packed != null) {
    _result.packed = packed;
  }
  if (options != null) {
    _result.options.addAll(options);
  }
  if (jsonName != null) {
    _result.jsonName = jsonName;
  }
  if (defaultValue != null) {
    _result.defaultValue = defaultValue;
  }
  return _result;
}