Search packages, repositories and app categories

Package detailsv2.3.0

search_page

Fast and easy way to build a custom search experience in you app

AndroidiOSWebmacOSWindowsLinux
30-day downloads
910
Likes
197
Pub points
150

Install package

flutter pub add search_page

Package Overview

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

A Flutter package that enables developers to quickly create customizable search experiences within their applications. It provides a streamlined approach to implementing search functionality with built-in support for real-time filtering, debounce handling, and easy integration with data sources. Designed for simplicity and performance, it reduces boilerplate code while offering flexibility in UI customization. The package is compatible across all major platforms, making it ideal for cross-platform apps seeking a consistent search interface.

Use cases

  • Implementing real-time search in lists
  • Building custom search UIs with minimal effort
  • Integrating search with dynamic data sources
  • Creating responsive search bars for web and mobile
  • Adding search functionality to e-commerce apps
  • Enhancing user experience with instant results

Key features

  • Real-time search with debounce
  • Customizable search UI components
  • Cross-platform compatibility
  • Easy integration with any data source
  • Support for async search operations
  • Lightweight and performant

Suitable for

  • Developers building search-heavy apps
  • Teams prioritizing rapid prototyping
  • Apps requiring consistent search across platforms
  • Frontend developers focused on UX improvements
  • Flutter beginners exploring search features

Considerations

  • Requires manual setup for complex filtering logic
  • Limited built-in styling options beyond basic customization
  • May need additional state management for large datasets
  • Not optimized for extremely high-frequency search queries
  • Depends on external data source implementation

Original README

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

Search Page

Package style: very good analysis Build Patreon License

Fast and easy way to build a custom search experience in you app.

This package aims to provide a simple way to build a search view, using available resources from the Flutter framework. It uses SearchDelegate as its fondation, in oder to build a 'material' experience.

One of the special features of this package is the filter parameter. It's a very simple way to filter out items inside a list, using different string representations.

Also, you can customize suggestion and on-error widgets, provide custom search filters, change AppBar's theme...

Example

Here is a example on how to use this package. You'd need to call the SearchPage class using the showSearch function built in.

If you want to take a deeper look at the example, take a look at the example folder provided with the project.

FloatingActionButton(
  child: Icon(Icons.search),
  tooltip: 'Search people',
  onPressed: () => showSearch(
    context: context,
    delegate: SearchPage<Person>(
      items: people,
      searchLabel: 'Search people',
      suggestion: Center(
        child: Text('Filter people by name, surname or age'),
      ),
      failure: Center(
        child: Text('No person found :('),
      ),
      filter: (person) => [
        person.name,
        person.surname,
        person.age.toString(),
      ],
      builder: (person) => ListTile(
        title: Text(person.name),
        subtitle: Text(person.surname),
        trailing: Text('${person.age} yo'),
      ),
    ),
  ),
),

Getting Started

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Built with

Authors

License

This project is licensed under the GNU GPL v3 License - see the LICENSE file for details.

Categories

Source repository

Projects using this package