searchable_dropdown 1.0.0 copy "searchable_dropdown: ^1.0.0" to clipboard
searchable_dropdown: ^1.0.0 copied to clipboard

outdated

Searchable dropdown inside a dialog

searchable_dropdown #

Searchable dropdown item inside a dialog

Normal Usage

Props #

props types defaultValues
items List<DropdownMenuItem
onChanged ValueChanged
value T
style TextStyle
searchHint Widget
hint Widget
disabledHint Widget
icon Widget
underline Widget
iconEnabledColor Color
iconDisabledColor Color
iconSize Double 24
isExpanded bool false

Usage #

import 'package:searchable_dropdown/searchable_dropdown.dart';

List<DropdownMenuItem> items = [];
String selectedValue;

Widget widget() {
  for(int i=0; i < 20; i++){
    items.add(new DropdownMenuItem(
      child: new Text(
        'test ' + i.toString(),
      ),
      value: 'test ' + i.toString(),
    ));
  }

  return new SearchableDropdown(
     items: items,
     value: selectedValue,
     hint: new Text(
       'Select One'
     ),
     searchHint: new Text(
       'Select One',
       style: new TextStyle(
           fontSize: 20
       ),
     ),
     onChanged: (value) {
       setState(() {
         selectedValue = value;
       });
     },
   );
}
302
likes
0
pub points
91%
popularity

Publisher

unverified uploader

Searchable dropdown inside a dialog

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on searchable_dropdown