Presented in Persian Flutter Community Youtube
This repository contains three separate projects demonstrating gRPC implementation using Dart and Flutter:
protos
: A Dart library for Protocol Buffer definitions.server
: A gRPC server written in Dart.client
: A Flutter application that communicates with the server using gRPC.
protos/
: Contains the.proto
files and generates Dart code for gRPC communication.server/
: Implements the gRPC server logic in Dart.client/
: A Flutter application acting as a gRPC client.
Before proceeding, ensure you have the following installed:
- Dart: Install Dart
- Flutter: Install Flutter
- Protocol Buffers Compiler (protoc): Download protoc
dart pub global activate protoc_plugin
protoc --dart_out=grpc:lib/src/generated -Iprotos protos/*.proto
--dart_out=grpc: Generates Dart protobuf and gRPC service files.
-Iprotos: Specifies the directory where .proto files are located.
lib/src/generated: Output directory for the generated files.