stateDropdown method
State Dropdown Widget
Implementation
Widget stateDropdown() {
return DropdownWithSearch(
title: widget.stateDropdownLabel,
placeHolder: widget.stateSearchPlaceholder,
disabled: _states.length == 0 ? true : false,
items: _states.map((String? dropDownStringItem) {
return dropDownStringItem;
}).toList(),
selectedItemStyle: widget.selectedItemStyle,
dropdownHeadingStyle: widget.dropdownHeadingStyle,
itemStyle: widget.dropdownItemStyle,
decoration: widget.dropdownDecoration,
selectedItemPadding: widget.selectedItemPadding,
dialogRadius: widget.dropdownDialogRadius,
searchBarRadius: widget.searchBarRadius,
disabledDecoration: widget.disabledDropdownDecoration,
selected: _selectedState,
label: widget.stateSearchPlaceholder,
//onChanged: (value) => _onSelectedState(value),
onChanged: (value) {
//print("stateChanged $value $_selectedState");
value != null
? _onSelectedState(value)
: _onSelectedState(_selectedState);
},
);
}