dropdown_search_picker 1.0.2 copy "dropdown_search_picker: ^1.0.2" to clipboard
dropdown_search_picker: ^1.0.2 copied to clipboard

A new flutter package for that allow you to customize and search times in dropdown.

Flutter Dropdown Search #

A customizable and searchable dropdown widget for Flutter. This package allows users to select an item from a list with an intuitive search functionality.

Features #

  • Dropdown selection with search functionality
  • Customizable UI
  • Generic type support for flexible item types
  • Supports both light and dark themes

Installation #

Add the following to your pubspec.yaml:

dependencies:
  dropdown_search_picker:
    git:
      url: https://github.com/dropdown_search_picker/flutter_dropdown_search.git

Or after publishing:

dependencies:
  dropdown_search_picker: ^1.0.0

Run:

flutter pub get

Usage #

Import the package:

import 'package:dropdown_search_picker/dropdown_search_picker.dart';

Use the widget:

DropdownSearchPicker<String>(
  title: 'Select a location',
  items: ['Kitengela', 'Nairobi', 'Bhaghatell', 'Port-louis','Grand Bay'],
  getItemLabel: (item) => item,
  onItemSelected: (item) {
    print('Selected: $item');
  },
  initial: 'Select a location',
)

Customization #

  • title: Sets the label for the dropdown.
  • items: A list of items to be displayed.
  • getItemLabel: A function to extract the display label from the item.
  • onItemSelected: A callback function when an item is selected.
  • initial: Placeholder text before selection.
  • multiselect: bool multiSelect flag to enable/disable multi-selection.

Contributions #

Feel free to contribute to this project.

If you find a bug or want a feature, but don't know how to fix/implement it, please fill an issue.
If you fixed a bug or implemented a feature, please send a pull request.

License #

MIT License

3
likes
140
points
40
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A new flutter package for that allow you to customize and search times in dropdown.

Repository (GitHub)
View/report issues

License

BSL-1.0 (license)

Dependencies

flutter

More

Packages that depend on dropdown_search_picker