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;
}