Smart Dropdown Plus
A simple yet flexible dropdown widget for Flutter with:
- Single or multiple selection.
- Smooth opening/closing animations.
- Search inside dropdown (coming soon).
Features
- ✅ Single and Multi-select support.
- ✅ Smooth SizeTransition animations.
- ✅ Fully customizable appearance.
- ✅ Easy to integrate and lightweight.
🚀 Getting Started
Installation
Add to your pubspec.yaml
:
smart_dropdown_plus: ^0.0.1
then run:
flutter pub get
Usage
- Single Select:
import 'package:smart_dropdown_plus/smart_dropdown_plus.dart';
SmartDropdownPlus<String>(
items: [
SmartDropdownItem(value: 'apple', label: 'Apple'),
SmartDropdownItem(value: 'banana', label: 'Banana'),
SmartDropdownItem(value: 'orange', label: 'Orange'),
],
isMultiSelect: false,
hintText: 'Select a fruit',
onChanged: (values) {
debugPrint('Selected (Single): ${values.first}');
},
),
- Multi Select:
import 'package:smart_dropdown_plus/smart_dropdown_plus.dart';
SmartDropdownPlus<String>(
items: [
SmartDropdownItem(value: 'football', label: 'Football'),
SmartDropdownItem(value: 'basketball', label: 'Basketball'),
SmartDropdownItem(value: 'tennis', label: 'Tennis'),
],
isMultiSelect: true,
hintText: 'Select sports',
selectActiveColor :Colors.blue,
onChanged: (values) {
setState(() {
// List of selected values as List<string>
selectedValues = values;
});
},
),
Preview
📮 Contributing
-
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
-
If you find a bug or have a feature request, feel free to open an issue.
💬 Support
- To contrib to this project, you can open a PR or an issue.
👨💻 Author
- Built with ❤️ by Abdullah Alamary
📝 License
- This project is licensed under the MIT License. See the LICENSE file for details.