AnalyticsOptions class
Analytics telemetry emitted as OpenTelemetry spans. Mirrors Android
ObservabilityOptions.Analytics.
taps and views map to the native analytics.taps / analytics.screenViews
publish gates on both iOS and Android. trackEvents gates the track span
emitted by the cross-platform Dart pipeline (web and mobile) as well as the
native Android span.
Constructors
- AnalyticsOptions({bool taps = true, bool views = true, bool trackEvents = true, bool appLifecycle = true, bool appLaunch = true, LDClickTargetResolver? customClickTargetResolver})
-
Creates analytics options; all analytics telemetry is on by default.
const
Properties
- appLaunch → bool
-
Whether to emit an
app_launchspan (carryingevent.launch_type—install/update/relaunch— and version fields) once per process launch. Mobile-only (iOS, Android); a no-op elsewhere. Defaults totrue.final - appLifecycle → bool
-
Whether to emit app-lifecycle spans as the app changes state.
final
- customClickTargetResolver → LDClickTargetResolver?
-
Recognizes the application's own widget types as click targets, so a
design-system
PrimaryButtonreports itself instead of the anonymousInkWellit is built from.final - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- taps → bool
-
Whether to capture taps and publish a
clickevent for each.final - trackEvents → bool
-
Whether to emit a
trackspan when a custom event is tracked, either through the LaunchDarkly client'safterTrackhook or the manualLDObserve.trackAPI. Defaults totrue.final - views → bool
-
Whether to emit spans for screen/page views. Screen views are reported from
Dart (see
LDNavigatorObserver); on web this gates the Dartscreen_viewspan, and on Android and iOS it maps to the nativeanalytics.screenViewsgate. It gates the span only — the mobile Session ReplayNavigateevent is emitted regardless. Defaults totrue.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- disabled → const AnalyticsOptions
-
All analytics telemetry disabled. Convenience mirroring Swift's
Analytics.disabled. - enabled → const AnalyticsOptions
-
All analytics telemetry enabled. Convenience mirroring Swift's
Analytics.enabled; equivalent toconst AnalyticsOptions().