Skip to content
pubscout

grpc

5.2.0, released 5 weeks ago by dart.dev

Dart implementation of gRPC, a high performance universal RPC framework.

Rock solid
$ flutter pub add grpc
Source repository

What it does

Provides client and server implementations for gRPC in Dart and Flutter. It allows communication using HTTP/2 and Protocol Buffers, with support for gRPC-Web.

AI-written summary of version 5.2.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need high-performance communication between microservices or client and server using gRPC.
  • Your backend services are already using gRPC and Protocol Buffers.

Skip it when

  • Your backend is built around a standard REST/JSON API.
  • You want a lightweight HTTP client without the overhead of Protocol Buffers and gRPC setup.

Strengths

  • High performance and efficient binary serialization via Protocol Buffers.
  • Supports both Dart native and Flutter across multiple platforms.
  • Includes support for gRPC-Web and Unix Domain Sockets.

Weaknesses

  • Requires managing Protocol Buffer definitions and code generation.
  • Steeper learning curve compared to standard REST clients.

Setup

Kind
Pure Dart
Effort
Medium
Code generation
No
Direct dependencies
10

Requires setting up Protocol Buffer definitions and compilation tools to generate Dart stubs.

import 'package:grpc/grpc.dart';

// See https://grpc.io/docs/languages/dart/quickstart for complete setup

Alternatives

Packages that do the same job and could replace grpc.

  • dio

    If you are communicating with a traditional REST/JSON API instead of gRPC.

Works with

Packages commonly used together with grpc: ones it builds on, ones built on it, and its own family.