trackInteraction method
Track a user interaction
Implementation
Future<void> trackInteraction(
String widgetId,
InteractionType type, {
dynamic value,
}) async {
final event = InteractionEvent(
widgetId: widgetId,
type: type,
value: value,
);
// Log to storage
try {
await _storage.logInteractionEvent(event);
} catch (e) {
if (kDebugMode) {
print('Failed to log interaction: $e');
}
}
// Notify listeners
_notifyListeners(event);
}