https://github.com/hussaintaj-w/flutter-package-selection_menu
A flutter widget, highly customizable, to select an item from a list of items.
https://github.com/hussaintaj-w/flutter-package-selection_menu
flutter flutter-package menu select select-menu selection selection-menu
Last synced: 10 months ago
JSON representation
A flutter widget, highly customizable, to select an item from a list of items.
- Host: GitHub
- URL: https://github.com/hussaintaj-w/flutter-package-selection_menu
- Owner: HussainTaj-W
- License: mit
- Created: 2019-08-27T23:15:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-05-24T21:42:40.000Z (almost 4 years ago)
- Last Synced: 2023-08-20T23:04:29.223Z (over 2 years ago)
- Topics: flutter, flutter-package, menu, select, select-menu, selection, selection-menu
- Language: Dart
- Homepage: https://pub.dev/packages/selection_menu
- Size: 4.28 MB
- Stars: 34
- Watchers: 3
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# selection_menu
A highly customizable selection/select menu to choose an item from a list,
with optional search feature.
## Getting Started
The package provides two libraries:
* selection_menu: Provides Widgets
* components_configurations: Provides styles(ComponentsConfigurations)
for Widgets
The image shows the same SelectionMenu Widget with three different
ComponentsConfigurations.

### Basic Usage
```dart
import 'package:selection_menu/selection_menu.dart';
SelectionMenu(
itemsList: ['A','B','C'],
onItemSelected: (String selectedItem)
{
print(selectedItem);
},
itemBuilder: (BuildContext context, String item, OnItemTapped onItemTapped)
{
return Material(
InkWell(
onTap: onItemTapped,
child: Text(item),
),
);
},
// other Properties...
);
```
**Using A ComponentsConfiguration**
```dart
import 'package:selection_menu/selection_menu.dart';
// IMPORT this package to get access to configuration classes.
import 'package:selection_menu/components_configurations.dart';
SelectionMenu(
itemsList: ['A','B','C'],
onItemSelected: (String selectedItem)
{
print(selectedItem);
},
itemBuilder: (BuildContext context, String item, OnItemTapped onItemTapped)
{
return Material(
InkWell(
onTap: onItemTapped,
child: Text(item),
),
);
},
componentsConfigurations: DropdownComponentsConfigurations(),
);
```
## Customization
The menu is divided into parts called `Components` which allows to
change one part while the others remain intact.
A `ComponentsConfiguration` is simply a container for all Components
and configurations.

> Reading the examples is recommended because there are a lot of things to
> cover and an intro page shouldn't be that long.
### Examples
**A series of examples can be found
[here](https://github.com/HussainTaj-W/flutter-package-selection_menu-example).**
## Contributions
You may make changes and open pull requests on GitHub. :)