AppsonairFlutterAppPushPlatform class abstract
The interface that platform-specific implementations of this plugin must implement.
App developers should use the public AppPushService API instead of this
class directly; it exists so the plugin can be backed by a method-channel
implementation (the default, MethodChannelAppsonairFlutterAppPush)
or a different implementation for testing.
- Inheritance
-
- Object
- PlatformInterface
- AppsonairFlutterAppPushPlatform
- Implementers
Constructors
- AppsonairFlutterAppPushPlatform()
-
Constructs a platform interface instance, verified via
PlatformInterface.verifyToken.
Properties
-
eventStream
→ Stream<
Map< Object?, Object?> > -
Broadcast stream of raw native events (token updates, notifications,
permission changes, etc.), bridged into the public
AppPushServiceAPI.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addAlias(
String label, String id) → Future< void> - Associates an external identifier alias (e.g. a CRM ID) with this device.
-
addAliases(
Map< String, String> aliases) → Future<void> - Associates multiple external identifier aliases at once.
-
addEmail(
String address) → Future< void> - Adds an email channel for this device.
-
addTag(
String key, String value) → Future< void> - Adds or updates a single key/value tag for audience segmentation.
-
addTags(
Map< String, String> tags) → Future<void> - Adds or updates multiple tags at once.
-
clearAllNotifications(
) → Future< void> - Removes every notification this app has posted.
-
completeNotificationDisplay(
String eventId, bool discard) → Future< void> -
Resolves a pending
notificationWillDisplayevent, telling the native side whether to show (discardfalse) or suppress (discardtrue) the system notification. -
getDeviceId(
) → Future< String?> - Fetches the AppsOnAir-assigned device ID.
-
getLanguage(
) → Future< String> - Fetches the current language override, or the detected device language.
-
getLogLevel(
) → Future< String> - Fetches the SDK's current logging verbosity.
-
getTags(
) → Future< Map< String, String> > - Fetches the backend's copy of this device's tags.
-
initialize(
{String appId = '', bool debug = false, bool swizzle = true}) → Future< void> -
Initializes the native SDK.
appIdis kept only for source compatibility — the app ID is read from native platform configuration.debugis a deprecated shortcut for verbose logging.swizzleis iOS-only. -
isPermissionGranted(
) → Future< bool> - Whether the notification permission is currently granted.
-
login(
String externalId) → Future< void> - Associates the device with a known user after sign-in.
-
logout(
) → Future< void> - Clears the current user identity, tags, and aliases — the device reverts to anonymous.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notificationsCanRequestPermission(
) → Future< bool> - Whether the system will show the permission dialog if notificationsRequestPermission is called (false if permanently denied — Android 13+).
-
notificationsClearAll(
) → Future< void> - Removes all delivered notifications from the notification shade / Notification Center.
-
notificationsPermission(
) → Future< bool> - Current notification permission state.
-
notificationsRequestPermission(
{bool fallbackToSettings = false}) → Future< void> -
Requests notification permission. If
fallbackToSettingsis true and permission was denied, opens the app's system Settings page instead of showing a dialog that would no-op. -
pushSubscriptionGetToken(
) → Future< String?> - Fetches the device's current push token — FCM token (Android) or hex APNs token (iOS). Null until registered.
-
pushSubscriptionIsOptedIn(
) → Future< bool> - Whether the device is currently opted in to receive pushes.
-
pushSubscriptionOptIn(
) → Future< void> - Resumes push delivery to this device.
-
pushSubscriptionOptOut(
) → Future< void> - Pauses push delivery to this device without touching OS-level permission.
-
registerForProvisionalAuthorization(
) → Future< void> - iOS only. No-op on Android.
-
removeAlias(
String label) → Future< void> - Removes an alias by label.
-
removeAliases(
List< String> labels) → Future<void> - Removes multiple aliases by label.
-
removeEmail(
String address) → Future< void> - Removes an email channel from this device.
-
removeGroupedNotifications(
String groupKey) → Future< void> -
Android only. Removes every notification belonging to
groupKey. No-op on iOS (no grouped-notification concept). -
removeNotification(
String id) → Future< void> -
Removes a single delivered notification by its payload
notification_id. -
removeTag(
String key) → Future< void> - Removes a single tag by key.
-
removeTags(
List< String> keys) → Future<void> - Removes multiple tags by key.
-
setConsentGiven(
bool value) → Future< void> -
Records whether the user has given (
true) or withdrawn (false) consent. -
setConsentRequired(
bool value) → Future< void> - Gates all data collection on explicit consent. Set before initialize so it applies on the very first launch.
-
setLanguage(
String code) → Future< void> -
Overrides the device language used for server-side notification
translation (e.g.
"fr","en-US"). -
setLogLevel(
String level) → Future< void> -
Sets the SDK's logging verbosity. Default is
LogLevel.none. -
toString(
) → String -
A string representation of this object.
inherited
-
userGetExternalId(
) → Future< String?> -
Fetches the external identifier set by login,
nullwhen anonymous.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ AppsonairFlutterAppPushPlatform
-
The default instance of AppsonairFlutterAppPushPlatform used
by the plugin. Defaults to MethodChannelAppsonairFlutterAppPush.
getter/setter pair