SearchBox<S, ViewModel> constructor

SearchBox<S, ViewModel>({
  1. Key? key,
  2. required String id,
  3. String? credentials,
  4. String? index,
  5. String? url,
  6. AppbaseSettings? appbaseConfig,
  7. TransformRequest? transformRequest,
  8. TransformResponse? transformResponse,
  9. Map<String, String>? headers,
  10. Map<String, dynamic>? react,
  11. String? queryFormat,
  12. dynamic dataField,
  13. String? categoryField,
  14. String? categoryValue,
  15. String? nestedField,
  16. int? from,
  17. int? size,
  18. SortType? sortBy,
  19. String? aggregationField,
  20. int? aggregationSize,
  21. Map? after,
  22. bool? includeNullValues,
  23. List<String>? includeFields,
  24. List<String>? excludeFields,
  25. dynamic fuzziness,
  26. bool? searchOperators,
  27. bool? highlight,
  28. dynamic highlightField,
  29. Map? customHighlight,
  30. int? interval,
  31. List<String>? aggregations,
  32. String? missingLabel,
  33. bool? showMissing,
  34. bool? enableSynonyms,
  35. String? selectAllLabel,
  36. bool? pagination,
  37. bool? queryString,
  38. Map defaultQuery(
    1. dynamic searchController
    )?,
  39. Map customQuery(
    1. dynamic searchController
    )?,
  40. Future beforeValueChange(
    1. dynamic value
    )?,
  41. void onValueChange(
    1. dynamic next, {
    2. dynamic prev,
    })?,
  42. void onResults(
    1. Results next, {
    2. Results prev,
    })?,
  43. void onAggregationData(
    1. Aggregations next, {
    2. Aggregations prev,
    })?,
  44. void onError(
    1. dynamic error
    )?,
  45. void onRequestStatusChange(
    1. String next, {
    2. String prev,
    })?,
  46. void onQueryChange(
    1. List<Map>? next, {
    2. List<Map>? prev,
    })?,
  47. bool? enablePopularSuggestions,
  48. int? maxPopularSuggestions,
  49. bool showDistinctSuggestions = true,
  50. bool? preserveResults,
  51. bool clearOnQueryChange = true,
  52. String? distinctField,
  53. Map? distinctFieldConfig,
  54. bool enableRecentSearches = false,
  55. bool showAutoFill = false,
  56. Widget buildSuggestionItem(
    1. Suggestion suggestion,
    2. Function handleTap
    )?,
  57. dynamic speechToTextInstance,
  58. MicOptions? micOptions,
  59. List<Widget>? customActions,
  60. CompoundClauseType? compoundClause,
})

Implementation

SearchBox({
  Key? key,
  required this.id,
  // properties to configure search component
  this.credentials,
  this.index,
  this.url,
  this.appbaseConfig,
  this.transformRequest,
  this.transformResponse,
  this.headers,
  this.react,
  this.queryFormat,
  this.dataField,
  this.categoryField,
  this.categoryValue,
  this.nestedField,
  this.from,
  this.size,
  this.sortBy,
  this.aggregationField,
  this.aggregationSize,
  this.after,
  this.includeNullValues,
  this.includeFields,
  this.excludeFields,
  this.fuzziness,
  this.searchOperators,
  this.highlight,
  this.highlightField,
  this.customHighlight,
  this.interval,
  this.aggregations,
  this.missingLabel,
  this.showMissing,
  this.enableSynonyms,
  this.selectAllLabel,
  this.pagination,
  this.queryString,
  this.defaultQuery,
  this.customQuery,
  this.beforeValueChange,
  this.onValueChange,
  this.onResults,
  this.onAggregationData,
  this.onError,
  this.onRequestStatusChange,
  this.onQueryChange,
  this.enablePopularSuggestions,
  this.maxPopularSuggestions,
  this.showDistinctSuggestions = true,
  this.preserveResults,
  this.clearOnQueryChange = true,
  this.distinctField,
  this.distinctFieldConfig,
  // searchbox specific properties
  this.enableRecentSearches = false,
  this.showAutoFill = false,
  // to customize ui
  this.buildSuggestionItem,
  // voice search
  this.speechToTextInstance,
  this.micOptions,
  // custom actions
  this.customActions,
  this.compoundClause,
});