Skip to content

A sample server-client app written in Dart communicating with gRPC

Notifications You must be signed in to change notification settings

arashmidos/grpc-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gRPC Demo Projects

Presented in Persian Flutter Community Youtube

This repository contains three separate projects demonstrating gRPC implementation using Dart and Flutter:

  1. protos: A Dart library for Protocol Buffer definitions.
  2. server: A gRPC server written in Dart.
  3. client: A Flutter application that communicates with the server using gRPC.

Project Structure

  • 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.

Prerequisites for gRPC development in Dart/Flutter

Before proceeding, ensure you have the following installed:

  1. Dart: Install Dart
  2. Flutter: Install Flutter
  3. Protocol Buffers Compiler (protoc): Download protoc

Useful commands

Activate protoc

  dart pub global activate protoc_plugin

Generate proto stub

  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.

About

A sample server-client app written in Dart communicating with gRPC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published