DefaultDropdown constructor
const
DefaultDropdown({
- Key? key,
- required List<
String> items, - dynamic onChanged()?,
- String? hintText,
- FocusNode? focusValue,
- TextEditingController? mainController,
- bool enabled = true,
- bool isShowPrefixIcon = true,
- String imageAssetPath = "",
- double leftPadding = 20,
- double rightPadding = 20,
- dynamic onSubmitted()?,
- String? selectedValue,
Creates a customizable dropdown widget.
Parameters:
items: List of string options to display in dropdown (required)onChanged: Callback triggered when selection changeshintText: Placeholder text when no value is selectedfocusValue: FocusNode for managing focusenabled: Whether the dropdown is interactive (defaults to true)isShowPrefixIcon: Whether to show the list icon prefix (defaults to true)imageAssetPath: Custom image asset path (currently unused)leftPadding: Left padding in pixels (defaults to 20)rightPadding: Right padding in pixels (defaults to 20)onSubmitted: Callback for submission eventsselectedValue: Initially selected value or externally controlled value
Implementation
const DefaultDropdown({
super.key,
required this.items,
this.onChanged,
this.hintText,
this.focusValue,
this.mainController,
this.enabled = true,
this.isShowPrefixIcon = true,
this.imageAssetPath = "",
this.leftPadding = 20,
this.rightPadding = 20,
this.onSubmitted,
this.selectedValue,
});