Skip to content
This repository has been archived by the owner on Sep 21, 2024. It is now read-only.
/ api_fcm Public archive

Simple api to send notifications using google FCM endpoint

License

Notifications You must be signed in to change notification settings

lucascardo12/api_fcm

Repository files navigation

Api Fcm Plugin for Dart

A Dart plugin to use the Firebase Cloud Messaging API.

To learn more about Firebase Cloud Messaging, please visit the Firebase website

Getting Started

To get started with Firebase Cloud Messaging for Dart, please see the documentation.

Usage

Exemple

import 'package:api_fcm/api_fcm.dart';
import 'package:api_fcm/src/message_model.dart';

void main() {
  var api = ApiFcm(tokenServer: '<yourtoken>');

  api.postMessage(
    listtokens: ['<deviceToken>'],
    notification: MessageModel(body: 'Notification test tokens'),
  );

  api.postTopics(
    topics: 'test',
    notification: MessageModel(body: 'Notification test topics'),
  );
}

About

Simple api to send notifications using google FCM endpoint

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages