I'd like to use gRPC / ProtoBuffers between a Flutter/Dart app developed on OSx and a GoLang server. My thought is to replace a REST connection. My problem is that I cannot install Protobuf on OSx for DART.... or at least, I can't seem to figure it out.
This URL, towards the end, says that Protobuf for DART is only supported for Ubuntu.
https://chromium.googlesource.com/external/github.com/google/protobuf/+/HEAD/README.md
QUESTIONS
- Is this correct that Protobuf on OSx for Dart Flutter is not working yet?
- Any tips or tricks to make it work? and I missing something here?
First, you should install protobuf by homebrew.
brew install protobufIf you don't havebrewcommand, see how to install package manager HomeBrew for MacOsX.Second, you should install Dart, see here https://www.dartlang.org/tools/sdk#install
Third, install plugin dart-protoc-plugin https://github.com/dart-lang/dart-protoc-plugin#how-to-build-and-use
Fourth, see this guide how to generate .dart classes https://developers.google.com/protocol-buffers/docs/darttutorial
Fifth, follow this guide for dart-grpc https://grpc.io/docs/tutorials/basic/dart.html