logSearch static method
Search event
term
: The search string/keywords used
params
: contextualize search operations by supplying the appropriate params
Implementation
static Future<void> logSearch({
required String term,
Map<String, dynamic>? params,
}) {
return logEvent(name: 'search', params: {
'term': term,
if (params != null) ...params,
});
}