KletsoAppNotification class final

app.notify: a proactive notification for the host app. Rendered by the SDK's notification host (banner/toast/alert), handed to the OS tray through the host's system notifier, or silent (open the chat / run the action only). Never a chat message; the same envelope may also arrive in a push payload under the kletso key.

Inheritance

Constructors

KletsoAppNotification({required String notificationId, required String title, String? body, KletsoNotificationChannel channel = KletsoNotificationChannel.banner, bool openChat = false, KletsoAction? action, Object? rawSurface, Duration? ttl, String? imageUrl, JsonMap data = const <String, Object?>{}})
Creates the payload.
const

Properties

action → KletsoAction?
Optional tap action: local, url or agent.
final
body → String?
Optional body text.
final
channel → KletsoNotificationChannel
Presentation channel.
final
data → JsonMap
Opaque host data.
final
hashCode → int
The hash code for this object.
no setterinherited
imageUrl → String?
Optional image.
final
notificationId → String
Stable id (ntf_…); the client dedupes on it.
final
openChat → bool
Open the chat when tapped (immediately for KletsoNotificationChannel.silent).
final
rawSurface → Object?
Optional inline kletso.ui/v1 surface shown in banners and alerts.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
title → String
Headline.
final
ttl → Duration?
Auto-dismiss for banner/toast.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseSurface({Set<String> knownTypes = const <String>{}}) → KletsoSurfaceResult?
Validates the inline surface, if any.
toJson() → JsonMap
Wire form of data (for fakes and tests).
toString() → String
A string representation of this object.
inherited

Operators

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