InvergeDocs
FlutterAPI reference

Nexus & setup

Nexus & setup in the Flutter SDK.

import 'package:nexus_flutter/nexus.dart';
SymbolKindSummary
NexusclassThe Nexus umbrella SDK — one entry point for every service.
NexusDeepLinkHandlertypedefDecide what to do with a Nexus deep link.
NexusConfigclassConfiguration for Nexus.init.
NexusLogLevelenumVerbosity of the SDK's diagnostic logging.
NexusLogSinktypedefA custom log sink — receive every record the SDK emits (e.g.
NexusLogclassCentral, leveled logger for the SDK.
NexusScopeclassMakes the initialised Nexus available through the widget tree, and — when session replay is enabled — installs the RepaintBoundary + pointer listener the recorder captures from.
NexusBuildContextextensioncontext.nexus — access the SDK from any widget.
NexusPlatformabstract classThe native surface of the SDK: device/app context and (native-backed) session replay capture.

Nexus

class

The Nexus umbrella SDK — one entry point for every service. Initialise once at startup; then use any service, all correlated to the same journey session:

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Nexus.init(const NexusConfig(apiKey: 'nxs_...'));
  runApp(NexusScope(child: MyApp()));
}

// anywhere with a BuildContext:
context.nexus.events.track('order_placed');
context.nexus.realtime.join('orders:42');
View source

init()

static method
static Future<Nexus> init(NexusConfig config)

Initialise the SDK once at startup. Re-calling disposes the previous instance and replaces it.

Parameters

Prop

Type

Returns Future<Nexus>

View source

instance

static property
static Nexus get instance

The app-wide instance. Throws if init hasn't run.

View source

isInitialized

static property
static bool get isInitialized
View source

distinctId

property
String? get distinctId
View source

sessionKey

property
String get sessionKey
View source

pendingUploads

property
int get pendingUploads

Number of telemetry requests awaiting delivery (queued/offline).

View source

config

field
final NexusConfig config
View source

sessions

field
final NexusSessions sessions
View source

events

field
final NexusEvents events
View source

errors

field
final NexusErrors errors
View source

logs

field
final NexusLogs logs
View source

flags

field
final NexusFlags flags
View source field
final NexusLinks links
View source

realtime

field
final NexusRealtime realtime
View source

replay

field
final NexusReplay replay
View source

surveys

field
final NexusSurveys surveys
View source

remoteConfig

field
final NexusRemoteConfig remoteConfig
View source

push

field
final NexusPush push
View source

inApp

field
final NexusInApp inApp
View source

liveActivity

field
final NexusLiveActivity liveActivity
View source

voice

field
final NexusVoice voice
View source

identify()

method
Future<void> identify(String distinctId, {String? email, String? name, String? phone, Map<String, Object?>? traits})

Identify the current end-user (shorthand for sessions.identify).

Parameters

Prop

Type

View source

reset()

method
Future<void> reset()

Forget the current user and start a fresh session (e.g. on logout). Also clears the persisted identity so the next launch starts anonymous.

View source

trackScreen()

method
void trackScreen(String name)

Record a screen/page change for session replay's Pages tab. Wire NexusNavigatorObserver into navigatorObservers to do this automatically.

Parameters

Prop

Type

View source

observeRouter()

method
void observeRouter(Listenable router, String Function() currentPath)

Track navigation from a Listenable router (e.g. GoRouter's routerDelegate) — catches shell/nested routes a root observer misses. See NexusReplay.observeRouter.

Parameters

Prop

Type

View source

flush()

method
Future<void> flush()

Flush all buffered telemetry into the outbox and try to deliver it now (call before the app is backgrounded/killed).

View source

dispose()

method
void dispose()

Tear down the instance (timers, socket, http).

View source

NexusDeepLinkHandler

typedef
typedef NexusDeepLinkHandler = FutureOr<bool> Function(NexusDeepLink link)

Decide what to do with a Nexus deep link. Return true when the app handled the navigation itself; false lets the SDK route to NexusDeepLink.path.

View source

NexusConfig

class

Configuration for Nexus.init.

View source

NexusConfig

constructor
const NexusConfig({required this.apiKey, this.baseUrl = 'https://services.inverge.net', this.realtimeUrl, this.autoTrackSessions = true, this.autoCaptureErrors = true, this.autoConnectRealtime = false, this.manageRealtimeWithLifecycle = true, this.flushOnBackground = true, this.flushInterval = const Duration(seconds: 10), this.maxBatch = 50, this.logging = false, this.logLevel, this.onLog, this.replayEnabled = false, this.replayInterval = const Duration(milliseconds: 1000), this.replayPixelRatio = 1.0, this.replayMaskTextFields = true, this.replayCaptureConsole = true, this.replayCaptureNetwork = true, this.surveysEnabled = false, this.surveyAutoShow = true, this.inAppEnabled = false, this.inAppAutoShow = true, this.autoShowOverlay = true, this.liveActivityEnabled = false, this.voiceEnabled = false, this.remoteConfigEnabled = false, this.remoteConfigRealtime = false, this.remoteConfigDefaults = const {}, this.pushEnabled = false, this.pushAutoRequestPermission = true, this.pushWebVapidKey, this.pushForegroundDisplay = true, this.pushAndroidChannelId = 'nexus_default', this.pushAndroidChannelName = 'Notifications', this.linksEnabled = true, this.linkDomains = const [], this.autoRouteDeepLinks = true, this.onDeepLink, this.appVersion, this.defaultProperties = const {}})

Parameters

Prop

Type

View source

resolvedLogLevel

property
NexusLogLevel get resolvedLogLevel

Effective log level: explicit logLevel, else debug when logging is on, else warn.

View source

httpBase

property
String get httpBase
View source

socketBase

property
String get socketBase
View source

apiKey

field
final String apiKey

Tenant API key (nxs_...). Sent as x-api-key on HTTP and in the socket handshake auth.

View source

baseUrl

field
final String baseUrl

Control-plane / data-plane origin. Partner endpoints live under /partner.

View source

realtimeUrl

field
final String? realtimeUrl

Realtime (Socket.IO) origin. Defaults to baseUrl when null.

View source

autoTrackSessions

field
final bool autoTrackSessions

Start (and keep alive) a journey session automatically. Default true.

View source

autoCaptureErrors

field
final bool autoCaptureErrors

Install a Flutter error handler that reports uncaught errors. Default true.

View source

autoConnectRealtime

field
final bool autoConnectRealtime

Open the realtime (Socket.IO) connection automatically at startup, right after the session is established — so the user is live without a manual nexus.realtime.connect(). Rooms are still joined via nexus.realtime.join(...). Default false (realtime connection-minutes are billed — opt in). Works with manageRealtimeWithLifecycle.

View source

manageRealtimeWithLifecycle

field
final bool manageRealtimeWithLifecycle

Gracefully disconnect realtime when the app is backgrounded and reconnect (rejoining rooms) on foreground. This makes billed connection-minutes accurate — the app isn't charged while suspended. Default true.

View source

flushOnBackground

field
final bool flushOnBackground

Flush queued telemetry when the app is backgrounded (so nothing is lost if the OS kills the app). Default true.

View source

flushInterval

field
final Duration flushInterval

How often batched telemetry (events/logs) is flushed. Default 10s.

View source

maxBatch

field
final int maxBatch

Max items per batch flush. Default 50.

View source

logging

field
final bool logging

Shorthand for verbose logging: true maps to NexusLogLevel.debug. Prefer logLevel for finer control. Default false.

View source

logLevel

field
final NexusLogLevel? logLevel

Diagnostic log verbosity. When null, falls back to logging (debug if on) and otherwise NexusLogLevel.warn — so failed requests and dropped telemetry are always visible, while the happy path stays quiet.

View source

onLog

field
final NexusLogSink? onLog

Optional sink to receive every log record (in addition to debugPrint), e.g. to forward SDK diagnostics into your own logging.

View source

replayEnabled

field
final bool replayEnabled

Record session replay: periodic screenshots of the app + pointer events, shipped as rrweb frames. Requires wrapping the app in NexusScope. Wrap sensitive widgets in NexusMask to redact them. Default false (billed / privacy-sensitive — opt in explicitly).

View source

replayInterval

field
final Duration replayInterval

How often a replay frame is captured. Lower = smoother but more data/CPU. Default 1s. Identical consecutive frames are dropped automatically.

View source

replayPixelRatio

field
final double replayPixelRatio

Capture resolution as a multiple of logical pixels. 1.0 ≈ device-independent resolution (small, fast); raise toward MediaQuery.devicePixelRatio for crisper frames, lower (e.g. 0.75) to shrink payloads. Default 1.0.

View source

replayMaskTextFields

field
final bool replayMaskTextFields

Automatically redact every text input (anything backed by EditableText — TextField, TextFormField, CupertinoTextField, SelectableText) from replay frames, so typed content (passwords, PII) is never captured. On by default; use NexusMask for finer control. Set false to opt out.

View source

replayCaptureConsole

field
final bool replayCaptureConsole

Tee the app's debugPrint output into the replay stream so it shows in the player's Console tab (mirrors rrweb's console plugin). SDK-internal [Nexus] lines are skipped. On by default; set false to opt out.

View source

replayCaptureNetwork

field
final bool replayCaptureNetwork

Automatically capture HTTP requests for the player's Network tab via HttpOverrides — covers both Dio and package:http (any dart:io client) with no wiring. Requests to the Nexus API are excluded. On by default (no effect on web — use a Dio interceptor there). Set false to opt out (e.g. if the app installs its own HttpOverrides).

View source

surveysEnabled

field
final bool surveysEnabled

Fetch eligible in-product surveys at startup (and on foreground). Requires NexusSurveyOverlay in your MaterialApp.builder to display them. Default false (billed per response — opt in).

View source

surveyAutoShow

field
final bool surveyAutoShow

Automatically show eligible popover/banner surveys (and event-triggered ones on events.track). Set false to present surveys manually via nexus.surveys.show(...). Default true.

View source

inAppEnabled

field
final bool inAppEnabled

Fetch in-app messages at startup (and on foreground) and show them via the NexusInAppOverlay. Default false — opt in.

View source

inAppAutoShow

field
final bool inAppAutoShow

Automatically show a triggered in-app message (session start / event). Set false to present manually via nexus.inApp.show(...). Default true.

View source

autoShowOverlay

field
final bool autoShowOverlay

Auto-mount the survey + in-app overlays without touching MaterialApp.builder (the SDK inserts them into the app's root overlay). Default true. Set false to mount NexusSurveyOverlay / NexusInAppOverlay yourself.

View source

liveActivityEnabled

field
final bool liveActivityEnabled

Enable Live Activities: iOS receives ActivityKit push updates (Lock Screen / Dynamic Island); Android renders a live ongoing notification from the server's data message. Drive them from the dashboard/API or via nexus.liveActivity. Default false.

View source

voiceEnabled

field
final bool voiceEnabled

Enable Nexus Voice (CPaaS calling). Exposes nexus.voice — place/answer calls, in-call controls, DTMF, quality. Register a media engine (WebRTC) and optionally CallKit to actually carry audio / show the native call UI. Default false.

View source

pushEnabled

field
final bool pushEnabled

Fetch Remote Config at startup (and on foreground). Read values via nexus.remoteConfig.getString(...) etc. Default false (billed per fetch — opt in). Set in-app fallbacks with remoteConfigDefaults. Turn-key push notifications. When true, the SDK requests permission, obtains the device's FCM token, registers it with Nexus, re-registers on refresh, and reports notification opens — all automatically. You only need the platform Firebase config (google-services.json / GoogleService-Info.plist). Default false.

View source

pushAutoRequestPermission

field
final bool pushAutoRequestPermission

Ask the OS for notification permission when push is enabled. Default true; set false to request it yourself at a better moment (then the token is registered on the next launch, or call nexus.push.start()).

View source

pushWebVapidKey

field
final String? pushWebVapidKey

Web only — the VAPID public key for FCM web push. Required to obtain a web token; ignored on iOS/Android.

View source

pushForegroundDisplay

field
final bool pushForegroundDisplay

Display notifications while the app is in the foreground. FCM does not draw a notification when the app is open — on Android nothing shows unless the app renders it, and on iOS the banner is suppressed by default. With this true (default) the SDK shows it for you: a native banner on iOS and a local notification on Android, tap-attributed like a background open. Set false if you handle FirebaseMessaging.onMessage yourself.

View source

pushAndroidChannelId

field
final String pushAndroidChannelId

Android channel id used for foreground notifications the SDK displays. Match your server-side android.notification.channel_id to keep foreground and background notifications on one channel. Default nexus_default.

View source

pushAndroidChannelName

field
final String pushAndroidChannelName

Human-readable name for pushAndroidChannelId, shown in Android system settings. Default Notifications.

View source

linksEnabled

field
final bool linksEnabled

Nexus Links, automatically: report the install on first launch (with the Google Play install referrer on Android, for an exact match), report every app open that came from a Nexus link, and route the user to the link's deep-link value. No code needed. Default true.

View source

linkDomains

field
final List<String> linkDomains

Extra hosts that serve your Nexus short links (a branded domain). The baseUrl host is always included.

View source field
final bool autoRouteDeepLinks

Navigate to a link's deep-link value when the app's router could not have seen it itself: after an install (deferred deep link) and when the app was opened by the short link directly (App Links / Universal Links). The SDK delivers it as a platform deep link, so go_router, auto_route or a plain Navigator route it exactly like one. Default true.

View source field
final NexusDeepLinkHandler? onDeepLink

Called for every Nexus deep link before the SDK routes it — return true to take over (e.g. hold it until after login; see NexusLinks.consumePending).

View source

remoteConfigEnabled

field
final bool remoteConfigEnabled
View source

remoteConfigRealtime

field
final bool remoteConfigRealtime

Subscribe to realtime Remote Config updates: when a new template is published, the app re-fetches automatically (Firebase Realtime RC). Needs a realtime connection (see autoConnectRealtime). Default false.

View source

remoteConfigDefaults

field
final Map<String, Object?> remoteConfigDefaults

In-app default Remote Config values, used until/unless the server provides a value for a key. Mirrors Firebase setDefaults.

View source

appVersion

field
final String? appVersion

App version reported with telemetry (e.g. from package_info). Optional.

View source

defaultProperties

field
final Map<String, Object?> defaultProperties

Properties merged into every event's/person's context.

View source

NexusLogLevel

enum
enum NexusLogLevel

Verbosity of the SDK's diagnostic logging.

Higher levels include everything below them. The default is warn — silent in the happy path, but surfacing dropped telemetry / failed requests so problems (like a rejected session) never fail silently. Set NexusConfig(logLevel: NexusLogLevel.debug) (or logging: true) to trace every request while integrating.

ValueDescription
NexusLogLevel.none
NexusLogLevel.error
NexusLogLevel.warn
NexusLogLevel.info
NexusLogLevel.debug
View source

NexusLogSink

typedef
typedef NexusLogSink = void Function(NexusLogLevel level, String message, [Object? error, StackTrace? stackTrace])

A custom log sink — receive every record the SDK emits (e.g. to forward it into your own logging, or into Nexus Logs). Set via NexusConfig.onLog.

View source

NexusLog

class

Central, leveled logger for the SDK. Configured once from NexusConfig at Nexus.init; every component logs through the static methods so output is consistent ([Nexus] HH:mm:ss.SSS LEVEL message) and centrally gated.

Uses debugPrint (rate-limited, not stripped in profile builds) rather than print, and additionally fans out to an optional NexusLogSink.

View source

configure()

static method
static void configure({NexusLogLevel? level, NexusLogSink? sink})

Apply configuration from NexusConfig. Called at the start of init.

Parameters

Prop

Type

View source

error()

static method
static void error(String message, [Object? error, StackTrace? stackTrace])

Parameters

Prop

Type

View source

warn()

static method
static void warn(String message)

Parameters

Prop

Type

View source

info()

static method
static void info(String message)

Parameters

Prop

Type

View source

debug()

static method
static void debug(String message)

Parameters

Prop

Type

View source

mask()

static method
static String mask(String secret)

Mask a secret for logs: keep a readable prefix + last 4 chars.

Parameters

Prop

Type

Returns String

View source

level

static field
static NexusLogLevel level

Active level. Below this, calls are cheap no-ops.

View source

sink

static field
static NexusLogSink? sink

Optional extra sink (in addition to debugPrint).

View source

NexusScope

class
class NexusScope extends StatelessWidget

Makes the initialised Nexus available through the widget tree, and — when session replay is enabled — installs the RepaintBoundary + pointer listener the recorder captures from. Optional for access (context.nexus falls back to the global Nexus.instance), but required for replay.

runApp(NexusScope(child: MyApp()));
View source

NexusScope

constructor
const NexusScope({super.key, this.nexus, required this.child})

Parameters

Prop

Type

View source

of()

static method
static Nexus of(BuildContext context)

Parameters

Prop

Type

Returns Nexus

View source

nexus

field
final Nexus? nexus

Override instance (e.g. in tests). Defaults to Nexus.instance.

View source

child

field
final Widget child
View source

NexusBuildContext

extension
extension NexusBuildContext on BuildContext

context.nexus — access the SDK from any widget.

View source

nexus

property
Nexus get nexus

The app-wide Nexus instance. Use it as context.nexus.realtime, context.nexus.events, context.nexus.errors, …

View source

NexusPlatform

abstract class
abstract class NexusPlatform extends PlatformInterface

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.

View source

NexusPlatform

constructor
NexusPlatform()
View source

instance

static property
static NexusPlatform get instance
View source

getPlatformVersion()

method
Future<String?> getPlatformVersion()

Returns Future<String?>

View source

deviceInfo()

method
Future<Map<String, Object?>> deviceInfo()

Device + OS + app context (osType, osVersion, deviceModel, appVersion, …).

Returns Future<Map<String, Object?>>

View source

startReplay()

method
Future<void> startReplay(String recordingId)

Begin native session-replay capture for recordingId. No-op where the native SDK isn't present (web/desktop today).

Parameters

Prop

Type

View source

stopReplay()

method
Future<void> stopReplay()

Stop native session-replay capture.

View source

onReplayBatch()

method
void onReplayBatch(void Function(String recordingId, List<Object?> events) sink)

Register a sink for batches of replay events pushed up from native.

Parameters

Prop

Type

View source

configureCrashReporting()

method
Future<void> configureCrashReporting(bool enabled)

Install (or remove) the native uncaught-exception / signal handlers that persist crashes for forwarding on the next launch. No-op where unsupported.

Parameters

Prop

Type

View source

takePendingCrashes()

method
Future<List<Map<String, Object?>>> takePendingCrashes()

Return and clear native crashes persisted since the last launch. Each map: { type, message, stack (frames or string), platform, timestamp }.

Returns Future<List<Map<String, Object?>>>

View source

showNotification()

method
Future<bool> 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<String, String?>>? buttons})

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 true if it was shown. No-op / false where unsupported. payload is stashed on the tap intent and delivered back via onNotificationTap.

Parameters

Prop

Type

Returns Future<bool>

View source

onNotificationTap()

method
void onNotificationTap(void Function(Map<String, dynamic> data) sink)

Register a sink for taps on notifications posted via showNotification. Receives the decoded payload map so the caller can attribute the open.

Parameters

Prop

Type

View source

linksTakePending()

method
Future<List<String>> linksTakePending()

Deep links (Nexus links). Native code sees every URL that opens the app before Flutter does; it queues them until Dart asks, so a cold-start link is never lost to the engine starting first. Returns the queued URLs and switches native to live delivery via onLinkOpened.

Returns Future<List<String>>

View source

onLinkOpened()

method
void onLinkOpened(void Function(String url) sink)

Register a sink for links opened while the app is running.

Parameters

Prop

Type

View source

linksConfigure()

method
Future<void> linksConfigure(List<String> hosts)

Tell native which hosts serve Nexus short links, so it can consume them (keep them away from the app's router) on the NEXT cold start too.

Parameters

Prop

Type

View source

installReferrer()

method
Future<String?> installReferrer()

Android only: the Google Play install referrer (e.g. link_click_id=…), or null where unavailable (iOS, sideloaded, not yet installed via Play).

Returns Future<String?>

View source

showLiveActivity()

method
Future<bool> 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})

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 true if shown.

Parameters

Prop

Type

Returns Future<bool>

View source

endLiveActivity()

method
Future<void> endLiveActivity(int id)

Remove an Android live ongoing notification (end of a live activity).

Parameters

Prop

Type

View source

showLiveActivityTemplate()

method
Future<bool> showLiveActivityTemplate({required int id, required Map<String, dynamic> payload})

Render a Nexus Live Activity template on Android: a promoted Live Update (ProgressStyle — segments/points/tracker icon, status chip, ETA countdown) on Android 16+, an ongoing notification with a progress bar otherwise. payload is { event, activityId, template, data }. Returns true if shown.

Parameters

Prop

Type

Returns Future<bool>

View source

liveActivityCacheImages()

method
Future<void> liveActivityCacheImages(List<String> urls)

iOS: download template images into the App Group so the widget can show them.

Parameters

Prop

Type

View source

liveActivityStart()

method
Future<void> liveActivityStart({required String activityId, required String activityType, required Map<String, dynamic> contentState, Map<String, dynamic>? attributes, Map<String, dynamic>? template})

Start an iOS Live Activity (ActivityKit) with the turn-key default attributes. The native side registers its update token via onLiveActivityToken.

Parameters

Prop

Type

View source

liveActivityUpdate()

method
Future<void> liveActivityUpdate({required String activityId, required Map<String, dynamic> contentState})

Update a running iOS Live Activity's content state.

Parameters

Prop

Type

View source

liveActivityEnd()

method
Future<void> liveActivityEnd({required String activityId, Map<String, dynamic>? finalContentState})

End a running iOS Live Activity.

Parameters

Prop

Type

View source

liveActivityObservePushToStart()

method
Future<void> liveActivityObservePushToStart(String activityType)

Start observing ActivityKit: push-to-start tokens (iOS 17.2+), push-started activities' update tokens, and diagnostics — all via onLiveActivityToken.

Parameters

Prop

Type

View source

onLiveActivityToken()

method
void onLiveActivityToken(void Function(Map<String, dynamic> info) sink)

Register a sink for ActivityKit tokens. info carries { kind: 'pushToStart'|'update', activityType?, activityId?, token } or a diagnostic { kind: 'status', event, … }.

Parameters

Prop

Type

View source

voiceRegisterAccount()

method
Future<void> voiceRegisterAccount()

Register the self-managed phone account so the OS routes our calls through the native call UI. Call once at startup. No-op where unsupported.

View source

voiceReportIncoming()

method
Future<void> voiceReportIncoming({required String callId, required String from, String? displayName, String? avatarUrl, bool hasVideo = false})

Ask the OS to ring callId in the SYSTEM call UI (over the lock screen). The call is answered NATIVELY — the app is never forced open.

Parameters

Prop

Type

View source

voiceEndCall()

method
Future<void> voiceEndCall(String callId)

End a native call (local hangup / remote-left) so the system UI clears.

Parameters

Prop

Type

View source

voiceMissedCall()

method
Future<void> voiceMissedCall({required String callId, required String from, String? displayName, String? avatarUrl})

The caller cancelled before we answered — clear the ring and leave a "Missed call" notification, like a native phone call.

Parameters

Prop

Type

View source

onNativeCallEvent()

method
void onNativeCallEvent(void Function(String action, String callId) sink)

Register a sink for native call actions the user took in the SYSTEM UI. action is answer | reject | disconnect; callId identifies the call.

Parameters

Prop

Type

View source

voiceReportOutgoing()

method
Future<void> voiceReportOutgoing({required String callId, required String to, String? displayName})

Start a native OUTGOING call entry. iOS only in practice: under CallKit the audio session is activated only for a call the OS knows about, so an unreported outbound call has no audio. Android deliberately skips this (a self-managed outgoing Connection can auto-end and tear down a live call).

Parameters

Prop

Type

View source

voiceReportConnected()

method
Future<void> voiceReportConnected(String callId)

Tell the OS the call connected (starts its timer / active-call UI).

Parameters

Prop

Type

View source

voiceVoipToken()

method
Future<String?> voiceVoipToken()

The device's APNs VoIP (PushKit) token, registered with the Voice control plane so a killed app can be rung. Null off iOS / before the token arrives.

Returns Future<String?>

View source

onNativeCallControl()

method
void onNativeCallControl(void Function(String action, String callId, Object? value) sink)

Register a sink for in-call controls the user drove from the SYSTEM call UI (mute / hold / DTMF keypad). action is mute | hold | dtmf; value is the bool or digit string. iOS/CallKit only — Android's self-managed UI has no system in-call controls.

Parameters

Prop

Type

View source

onNativeCallAudioSession()

method
void onNativeCallAudioSession(void Function(bool active) sink)

Register a sink for the external call system's audio-session window (iOS CallKit didActivate/didDeactivate). The media engine may only run its audio engine while this is true.

Parameters

Prop

Type

View source

onNativeVoicePush()

method
void onNativeVoicePush(void Function(Map<String, dynamic> data) sink)

Register a sink for incoming-call payloads delivered natively (iOS APNs VoIP/PushKit). On Android the equivalent arrives as an FCM data message handled in Dart, so this never fires there.

Parameters

Prop

Type

View source

onNativeVoipToken()

method
void onNativeVoipToken(void Function(String token) sink)

Register a sink for APNs VoIP token updates (iOS PushKit).

Parameters

Prop

Type

View source

appIsForeground()

method
Future<bool> appIsForeground()

Whether the app is in the foreground. Answered authoritatively on iOS (UIApplication.applicationState), where a VoIP push can launch the app in the BACKGROUND and no permission dialog can be presented. Defaults to true where unimplemented, preserving the caller's normal behaviour.

Returns Future<bool>

View source

micPermissionStatus()

method
Future<String?> micPermissionStatus()

The OS microphone authorization: granted | denied | restricted | undetermined. Null where unimplemented (callers then fall back to permission_handler). iOS only — and necessary there because permission_handler cannot distinguish "never asked" from "refused".

Returns Future<String?>

View source

micRequestPermission()

method
Future<bool?> micRequestPermission()

Ask the OS for the microphone and return whether it was granted, using the platform's own API rather than a permission package. Null where unimplemented, so callers fall back to permission_handler. iOS only.

Returns Future<bool?>

View source

instance

static setter
static set instance(NexusPlatform instance)

Parameters

Prop

Type

View source

On this page

Nexusinit()instanceisInitializeddistinctIdsessionKeypendingUploadsconfigsessionseventserrorslogsflagslinksrealtimereplaysurveysremoteConfigpushinAppliveActivityvoiceidentify()reset()trackScreen()observeRouter()flush()dispose()NexusDeepLinkHandlerNexusConfigNexusConfigresolvedLogLevelhttpBasesocketBaseapiKeybaseUrlrealtimeUrlautoTrackSessionsautoCaptureErrorsautoConnectRealtimemanageRealtimeWithLifecycleflushOnBackgroundflushIntervalmaxBatchlogginglogLevelonLogreplayEnabledreplayIntervalreplayPixelRatioreplayMaskTextFieldsreplayCaptureConsolereplayCaptureNetworksurveysEnabledsurveyAutoShowinAppEnabledinAppAutoShowautoShowOverlayliveActivityEnabledvoiceEnabledpushEnabledpushAutoRequestPermissionpushWebVapidKeypushForegroundDisplaypushAndroidChannelIdpushAndroidChannelNamelinksEnabledlinkDomainsautoRouteDeepLinksonDeepLinkremoteConfigEnabledremoteConfigRealtimeremoteConfigDefaultsappVersiondefaultPropertiesNexusLogLevelNexusLogSinkNexusLogconfigure()error()warn()info()debug()mask()levelsinkNexusScopeNexusScopeof()nexuschildNexusBuildContextnexusNexusPlatformNexusPlatforminstancegetPlatformVersion()deviceInfo()startReplay()stopReplay()onReplayBatch()configureCrashReporting()takePendingCrashes()showNotification()onNotificationTap()linksTakePending()onLinkOpened()linksConfigure()installReferrer()showLiveActivity()endLiveActivity()showLiveActivityTemplate()liveActivityCacheImages()liveActivityStart()liveActivityUpdate()liveActivityEnd()liveActivityObservePushToStart()onLiveActivityToken()voiceRegisterAccount()voiceReportIncoming()voiceEndCall()voiceMissedCall()onNativeCallEvent()voiceReportOutgoing()voiceReportConnected()voiceVoipToken()onNativeCallControl()onNativeCallAudioSession()onNativeVoicePush()onNativeVoipToken()appIsForeground()micPermissionStatus()micRequestPermission()instance