See the Dart gRPC Quickstart.
If you experience issues, or if you have feature requests, please open an issue.
This library requires Dart SDK version 2.0 or later.
service_api.dartthat only contains the minimal imports needed by the code generated by protoc_plugin.
shutdown()on a channel doesn't throw error if the channel is not yet open.
StatusCodeconst rather than final.
The API is shaping up, but may still change as more advanced features are implemented.
This package is in a very early and experimental state. We do not recommend using it for anything but experiments.
Four code examples are available:
A demonstration of using the Dart gRPC library to perform unary RPs.
A demonstration of using the Dart gRPC library to communicate with Google APIs.
A demonstration of how to handle custom metadata, cancellation, and timeouts in Dart gRPC.
A demonstration of how to perform unary, client streaming, server streaming and full duplex RPCs.
For a complete, step-wise working example, see the Dart gRPC Quickstart.
Add this to your package's pubspec.yaml file:
dependencies: grpc: ^1.0.2
You can install packages from the command line:
$ pub get
$ flutter packages get
Alternatively, your editor might support
pub get or
flutter packages get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|1.0.2||Apr 3, 2019|
|1.0.1||Jan 24, 2019|
|1.0.0+1||Jan 22, 2019|
|1.0.0||Dec 17, 2018|
|0.6.8+1||Dec 13, 2018|
|0.6.8||Nov 12, 2018|
|0.6.6||Oct 24, 2018|
|0.6.5||Sep 18, 2018|
|0.6.4||Sep 7, 2018|
|0.6.1||Jul 19, 2018|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Apr 12, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter, other
lib/src/client/options.dart. (-1 points)
lib/src/client/options.dart reported 2 hints:
line 28 col 7: The top level variable '_minConnectTimeout' isn't used.
line 85 col 25: 'alpnSupported' is deprecated and shouldn't be used.
lib/grpc.dart. (-0.50 points)
lib/grpc.dart reported 1 hint:
line 27 col 39: 'ServerHandler' is deprecated and shouldn't be used.
lib/src/auth/auth.dart. (-0.50 points)
lib/src/auth/auth.dart reported 1 hint:
line 47 col 7:
Future results in
async function bodies must be
awaited or marked
Fix additional 3 files with analysis or formatting issues. (-1.50 points)
Additional issues in the following files:
|Dart SDK||>=2.0.0 <3.0.0|