简体   繁体   中英

Using OneSignal with Flutter

I notice that I can use Firebase for push notification feature. But my project requires using OneSignal. Is it possible to achieve it in Flutter? I can't find any post nor article talking about that.

Thanks.

EDIT:

There is an official plugin now for OneSignal https://github.com/OneSignal/OneSignal-Flutter-SDK


Unfortunately, there is no plugin for flutter to use OneSignal. You can write one yourself , though.

Since OneSignal exists for iOS and Android, what you have to do is write a communication between flutter and respective platforms.

If you decide to just implement the features for yourself, even pure platform channels can be viable.

Flutter plugin is just a wrapper to extract usage of platform channel that are platform dependent into a library.

IF you are using IntelliJ, after starting with plugin template on new project, in Tools -> Flutter you have an option to open the native iOS/Android code in Xcode/Android Studio. That should help to start things up.

打开

There is an official Flutter package !

Add it as a dependency to your pubspec.yaml file:

dependencies:
  onesignal_flutter: ^2.6.2  # Verify that this is the latest version

Full setup instructions can be found here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM