logViewSearchResults method

Future<void> logViewSearchResults({
  1. required String searchTerm,
  2. Map<String, Object?>? parameters,
})

Logs the standard view_search_results event.

Log this event when the user has been presented with the results of a search.

See: https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event.html#VIEW_SEARCH_RESULTS

Implementation

Future<void> logViewSearchResults({
  required String searchTerm,
  Map<String, Object?>? parameters,
}) {
  _assertParameterTypesAreCorrect(parameters);

  return _delegate.logEvent(
    name: 'view_search_results',
    parameters: filterOutNulls(<String, Object?>{
      _SEARCH_TERM: searchTerm,
      if (parameters != null) ...parameters,
    }),
  );
}