GFDropdown<T> constructor

const GFDropdown<T>({
  1. Key? key,
  2. required List<DropdownMenuItem<T>>? items,
  3. Widget? icon,
  4. DropdownButtonBuilder? selectedItemBuilder,
  5. T? value,
  6. Widget? hint,
  7. Widget? disabledHint,
  8. required ValueChanged<T?>? onChanged,
  9. VoidCallback? onTap,
  10. int elevation = 8,
  11. TextStyle? style,
  12. Widget? underline,
  13. Color? iconDisabledColor,
  14. Color? iconEnabledColor,
  15. double iconSize = 24.0,
  16. bool isDense = true,
  17. bool isExpanded = false,
  18. double? itemHeight = 40,
  19. Color? focusColor,
  20. FocusNode? focusNode,
  21. bool autofocus = false,
  22. Color? dropdownColor,
  23. FormFieldValidator<T>? validator,
  24. EdgeInsets padding = const EdgeInsets.all(8),
  25. BorderRadius borderRadius = const BorderRadius.all(Radius.circular(4)),
  26. BorderSide border = const BorderSide(color: Colors.transparent, width: 1, style: BorderStyle.solid),
  27. 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);