NexusPlatform class abstract
The native surface of the SDK: device/app context and (native-backed) session replay capture. Platform implementations (Kotlin/Swift/web) provide these; the pure-Dart services (events, errors, logs, realtime, …) work without native code.
- Inheritance
-
- Object
- PlatformInterface
- NexusPlatform
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
configureCrashReporting(
bool enabled) → Future< void> - Install (or remove) the native uncaught-exception / signal handlers that persist crashes for forwarding on the next launch. No-op where unsupported.
-
deviceInfo(
) → Future< Map< String, Object?> > - Device + OS + app context (osType, osVersion, deviceModel, appVersion, …).
-
endLiveActivity(
int id) → Future< void> - Remove an Android live ongoing notification (end of a live activity).
-
getPlatformVersion(
) → Future< String?> -
liveActivityEnd(
{required String activityId, Map< String, dynamic> ? finalContentState}) → Future<void> - End a running iOS Live Activity.
-
liveActivityObservePushToStart(
String activityType) → Future< void> - Observe push-to-start tokens (iOS 17.2+) for an activity type; tokens are delivered via onLiveActivityToken.
-
liveActivityStart(
{required String activityId, required String activityType, required Map< String, dynamic> contentState, Map<String, dynamic> ? attributes}) → Future<void> - Start an iOS Live Activity (ActivityKit) with the turn-key default attributes. The native side registers its update token via onLiveActivityToken.
-
liveActivityUpdate(
{required String activityId, required Map< String, dynamic> contentState}) → Future<void> - Update a running iOS Live Activity's content state.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onLiveActivityToken(
void sink(Map< String, dynamic> info)) → void -
Register a sink for ActivityKit tokens.
infocarries{ kind: 'pushToStart'|'update', activityType?, activityId?, token }. -
onNotificationTap(
void sink(Map< String, dynamic> info)) → void -
Register a sink for taps on notifications posted via showNotification.
Receives the decoded
payloadmap so the caller can attribute the open. -
onReplayBatch(
void sink(String recordingId, List< Object?> events)) → void - Register a sink for batches of replay events pushed up from native.
-
showLiveActivity(
{required int id, required String channelId, required String channelName, String? title, String? body, String? subText, int? progress, bool indeterminate = false, bool ongoing = true, String? payload}) → Future< bool> -
Post or update an Android live ongoing notification (the Android equivalent
of an iOS Live Activity). Uses a promoted Live Update (ProgressStyle) on
Android 16+, a normal ongoing notification with a progress bar otherwise.
Returns
trueif shown. -
showNotification(
{required int id, String? title, String? body, required String channelId, required String channelName, String? payload, String? largeIcon, String? bigPicture, String? smallIcon, String? visibility, String? accentColor, List< Map< ? buttons}) → Future<String, String?> >bool> -
Post a notification from native code (used to render foreground pushes on
Android, since FCM does not draw one while the app is open). Returns
trueif it was shown. No-op /falsewhere unsupported.payloadis stashed on the tap intent and delivered back via onNotificationTap. -
startReplay(
String recordingId) → Future< void> -
Begin native session-replay capture for
recordingId. No-op where the native SDK isn't present (web/desktop today). -
stopReplay(
) → Future< void> - Stop native session-replay capture.
-
takePendingCrashes(
) → Future< List< Map< >String, Object?> > -
Return and clear native crashes persisted since the last launch. Each map:
{ type, message, stack (frames or string), platform, timestamp }. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ NexusPlatform
-
getter/setter pair