typeConstant property

String get typeConstant

Returns the constant in PbFieldType corresponding to this type.

Implementation

String get typeConstant {
  var prefix = 'O';
  if (isRequired) {
    prefix = 'Q';
  } else if (isPacked) {
    prefix = 'K';
  } else if (isRepeated) {
    prefix = 'P';
  }
  return '$protobufImportPrefix.PbFieldType.$prefix${baseType.typeConstantSuffix}';
}