app_wide_search 0.1.1 copy "app_wide_search: ^0.1.1" to clipboard
app_wide_search: ^0.1.1 copied to clipboard

A high-performance Flutter package for implementing app-wide search with grouped results, offline caching, and deep-link support.

0.1.1 - 2025-10-03 #

Added #

  • Top-level example/ quickstart app with custom suggestion/result builders demonstrating Provider overrides and Hive initialization
  • Documentation comments for all Hive adapters to satisfy pub.dev checks

Changed #

  • Upgraded to flutter_riverpod ^3.0.1 and riverpod_annotation ^3.0.1 to stay on the supported release train without API changes
  • Tightened adapter constructors with explicit docs (no runtime behavior changes)

Fixed #

  • Regained pub.dev documentation score (20/20) and resolved "missing example" feedback

Notes #

  • No public API changes; consumers can adopt v0.1.1 without migrations

0.1.0+performance - 2025-10-02 #

Added #

  • Production-safe search cancellation to prevent memory leaks
  • Prevents race conditions from rapid typing or navigation
  • Optional cancellationToken parameter in SearchProvider.search()
  • CancelledException for handling cancelled operations
  • Backward compatible - existing implementations work unchanged
  • See API_CHANGELOG.md for migration details

Changed #

  • ⚠️ Upgraded go_router from ^14.0.2 to ^16.0.0 (apps may need to upgrade)
  • Upgraded flutter_lints to ^6.0.0 (stricter analysis rules)
  • Upgraded intl to ^0.20.0 (latest i18n features)
  • Updated to latest stable flutter_riverpod 2.6.1
  • Added json_annotation ^4.9.0 and json_serializable ^6.8.0

Fixed #

Documentation #

Notes #

Performance optimization release.

Performance Improvements #

  • SearchScreen Optimizations

    • Added configurable debounce for search-as-you-type (300ms default)
    • Reduced rebuilds by 85% using ValueNotifier for clear button
    • Added searchOnChange parameter (default: true)
    • Added debounceDuration parameter (default: 300ms)
    • Impact: 70% fewer search calls, smoother typing experience
  • InMemorySearchProvider Optimizations

    • Implemented cached string normalization with _IndexedSearchItem
    • Pre-compute toLowerCase() on initialization instead of every search
    • Impact: 30% faster cold searches (15ms → 10ms for 100 items)
    • Impact: 50% faster warm searches (2ms → 1ms)
  • SearchCacheRepository Improvements

    • Added maxEntries parameter (default: 50 queries)
    • Added maxSizeBytes parameter (default: 5MB)
    • Implemented LRU (Least Recently Used) eviction policy
    • Automatic cleanup of oldest 20% when limits exceeded
    • Impact: Memory bounded, prevents unlimited growth
  • Code Quality

    • Enhanced analysis_options.yaml with strict linting
    • Added strict-casts, strict-inference, strict-raw-types
    • Added performance rules: prefer_const_constructors, etc.
    • Zero analyzer errors or warnings in library code

Overall Performance Gains #

  • ~40% overall performance improvement
  • 85% reduction in widget rebuilds
  • 70% reduction in search calls
  • Memory bounded to prevent leaks
  • All 18 tests passing ✅

Documentation #

  • Added PERFORMANCE_REPORT.md with detailed metrics
  • Added AUDIT_REPORT_FINAL.md with production audit
  • Added OPTIMIZATION_SUMMARY.md with implementation details

Breaking Changes #

  • None - all changes are backward-compatible ✅

Initial release of app_wide_search package.

Features #

  • Flexible Search Interfaces

    • AppWideSearchDelegate for modal search using SearchDelegate
    • SearchScreen for full-screen search experience
    • Both can be used in the same application
  • Grouped Results

    • GroupedSearchResults widget with ExpansionTile
    • Customizable groups with icons, colors, and priorities
    • Smooth animations and state preservation
  • State Management

    • Full Riverpod integration with AutoDispose providers
    • Reactive search results and suggestions
    • Efficient state updates with minimal rebuilds
  • Offline Support

    • Automatic result caching with Hive
    • Search history tracking
    • Configurable cache duration and retention limits
  • Routing Integration

    • Deep-link support with go_router
    • SearchRouteConfig for easy route setup
    • ShellRoute support for navigation bars
    • Query parameter parsing for pre-filled searches
  • Customization

    • SearchProvider abstract class for custom backends
    • InMemorySearchProvider for quick prototyping
    • Custom item builders
    • Custom result builders
    • Customizable empty and error states
  • Internationalization

    • Built-in localization with intl package
    • SearchLocalizations for UI strings
    • Easy to add more languages
  • Performance

    • Follows Flutter best practices
    • Efficient build methods
    • Const constructors where possible
    • Automatic resource cleanup with AutoDispose
  • Cross-Platform

    • Supports Android, iOS, Web, macOS, Windows, and Linux
    • Consistent behavior across platforms

Documentation #

  • Comprehensive README with multiple usage examples
  • Inline documentation following Effective Dart guidelines
  • Example app demonstrating all major features
  • Advanced examples for custom implementations

Known Limitations #

  • Hive adapters need to be generated with build_runner
  • For production use, consider implementing platform-specific search optimizations
2
likes
150
points
13
downloads

Publisher

verified publisherkidpech.app

Weekly Downloads

A high-performance Flutter package for implementing app-wide search with grouped results, offline caching, and deep-link support.

Repository (GitHub)
View/report issues

Topics

#search #ui #widget #navigation #offline

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_riverpod, go_router, hive, hive_flutter, intl, json_annotation, path_provider, riverpod, riverpod_annotation

More

Packages that depend on app_wide_search