GFDropdown<T> constructor
const
GFDropdown<T> ({
- Key? key,
- required List<
DropdownMenuItem< ? items,T> > - Widget? icon,
- DropdownButtonBuilder? selectedItemBuilder,
- T? value,
- Widget? hint,
- Widget? disabledHint,
- required ValueChanged<
T?> ? onChanged, - VoidCallback? onTap,
- int elevation = 8,
- TextStyle? style,
- Widget? underline,
- Color? iconDisabledColor,
- Color? iconEnabledColor,
- double iconSize = 24.0,
- bool isDense = true,
- bool isExpanded = false,
- double? itemHeight = 40,
- Color? focusColor,
- FocusNode? focusNode,
- bool autofocus = false,
- Color? dropdownColor,
- FormFieldValidator<
T> ? validator, - EdgeInsets padding = const EdgeInsets.all(8),
- BorderRadius borderRadius = const BorderRadius.all(Radius.circular(4)),
- BorderSide border = const BorderSide(color: Colors.transparent, width: 1, style: BorderStyle.solid),
- dynamic dropdownButtonColor = GFColors.WHITE,
GF Dropdown let user to select from the number of items and display selected item in the button. It displays list of items in the overlay dropdown fashion.
Implementation
const GFDropdown(
{Key? key,
required this.items,
this.icon,
this.selectedItemBuilder,
this.value,
this.hint,
this.disabledHint,
required this.onChanged,
this.onTap,
this.elevation = 8,
this.style,
this.underline,
this.iconDisabledColor,
this.iconEnabledColor,
this.iconSize = 24.0,
this.isDense = true,
this.isExpanded = false,
this.itemHeight = 40,
this.focusColor,
this.focusNode,
this.autofocus = false,
this.dropdownColor,
this.validator,
this.padding = const EdgeInsets.all(8),
this.borderRadius = const BorderRadius.all(Radius.circular(4)),
this.border = const BorderSide(
color: Colors.transparent, width: 1, style: BorderStyle.solid),
this.dropdownButtonColor = GFColors.WHITE})
: super(key: key);