Search packages, repositories and app categories

Package detailsv2.0.3

woozy_search

A super simple and lightweight client-side fuzzy-search library based on Levenshtein distance.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
1.4K
Likes
24
Pub points
150

Install package

flutter pub add woozy_search

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Woozy Search is a lightweight, client-side fuzzy search library for Flutter apps that uses Levenshtein distance to match strings with slight variations. It enables fast and accurate search results even when users make typos or use partial inputs. Designed for simplicity, it requires minimal setup and works across all major platforms including Android, iOS, Web, macOS, Windows, and Linux. Ideal for enhancing user experience in search bars and filtering lists with flexible matching.

Use cases

  • Real-time search in list views
  • Typo-tolerant text matching
  • Autocomplete suggestions
  • Filtering large datasets locally
  • Simple UI search components
  • Enhancing accessibility in search interfaces

Key features

  • Based on Levenshtein distance
  • Minimal setup and configuration
  • Cross-platform compatibility
  • Lightweight and fast
  • Client-side only
  • No external dependencies

Suitable for

  • Developers seeking simple fuzzy search
  • Apps needing local search without backend
  • Projects prioritizing performance and size
  • UI components requiring typo tolerance
  • Prototypes and MVPs with search functionality

Considerations

  • Not suitable for large-scale server-side searches
  • Limited to client-side use
  • Does not support advanced ranking or scoring
  • Best for small to medium-sized datasets
  • No built-in caching or async processing

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Woozy Search

A super simple and lightweight client-side fuzzy-search library based on Levenshtein distance.

Usage

dependencies:
  woozy_search: '>=2.0.2 <3.0.0'

Basic Usage

import 'package:woozy_search/woozy_search.dart';

main() {
  final woozy = Woozy();
  woozy.addEntries(['basketball', 'badminton', 'skating']);
  final output = woozy.search('badmi');
  output.forEach((element) => print(' - ${element}'));
}

Output:

 - text: badminton, score: 0.56
 - text: basketball, score: 0.20
 - text: skating, score: 0.14

With Associate Values

Associate value can be anything, integers, UUIDs, text, etc. As an example, we use a name and their phone number here.

import 'package:woozy_search/woozy_search.dart';

main() {
  final woozy = new Woozy();
  woozy.addEntry('John Doe', value: "+1 210-269-0117");
  woozy.addEntry('Nate Humphrey', value: "+1 (416) 527-4927");
  woozy.addEntry('Serena Waldorf', value: "+ 1 914-514-7901");
  final output = woozy.search('humphray');
  output.forEach((element) => print(' - ${element}'));
}

Output:

 - text: Nate Humphrey, score: 0.88, value: +1 (416) 527-4927
 - text: Serena Waldorf, score: 0.13, value: + 1 914-514-7901
 - text: John Doe, score: 0.13, value: +1 210-269-0117

With Search Output Limit

Limit the number of search result to return. It is defaulted to 10, but can be overwritten.

import 'package:woozy_search/woozy_search.dart';
  
main() {
  final woozy = Woozy(limit: 2);
  woozy.setEntries(List.filled(100, 'foo'));
  final output = woozy.search('f');
  output.forEach((element) => print(' - ${element}'));
}

Output:

 - text: foo, score: 0.33
 - text: foo, score: 0.33

With Case Sensitive

main() {
  final woozy = Woozy(caseSensitive: true);
  woozy.setEntries(['FOO', 'boo']);
  final output = woozy.search('foo');
  output.forEach((element) => print(' - ${element}'));
}

Output:

 - text: boo, score: 0.67
 - text: FOO, score: 0.00

Features and bugs

Please file feature requests and bugs at the issue tracker.

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package

No data available yet.