Search code examples
flutteronesignal

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.


Solution

  • 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.

    open in