Go gRPC server with Flutter client using real Protocol Buffers.
# Terminal 1: Start Go server
cd server && go run main.go
# Terminal 2: Run Flutter app
cd flutter_app
fvm install 3.24.5 && fvm use 3.24.5
fvm flutter pub get && fvm flutter run├── proto/hello.proto # gRPC service definition
├── proto/*.pb.go # Generated Go code
├── server/main.go # Go gRPC server
├── server/test_client.go # Go test client
└── flutter_app/
├── lib/main.dart # Flutter app
└── lib/generated/ # Generated Dart code
Prerequisites: Go 1.23+
cd server
go run main.go # Starts on :50051
go run test_client.go # Test with Go clientPrerequisites: Flutter 3.24.5+ (managed with FVM)
cd flutter_app
fvm flutter run # Connect to localhost:50051Features: Host/port input, gRPC communication, real-time logs, proxy support, system proxy auto-detection.
Troubleshooting:
- iOS simulator: use
localhost - Android emulator: use
10.0.2.2
Build Android APK for distribution:
cd flutter_app
fvm flutter build apk --release # Creates app-release.apk (20.9MB)Generated APK location: build/app/outputs/flutter-apk/app-release.apk
service Greeter {
rpc SayHello (HelloRequest) returns (HelloResponse);
}
message HelloRequest {
string name = 1;
}
message HelloResponse {
string message = 1;
string client_ip = 2;
string user_agent = 3;
string timestamp = 4;
}Go:
protoc --go_out=. --go-grpc_out=. proto/hello.protoDart: Due to SDK compatibility issues, manually update lib/generated/ files when proto changes.