recordInteraction method
Record a widget interaction.
Implementation
Future<void> recordInteraction(
String widgetId,
String userId, {
String action = 'tap',
}) async {
final uri = Uri.parse('$baseUrl/api/widgets/$widgetId/interact');
final response = await _client.post(
uri,
headers: _postHeaders,
body: json.encode({'user_id': userId, 'action': action}),
);
_checkResponse(response);
}