We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
message SayRequest{ required string str1 = 1; optional int32 int1 = 2; }
When I use proto2's required and optional, the code generated by protoc --dart_out=grpc:lib/src/generated -Iprotos .\protos\* is as follows
protoc --dart_out=grpc:lib/src/generated -Iprotos .\protos\*
class SayRequest extends $pb.GeneratedMessage { factory SayRequest({ $core.String? str1, $core.int? int1, }) { final $result = create(); if (str1 != null) { $result.str1 = str1; } if (int1 != null) { $result.int1 = int1; } return $result; } SayRequest._() : super(); }
All fields are optional, it does not follow the required as expected
required
factory SayRequest({ required String str1, int? int1, })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When I use proto2's required and optional, the code generated by
protoc --dart_out=grpc:lib/src/generated -Iprotos .\protos\*
is as followsAll fields are optional, it does not follow the
required
as expectedThe text was updated successfully, but these errors were encountered: