Widget.dropdownButtonFormField constructor Null safety

const Widget.dropdownButtonFormField(
  1. {Key? key,
  2. FormStringField? field,
  3. required List<DropdownMenuItem> items,
  4. String? value,
  5. Widget? hint,
  6. Widget? disabledHint,
  7. Callback? onTap,
  8. @Default(8) int elevation,
  9. TextStyle? style,
  10. Widget? icon,
  11. Color? iconDisabledColor,
  12. Color? iconEnabledColor,
  13. @Default(24.0) double iconSize,
  14. @Default(true) bool isDense,
  15. @Default(false) bool isExpanded,
  16. double? itemHeight,
  17. Color? focusColor,
  18. @Default(false) bool autofocus,
  19. Color? dropdownColor,
  20. InputDecoration? decoration,
  21. Map<String, String>? validatorMessages,
  22. AutovalidateMode? autovalidateMode,
  23. double? menuMaxHeight,
  24. bool? enableFeedback,
  25. @Default(Alignment.centerLeft) Alignment alignment,
  26. BorderRadius? borderRadius}
)

Implementation

const factory Widget.dropdownButtonFormField({
  Key? key,
  FormStringField? field,
  required List<DropdownMenuItem> items,
  String? value,
  Widget? hint,
  Widget? disabledHint,
  Callback? onTap,
  @Default(8) int elevation,
  TextStyle? style,
  Widget? icon,
  Color? iconDisabledColor,
  Color? iconEnabledColor,
  @Default(24.0) double iconSize,
  @Default(true) bool isDense,
  @Default(false) bool isExpanded,
  double? itemHeight,
  Color? focusColor,
  @Default(false) bool autofocus,
  Color? dropdownColor,
  InputDecoration? decoration,
  Map<String, String>? validatorMessages,
  AutovalidateMode? autovalidateMode,
  double? menuMaxHeight,
  bool? enableFeedback,
  @Default(Alignment.centerLeft) Alignment alignment,
  BorderRadius? borderRadius,
}) = DropdownButtonFormField;