flutter_gcm
A Flutter service for Cloud Messaging.
Running the sample app.
- The package assumes you have this directory structure (each bullet is a sibling):
 
- Ensure your environment is set up for building Flutter apps as described here.
 - Follow these steps:
 
cd engine/src/third_party/gcm/examples/simple
flutter start
Using GCM in your own Flutter app.
- Add the following snippet to your app's 
pubspec.yaml: 
dependencies:
  gcm:
    path: path/to/flutter_gcm/packages/gcm
- Add the following snippet to your app's 
flutter.yaml: 
services:
  - gcm
- Register GCM in your .dart code using the sender ID provided here:
 
  String token = await gcm.registerGcmService(SENDER_ID, onMessageReceived);
  gcm.subscribeTopics(token, ['global']);
See gcm.mojom for the full API.
Building new .jar or .dylib files
See CONTRIBUTING.md.