AppDropDownTextField<T> constructor

const AppDropDownTextField<T>({
  1. required String itemText(
    1. T value
    ),
  2. Key? key,
  3. TextEditingController? controller,
  4. FocusNode? focusNode,
  5. InputDecoration? decoration({
    1. required bool showMenu,
    })?,
  6. TextInputType? keyboardType,
  7. TextInputAction? textInputAction,
  8. TextCapitalization textCapitalization = TextCapitalization.none,
  9. TextStyle? style,
  10. StrutStyle? strutStyle,
  11. TextAlign textAlign = TextAlign.start,
  12. TextAlignVertical? textAlignVertical,
  13. TextDirection? textDirection,
  14. bool readOnly = false,
  15. bool? showCursor,
  16. bool autofocus = false,
  17. String obscuringCharacter = '•',
  18. bool obscureText = false,
  19. bool autocorrect = true,
  20. SmartDashesType? smartDashesType,
  21. SmartQuotesType? smartQuotesType,
  22. bool enableSuggestions = true,
  23. int? maxLines = 1,
  24. int? minLines,
  25. bool expands = false,
  26. int? maxLength,
  27. MaxLengthEnforcement? maxLengthEnforcement,
  28. ValueChanged<String>? onChanged,
  29. VoidCallback? onEditingComplete,
  30. ValueChanged<String>? onSubmitted,
  31. AppPrivateCommandCallback? onAppPrivateCommand,
  32. List<TextInputFormatter>? inputFormatters,
  33. bool? enabled,
  34. double cursorWidth = 2,
  35. double? cursorHeight,
  36. Radius? cursorRadius,
  37. Color? cursorColor,
  38. BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight,
  39. BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight,
  40. Brightness? keyboardAppearance,
  41. EdgeInsets scrollPadding = const EdgeInsets.all(20),
  42. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  43. bool? enableInteractiveSelection,
  44. TextSelectionControls? selectionControls,
  45. GestureTapCallback? onTap,
  46. void onTapOutside({
    1. required bool showMenu,
    })?,
  47. MouseCursor? mouseCursor,
  48. InputCounterWidgetBuilder? buildCounter,
  49. ScrollController? scrollController,
  50. ScrollPhysics? scrollPhysics,
  51. Iterable<String>? autofillHints,
  52. Clip clipBehavior = Clip.hardEdge,
  53. String? restorationId,
  54. bool enableIMEPersonalizedLearning = true,
  55. EditableTextContextMenuBuilder? contextMenuBuilder,
  56. SpellCheckConfiguration? spellCheckConfiguration,
  57. TextMagnifierConfiguration? magnifierConfiguration,
  58. UndoHistoryController? undoController,
  59. bool canRequestFocus = true,
  60. ContentInsertionConfiguration? contentInsertionConfiguration,
  61. bool? cursorOpacityAnimates,
  62. List<Widget> menuItems(
    1. VoidCallback hideMenu
    )?,
  63. double menuVerticalSpacing = 0,
  64. Color? menuBackgroundColor,
  65. DropDownButtonPosition position = DropDownButtonPosition.bottomCenter,
  66. double menuItemsSpacing = 0,
  67. Clip menuClipBehavior = Clip.hardEdge,
  68. EdgeInsets? menuPadding,
  69. BorderRadius? menuBorderRadius,
  70. Widget menuList({
    1. required double buttonWidth,
    2. required VoidCallback hideMenu,
    })?,
  71. Key? menuKey,
  72. String? initValue()?,
  73. Widget customField({
    1. required Widget contextMenuBuilder(
      1. BuildContext,
      2. EditableTextState
      )?,
    2. required TextEditingController controller,
    3. required FocusNode focusNode,
    4. required String groupId,
    5. required void onTapOutside({
      1. required bool showMenu,
      })?,
    6. required VoidCallback showHideMenuEvent,
    7. required bool showMenu,
    })?,
  74. void onMenuChanged({
    1. required bool showMenu,
    })?,
  75. Widget suffixIcon({
    1. required bool showMenu,
    })?,
  76. T? selectItem,
})

Implementation

const AppDropDownTextField({
  required this.itemText,
  Key? key,
  // TextField parameters
  this.controller,
  this.focusNode,
  this.decoration,
  this.keyboardType,
  this.textInputAction,
  this.textCapitalization = TextCapitalization.none,
  this.style,
  this.strutStyle,
  this.textAlign = TextAlign.start,
  this.textAlignVertical,
  this.textDirection,
  this.readOnly = false,
  this.showCursor,
  this.autofocus = false,
  this.obscuringCharacter = '•',
  this.obscureText = false,
  this.autocorrect = true,
  this.smartDashesType,
  this.smartQuotesType,
  this.enableSuggestions = true,
  this.maxLines = 1,
  this.minLines,
  this.expands = false,
  this.maxLength,
  this.maxLengthEnforcement,
  this.onChanged,
  this.onEditingComplete,
  this.onSubmitted,
  this.onAppPrivateCommand,
  this.inputFormatters,
  this.enabled,
  this.cursorWidth = 2,
  this.cursorHeight,
  this.cursorRadius,
  this.cursorColor,
  this.selectionHeightStyle = ui.BoxHeightStyle.tight,
  this.selectionWidthStyle = ui.BoxWidthStyle.tight,
  this.keyboardAppearance,
  this.scrollPadding = const EdgeInsets.all(20),
  this.dragStartBehavior = DragStartBehavior.start,
  this.enableInteractiveSelection,
  this.selectionControls,
  this.onTap,
  this.onTapOutside,
  this.mouseCursor,
  this.buildCounter,
  this.scrollController,
  this.scrollPhysics,
  this.autofillHints,
  this.clipBehavior = Clip.hardEdge,
  this.restorationId,
  this.enableIMEPersonalizedLearning = true,
  this.contextMenuBuilder,
  this.spellCheckConfiguration,
  this.magnifierConfiguration,
  this.undoController,
  this.canRequestFocus = true,
  this.contentInsertionConfiguration,
  this.cursorOpacityAnimates,

  // BasicDropDownButton parameters
  this.menuItems,
  this.menuVerticalSpacing = 0,
  this.menuBackgroundColor,
  this.position = DropDownButtonPosition.bottomCenter,
  this.menuItemsSpacing = 0,
  this.menuClipBehavior = Clip.hardEdge,
  this.menuPadding,
  this.menuBorderRadius,
  this.menuList,
  this.menuKey,
  this.initValue,
  this.customField,
  this.onMenuChanged,
  this.suffixIcon,
  this.selectItem,
}) : super(key: key);