NexusSurveys class

In-product surveys. Fetches the surveys a user is eligible for, decides which to show (auto-show for popover/banner types + event triggers), and submits answers. The rendering is done by NexusSurveyOverlay (default UI) or your own widget driven by NexusSurveyController.

Constructors

NexusSurveys(NexusHttp _http, NexusIdentity _id, NexusConfig _cfg)

Properties

active → List<NexusSurvey>
All surveys the user is currently eligible for.
no setter
current → ValueNotifier<NexusSurvey?>
The survey currently requested to display (null when none). The overlay listens to this.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

byId(String id) → NexusSurvey?
close() → void
Remove the current survey from the screen (called by the UI when done).
dispose() → void
fetch() → Future<List<NexusSurvey>>
Fetch eligible surveys from the server (targeting/sampling/capping applied).
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 survey gated on that event.
respond(NexusSurvey survey, Map<String, Object?> answers, {bool completed = false, bool dismissed = false}) → Future<void>
Submit a response (partial, complete, or dismissed). Best-effort.
show(NexusSurvey survey) → void
Present a specific survey now (e.g. from a "Give feedback" button).
toString() → String
A string representation of this object.
inherited

Operators

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