NexusInApp class

In-app messages (OneSignal-style). Fetches the active messages for the tenant, evaluates triggers (session start / custom event) and frequency caps locally, requests display, and reports impressions/clicks. Rendering is done by NexusInAppOverlay (default UI) or your own widget driven by current.

Constructors

NexusInApp(NexusHttp _http, NexusIdentity _id, NexusConfig _cfg)

Properties

active → List<NexusInAppMessage>
All active in-app messages for the tenant.
no setter
current → ValueNotifier<NexusInAppMessage?>
The message currently requested to display (null when none). The overlay listens to this.
final
hashCode → int
The hash code for this object.
no setterinherited
onAction ↔ void Function(NexusInAppAction action)?
Called when a user taps a button (handle url / event actions yourself, e.g. navigate or launchUrl). Event-action buttons are also auto-tracked.
getter/setter pair
onTrackEvent ↔ void Function(String event)?
Wired by the SDK to the analytics track() for event-action buttons.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → void
Clear the message from the screen.
dismiss(NexusInAppMessage m) → void
Dismiss the current message (X / backdrop tap).
dispose() → void
fetch() → Future<List<NexusInAppMessage>>
Fetch the active messages; on success, auto-show a session-start message.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onEvent(String name) → void
Called when an analytics event fires — shows a message triggered by it.
show(NexusInAppMessage m) → void
Show a specific message now (bypasses trigger, still respects frequency).
tapButton(NexusInAppMessage m, NexusInAppButton b) → void
Handle a button tap: report the click, surface the action, auto-track event actions, then dismiss.
toString() → String
A string representation of this object.
inherited

Operators

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