CustomDropdownButton constructor

const CustomDropdownButton({
  1. Key? key,
  2. required Function onChanged,
  3. required dynamic items,
  4. AlignmentDirectional alignment = AlignmentDirectional.centerStart,
  5. bool disabled = false,
  6. TextStyle? textStyle,
  7. Color? backgroundColor,
  8. Color? textColor,
  9. String hint = 'Select',
  10. String? selectedKey,
  11. Icon? leftIcon,
  12. Icon? rightIcon,
  13. EdgeInsets? margin,
  14. EdgeInsets? padding,
  15. int? flex,
  16. BorderRadius? borderRadius,
  17. double? width,
  18. double? height,
  19. String? firstOption,
  20. String? keyItemName,
})

Implementation

const CustomDropdownButton({
  super.key,
  required this.onChanged,
  required this.items,
  this.alignment = AlignmentDirectional.centerStart,
  this.disabled = false,
  this.textStyle,
  this.backgroundColor,
  this.textColor,
  this.hint = 'Select',
  this.selectedKey,
  this.leftIcon,
  this.rightIcon,
  this.margin,
  this.padding,
  this.flex,
  this.borderRadius,
  this.width,
  this.height,
  this.firstOption,
  this.keyItemName,
}) : assert(items is List<String> || items is List<Map<String, String>> || items is List || items is List<MapEntry> || items is Map);