logSearch static method

Future<void> logSearch({
  1. required String term,
  2. Map<String, dynamic>? params,
})

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,
  });
}