init method

  1. @override
Future<void> init(
  1. Map<String, dynamic> params
)
override

初始化参数

Implementation

@override
Future<void> init(Map<String, dynamic> params) async {
  backgroundNotificationMessageStream =
      _backgroundNotificationMessageController.stream;
  notificationMessageStream = _notificationMessageController.stream;

  Pushy.listen();

  _deviceId = await Pushy.register();

  Pushy.setNotificationListener(backgroundNotificationListener(
      _backgroundNotificationMessageController.sink,
      _notificationMessageController.sink));

  Pushy.setNotificationClickListener((data) {
    print("click $data");
  });
}