MethodChannelAppsonairFlutterAppPush class

Method-channel implementation of AppsonairFlutterAppPushPlatform.

Inheritance

Properties

eventChannel → EventChannel
The event channel used to receive the eventStream broadcast from the native side.
final
eventStream → Stream<Map<Object?, Object?>>
Broadcast stream of raw native events (token updates, notifications, permission changes, etc.), bridged into the public AppPushService API.
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
methodChannel → MethodChannel
The method channel used to invoke request/response calls on the native side.
final
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.
override
addAliases(Map<String, String> aliases) → Future<void>
Associates multiple external identifier aliases at once.
override
addEmail(String address) → Future<void>
Adds an email channel for this device.
override
addTag(String key, String value) → Future<void>
Adds or updates a single key/value tag for audience segmentation.
override
addTags(Map<String, String> tags) → Future<void>
Adds or updates multiple tags at once.
override
clearAllNotifications() → Future<void>
Removes every notification this app has posted.
override
completeNotificationDisplay(String eventId, bool discard) → Future<void>
Resolves a pending notificationWillDisplay event, telling the native side whether to show (discard false) or suppress (discard true) the system notification.
override
getDeviceId() → Future<String?>
Fetches the AppsOnAir-assigned device ID.
override
getLanguage() → Future<String>
Fetches the current language override, or the detected device language.
override
getLogLevel() → Future<String>
Fetches the SDK's current logging verbosity.
override
getTags() → Future<Map<String, String>>
Fetches the backend's copy of this device's tags.
override
initialize({String appId = '', bool debug = false, bool swizzle = true}) → Future<void>
Initializes the native SDK. appId is kept only for source compatibility — the app ID is read from native platform configuration. debug is a deprecated shortcut for verbose logging. swizzle is iOS-only.
override
isPermissionGranted() → Future<bool>
Whether the notification permission is currently granted.
override
login(String externalId) → Future<void>
Associates the device with a known user after sign-in.
override
logout() → Future<void>
Clears the current user identity, tags, and aliases — the device reverts to anonymous.
override
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+).
override
notificationsClearAll() → Future<void>
Removes all delivered notifications from the notification shade / Notification Center.
override
notificationsPermission() → Future<bool>
Current notification permission state.
override
notificationsRequestPermission({bool fallbackToSettings = false}) → Future<void>
Requests notification permission. If fallbackToSettings is true and permission was denied, opens the app's system Settings page instead of showing a dialog that would no-op.
override
pushSubscriptionGetToken() → Future<String?>
Fetches the device's current push token — FCM token (Android) or hex APNs token (iOS). Null until registered.
override
pushSubscriptionIsOptedIn() → Future<bool>
Whether the device is currently opted in to receive pushes.
override
pushSubscriptionOptIn() → Future<void>
Resumes push delivery to this device.
override
pushSubscriptionOptOut() → Future<void>
Pauses push delivery to this device without touching OS-level permission.
override
registerForProvisionalAuthorization() → Future<void>
iOS only. No-op on Android.
override
removeAlias(String label) → Future<void>
Removes an alias by label.
override
removeAliases(List<String> labels) → Future<void>
Removes multiple aliases by label.
override
removeEmail(String address) → Future<void>
Removes an email channel from this device.
override
removeGroupedNotifications(String groupKey) → Future<void>
Android only. Removes every notification belonging to groupKey. No-op on iOS (no grouped-notification concept).
override
removeNotification(String id) → Future<void>
Removes a single delivered notification by its payload notification_id.
override
removeTag(String key) → Future<void>
Removes a single tag by key.
override
removeTags(List<String> keys) → Future<void>
Removes multiple tags by key.
override
setConsentGiven(bool value) → Future<void>
Records whether the user has given (true) or withdrawn (false) consent.
override
setConsentRequired(bool value) → Future<void>
Gates all data collection on explicit consent. Set before initialize so it applies on the very first launch.
override
setLanguage(String code) → Future<void>
Overrides the device language used for server-side notification translation (e.g. "fr", "en-US").
override
setLogLevel(String level) → Future<void>
Sets the SDK's logging verbosity. Default is LogLevel.none.
override
toString() → String
A string representation of this object.
inherited
userGetExternalId() → Future<String?>
Fetches the external identifier set by login, null when anonymous.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited