FeedbackAnalytics class abstract
Observer interface for feedback widget lifecycle events.
Implement this to forward events to your analytics stack (Firebase Analytics, Amplitude, Mixpanel, PostHog, etc.).
All methods have default no-op implementations so you only override what you need.
class MyAnalytics implements FeedbackAnalytics {
@override
void onFeedbackSubmitted(FeedbackEntry entry) {
FirebaseAnalytics.instance.logEvent(
name: 'feedback_submitted',
parameters: {'category': entry.category.name},
);
}
}
FeedbackWidget(
backend: myBackend,
appVersion: '1.0.0',
analytics: MyAnalytics(),
)
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onFeedbackDismissed(
) → void - Called when FeedbackWidget is disposed without submitting.
-
onFeedbackQueued(
FeedbackEntry entry) → void - Called when an entry is saved to the offline queue instead of sent.
-
onFeedbackShown(
) → void - Called when the feedback form becomes visible to the user.
-
onFeedbackSubmitted(
FeedbackEntry entry) → void - Called after a successful FeedbackBackend.submit.
-
onScreenshotAdded(
int count) → void -
Called each time a screenshot is added.
countis the new total. -
onVoiceInputUsed(
) → void - Called when the user activates voice input (mic button pressed).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited