SearchBox<S, ViewModel> constructor
SearchBox<S, ViewModel> ({
- Key? key,
- required String id,
- String? credentials,
- String? index,
- String? url,
- AppbaseSettings? appbaseConfig,
- TransformRequest? transformRequest,
- TransformResponse? transformResponse,
- Map<
String, String> ? headers, - Map<
String, dynamic> ? react, - String? queryFormat,
- dynamic dataField,
- String? categoryField,
- String? categoryValue,
- String? nestedField,
- int? from,
- int? size,
- SortType? sortBy,
- String? aggregationField,
- int? aggregationSize,
- Map? after,
- bool? includeNullValues,
- List<
String> ? includeFields, - List<
String> ? excludeFields, - dynamic fuzziness,
- bool? searchOperators,
- bool? highlight,
- dynamic highlightField,
- Map? customHighlight,
- int? interval,
- List<
String> ? aggregations, - String? missingLabel,
- bool? showMissing,
- bool? enableSynonyms,
- String? selectAllLabel,
- bool? pagination,
- bool? queryString,
- Map defaultQuery(
- dynamic searchController
- Map customQuery(
- dynamic searchController
- Future beforeValueChange(
- dynamic value
- void onValueChange(
- dynamic next, {
- dynamic prev,
- void onResults(
- Results next, {
- Results prev,
- void onAggregationData(
- Aggregations next, {
- Aggregations prev,
- void onError(
- dynamic error
- void onRequestStatusChange(})?,
- void onQueryChange(})?,
- bool? enablePopularSuggestions,
- int? maxPopularSuggestions,
- bool showDistinctSuggestions = true,
- bool? preserveResults,
- bool clearOnQueryChange = true,
- String? distinctField,
- Map? distinctFieldConfig,
- bool enableRecentSearches = false,
- bool showAutoFill = false,
- Widget buildSuggestionItem(
- Suggestion suggestion,
- Function handleTap
- dynamic speechToTextInstance,
- MicOptions? micOptions,
- List<
Widget> ? customActions, - 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,
});