Appero class
Main singleton class for interacting with the Appero SDK.
Provides methods for initializing the SDK, logging user experiences, posting feedback, and managing the feedback prompt flow.
Example usage:
// Initialize the SDK
await Appero.instance.initialize(
apiKey: 'your_api_key',
userId: 'optional_user_id',
);
// Log a user experience
await Appero.instance.log(
rating: ExperienceRating.strongPositive,
context: 'User completed checkout',
);
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
shouldShowFeedbackPrompt
→ Stream<
bool> -
Stream that emits feedback prompt state changes.
no setter
Methods
-
dismissPrompt(
) → Future< void> - Dismisses the current feedback prompt.
-
initialize(
{required String apiKey, String? userId, bool debug = false}) → Future< void> - Initializes the Appero SDK.
-
log(
{required ExperienceRating rating, String? context}) → Future< void> - Logs a user experience with the given rating.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
postFeedback(
{required int rating, String? feedback}) → Future< bool> - Posts user feedback to the Appero backend.
-
reset(
) → Future< void> - Resets all SDK data.
-
setAnalyticsDelegate(
ApperoAnalyticsDelegate? delegate) → void - Sets the analytics delegate to receive feedback interaction events.
-
setTheme(
ApperoTheme? theme) → Future< void> - Sets a custom theme for the feedback UI.
-
showFeedbackPrompt(
) → Future< void> - Manually triggers the feedback prompt UI.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited