Demo

Dropdown Component
A customizable dropdown widget with nested forms and selection indicators for Flutter.
Features
- Customizable appearance (colors, padding, borders)
- Support for nested forms that appear when an item is selected
- Optional selection indicators
- Overlay-based implementation for proper z-index handling
- Fully customizable dropdown items
Installation
Add to your pubspec.yaml:
dependencies:
dropdown_component: ^1.0.0
# Usage
import 'package:dropdown_component/dropdown_component.dart';
WidgetsDropdown<String>(
title: 'Organization Type',
items: [
DropdownItem<String>(
form: MyCustomForm(),
value: 'option1',
title: Text('Option 1'),
),
// More items...
],
onItemSelected: (value) {
print('Selected: $value');
},
)
## NestedDropdown Usage
```dart
NestedDropdown(
items: const ['option1', 'option2', 'option3'],
initialValue: 'option1',
onSelected: (value) {
print('Selected: $value');
},
backgroundColor: Colors.blue,
textColor: Colors.white,
)
//if you want to use a drop down inside widgetsDropdown you have to use NestedDropdown in you form widget
Libraries
- dropdown_component
- A collection of customizable dropdown components for Flutter applications.
- main
- models/dropdown_models