pusher_beams_server 0.1.2 copy "pusher_beams_server: ^0.1.2" to clipboard
pusher_beams_server: ^0.1.2 copied to clipboard

outdated

A Pusher Beams Client for sending push notifications to users.

example/example.dart

import 'package:pusher_beams_server/pusher_beams_server.dart';

main() async {
  // constructor
  final beamsClient = PushNotifications(
    'your_instance_id_here',
    'your_secret_key_here',
  );

  // push notification for interests on Android
  final interests = ['pears', 'apples'];
  final fcm = {
    'notification': {
      'title': 'Hello',
      'body': 'Hello, world!',
    }
  };
  final response = await beamsClient.publishToInterests(interests, fcm: fcm);

  // push notification for users on Apple device
  final users = ["user-001", "user-002"];
  final apns = {
    'aps': {
      'alert': {
        'title': 'Hello',
        'body': 'Hello, world!',
      }
    }
  };
  final response2 = await beamsClient.publishToUsers(users, apns: apns);
}
3
likes
0
pub points
0%
popularity

Publisher

verified publishersuragch.dev

A Pusher Beams Client for sending push notifications to users.

Homepage

License

unknown (LICENSE)

Dependencies

http, jaguar_jwt

More

Packages that depend on pusher_beams_server