CreateIndexedBoxFromType<K, T> extension

Extension on BoxType to create an IndexedBox with full-text search support.

This extension allows you to instantiate an IndexedBox directly from a BoxType, specifying all necessary parameters for box creation and indexing behavior.

Example:

final box = BoxType.lazy.indexedBox<int, Article>(
  'articles',
  searchableText: (article) => article.title,
);

See also:

on

Methods

indexedBox(String name, {HiveCipher? encryptionCipher, bool crashRecovery = true, String? path, String? collection, LogHandler? logger, required String searchableText(T), Analyzer analyzer = Analyzer.prefix, TextAnalyzer<T>? overrideAnalyzer, bool matchAllTokens = true, int tokenCacheCapacity = 512, bool verifyMatches = false, int keyComparator(K a, K b)?}) IndexedBox<K, T>

Available on BoxType, provided by the CreateIndexedBoxFromType extension

Creates an IndexedBox of this BoxType.