DVInMemorySearchProvider<TModel, TFacets> constructor

DVInMemorySearchProvider<TModel, TFacets>({
  1. required List<TModel> records,
  2. required DVSearchDocument<TModel> document,
  3. DVSearchFacetMatcher<TModel, TFacets>? facetMatcher,
  4. Map<String, String Function(TModel)>? facetValues,
  5. DVSearchTuning tuning = const DVSearchTuning(),
})

Implementation

DVInMemorySearchProvider({
  required List<TModel> records,
  required this.document,
  this.facetMatcher,
  // Not a const default: TModel is a type variable, which a const literal
  // cannot mention.
  Map<String, String Function(TModel)>? facetValues,
  this.tuning = const DVSearchTuning(),
})  : records = List<TModel>.unmodifiable(records),
      facetValues =
          facetValues ?? <String, String Function(TModel)>{};