iterable_dropdown 1.0.1
iterable_dropdown: ^1.0.1 copied to clipboard
A Flutter dropdown that works on iterable instead of lists. It also has multi select functionality
A dropdown that works with all iterables instead of just lists. It has multiselect features for selecting multiple items as well.
Features #
Use this package in your Flutter app to:
- select multiple items in dropdowns
- use iterables in a dropdown
Getting started #
Add the package to your Flutter app
flutter pub add iterable_dropdown
Import the package where you want to use it
import 'package:iterable_dropdown/iterable_dropdown.dart';
Usage #
Directly use the component
@override
Widget build(BuildContext context) {
return IterableDropdown<String>.builder(
items: items,
itemBuilder: (context, index, item, selected, select) {
return ListTile(
key: ValueKey(item.key),
title: Text(item.label),
onTap: select,
trailing: Icon(
selected
? Icons.check_box_rounded
: Icons.check_box_outline_blank_rounded,
),
);
},
hintText: 'Select an option',
selectionMode: SelectionMode.multi,
);
}
Additional information #
You can contribute to this package via the github repo