log method
Logs a user experience with the given rating.
Use this method to track user sentiment at key points in your app. The SDK will automatically decide when to show feedback prompts based on the configured feedback flow and logged experiences.
rating - The experience rating (1-5 scale)
context - Optional context describing where/why this experience occurred
Throws PlatformException if logging fails.
Example:
await Appero.instance.log(
rating: ExperienceRating.positive,
context: 'User completed tutorial',
);
Implementation
Future<void> log({
required ExperienceRating rating,
String? context,
}) async {
await _methodChannel.invokeMethod('log', {
'rating': rating.toNativeString(),
'context': context,
});
}