fcm_push 1.2.5

fcm-push #

A Dart interface to Firebase Cloud Messaging (FCM) for Android and iOS

You can use fcm-push either as commandline tool or you can use it as a library.

Prerequisite #

Command-line #

Activate fcm-push:

pub globale activate fcm_push

Create fcm-push.yaml:

fcm.server.key: <your server key>
token: <eithe your phone-ID or a registered subject>

Send your message: fcm-push 'Hello Android' 'Dart rocks!'

Usage: fcm-push <options> title [body]
    -h, --help           Shows this message
    -s, --settings       Prints settings
    -t, --token          subject or token
    -f, --config_file    Change config file
    -v, --loglevel       Sets the appropriate loglevel
                         [info, debug, warning]


    Send message:
        fcm-push 'Hello Android' 'Dart rocks!'

As library #

import 'package:fcm_push/fcm_push.dart';

final String serverKey = "";
final String token = "";

Future<int> main() async {
    final FCM fcm = new FCM(serverKey);
    final Message fcmMessage = new Message()
        ..to = token
        ..title = _config.title
        ..body = _config.body
    final String messageID = await fcm.send(fcmMessage);

License #

Copyright 2017 Michael Mitterer (office@mikemitterer.at),
IT-Consulting and Development Limited, Austrian Branch

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
either express or implied. See the License for the specific language
governing permissions and limitations under the License.

If this plugin is helpful for you - please (Circle) me,
Follow me on Twitter or star this repo here on GitHub.

Change Log for fcm_push #

A Dart interface to Firebase Cloud Messaging (FCM) for Android and iOS

Unreleased #

Feature #

Refactor #

  • Removed Grinder dependencies df254a5

v1.0.1 - 2017-03-03

Docs #

This CHANGELOG.md was generated with Changelog for Dart

Use this package as an executable

1. Install it

You can install the package from the command line:

$ pub global activate fcm_push

2. Use it

The package has the following executables:

$ fcm-push

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  fcm_push: ^1.2.5

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:fcm_push/fcm_push.dart';
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]
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://dart.dev/dart-2#migration.

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <2.0.0