push_notification 0.0.1-dev.5

Flutter Android iOS

Library for implementing push notifications. The module contains the main work with push notifications.

SurfGear

Main

[TOC]

push_notification #

Library for implementing push notifications. The module contains the main work with push notifications.

Usage #

An example of using the library can be found in example.

  • Create a notification data type through inheritance NotificationPayload

  • Create a strategy for handling notifications through inheritance PushHandleStrategy

  • Create a factory of strategies through inheritance PushHandleStrategyFactory

  • To receive notifications, you need to create an instance. MessagingService

  • To display notifications, you need to create an instance NotificationController.

  • And pass created instances when creating PushHandler that will create the strategy using the factory.

  • In the notification there should be a field: click_action: FLUTTER_NOTIFICATION_CLICK

  • in manifest in <activity> you need to add intent filter:

<intent-filter>
      <action android:name="FLUTTER_NOTIFICATION_CLICK" />
      <category android:name="android.intent.category.DEFAULT" />
</intent-filter>
1
likes
100
pub points
64%
popularity

Publisher

surf.ru

Library for implementing push notifications. The module contains the main work with push notifications.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache 2.0 (LICENSE)

Dependencies

flutter, rxdart, surf_lint_rules

More

Packages that depend on push_notification