getDartType method

String getDartType(
  1. FileGenerator fileGen
)

Returns the name to use in generated code for this Dart type.

Doesn't include the List type for repeated fields. FileGenerator.protoFileUri represents the current proto file where we are generating code. The Dart class might be imported from a different proto file.

Implementation

String getDartType(FileGenerator fileGen) =>
    (fileGen.protoFileUri == generator?.fileGen?.protoFileUri)
        ? unprefixed
        : prefixed;