Push Portal Plugin for Flutter

push notification for application IOS and Android.

initializeApp

 await PushPortal.instance.initializeApp(
    username: 'username',
    password: 'password',
    serviceLog: true,
  );

can call function

  PushPortal.instance.setCallbackShowFlutterNotification((message) {
      print("----\nhandle show flutter notification\n----");
    });

  PushPortal.instance.setCallbackReceivePayload((message) {
      print("----\ncallback Receive Payload\n----");
    });

  PushPortal.instance.setCallbackInitialMessage((massage) async {
      print("----\ncallback Initial Message\n----");
      WidgetsBinding.instance.addPostFrameCallback((_) async {
        Get.to(const Mailbox());
      });
    });

function list

  • login()
  • relogin()
  • getFirebaseMessagingToken()
  • setBaseUrl()
  • setCallbackShowFlutterNotification()
  • setCallbackReceivePayload()
  • setCallbackInitialMessage()

can call sevice

final unreadCount = await PushPortal.instance.sevice
        .unreadCountNotification(
            memberId: memberId, deviceNumber: deviceNumber);

sevices list

  • registerTokenMember()
  • getNotificationLog()
  • openedNotification()
  • hideNotification()
  • getNotificationLogDetail()
  • unreadCountNotification()

Libraries

pushportal_package