persian_push library

Classes

OneSignal
OSActionButton
Represents a button sent as part of a push notification
OSAndroidBackgroundImageLayout
(Android Only) This class represents the background image layout used for push notifications that show a background image
OSCreateNotification
The parameters & format to create push notifications is so different from receiving notifications that we represent a Create Notification object as an entirely different class
OSEmailSubscriptionState
Represents the user's OneSignal email subscription state,
OSEmailSubscriptionStateChanges
An instance of this class describes a change in the user's email subscription state with OneSignal
OSInAppMessageAction
When a click action is defined on an In App Message form the dashboard, the handler returns an OSInAppMessageAction object so the Dart code can act accordingly This allows for custom action events within Dart
OSNotification
A class representing the notification, including the payload of the notification as well as additional parameters (such as whether the notification was shown to the user, whether it's silent, etc.)
OSNotificationAction
Represents an action taken on a push notification, such as tapping the notification (or a button on the notification), or if your inFocusDisplayType is set to true - if they tapped 'close'.
OSNotificationOpenedResult
An instance of this class represents a user interaction with your push notification, ie. if they tap a button
OSNotificationPayload
This class represents the actual payload of the notification, the data that impacts the content of the notification itself.
OSOutcomeEvent
When an outcome is sent the onSuccess will return an OutcomeEvent This object is converted from the native OutcomeEvent into the OSOutcomeEvent for Dart to use
OSPermissionState
OSPermissionStateChanges
OSPermissionSubscriptionState
OSSubscriptionState
Represents the current user's subscription state with OneSignal
OSSubscriptionStateChanges
An instance of this class describes a change in the user's OneSignal push notification subscription state, ie. the user subscribed to push notifications with your app.

Properties

sdkVersion String
read / write

Functions

sessionFromString(String session) OSSession

Enums

OSCreateNotificationBadgeType
Applies to iOS notifications only Determines if the badgeCount is used to increment the existing badge count, or sets the badge count directly
OSCreateNotificationDelayOption
control how the notification is delayed timezone: Deliver at a specific time of day in each user's timezone last-active: Deliver at the same time the user last used your app
OSiOSSettings
Various iOS Settings that can be passed during initialization
OSLogLevel
An enum that declares different types of log levels you can use with the OneSignal SDK, going from the least verbose (none) to verbose (print all comments).
OSNotificationActionType
Indicates whether a user tapped a notification (opened) or took a specific action by tapping a button (actionTaken)
OSNotificationDisplayType
Determines how notifications should be displayed
OSNotificationPermission
/ NOTE: provisional permission is only available in iOS 12
OSSession

Typedefs

EmailSubscriptionChangeHandler = void Function(OSEmailSubscriptionStateChanges changes)
InAppMessageClickedHandler = void Function(OSInAppMessageAction action)
OpenedNotificationHandler = void Function(OSNotificationOpenedResult openedResult)
PermissionChangeHandler = void Function(OSPermissionStateChanges changes)
ReceivedNotificationHandler = void Function(OSNotification notification)
SubscriptionChangedHandler = void Function(OSSubscriptionStateChanges changes)