api_fcm 1.1.1 copy "api_fcm: ^1.1.1" to clipboard
api_fcm: ^1.1.1 copied to clipboard

Simple api to send notifications using google FCM endpoint

example/api_fcm_example.dart

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

void main() {
  // get your token server from firebase dashboard
  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'),
  );
}
15
likes
140
points
28
downloads

Publisher

unverified uploader

Weekly Downloads

Simple api to send notifications using google FCM endpoint

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

http

More

Packages that depend on api_fcm