CustomListTileInput constructor

const CustomListTileInput({
  1. Key? key,
  2. Widget? title,
  3. String? titleText,
  4. Widget? subtitle,
  5. String? subtitleText,
  6. EdgeInsetsGeometry? contentPadding,
  7. TextEditingController? controller,
  8. String? initialValue,
  9. FocusNode? focusNode,
  10. TextInputType? keyboardType,
  11. TextCapitalization textCapitalization = TextCapitalization.none,
  12. TextInputAction? textInputAction,
  13. TextStyle? style,
  14. StrutStyle? strutStyle,
  15. TextDirection? textDirection,
  16. TextAlign textAlign = TextAlign.start,
  17. TextAlignVertical? textAlignVertical,
  18. bool autofocus = false,
  19. bool readOnly = false,
  20. bool? showCursor,
  21. String obscuringCharacter = '*',
  22. bool obscureText = false,
  23. bool autocorrect = true,
  24. SmartDashesType? smartDashesType,
  25. SmartQuotesType? smartQuotesType,
  26. bool enableSuggestions = true,
  27. MaxLengthEnforcement? maxLengthEnforcement,
  28. int? maxLines = 1,
  29. int? minLines,
  30. bool expands = false,
  31. int? maxLength,
  32. ValueChanged<String>? onChanged,
  33. GestureTapCallback? onTap,
  34. TapRegionCallback? onTapOutside,
  35. ValueChanged<String>? onFieldSubmitted,
  36. FormFieldSetter<String>? onSaved,
  37. FormFieldValidator<String>? validator,
  38. List<TextInputFormatter>? inputFormatters,
  39. bool? enabled,
  40. double cursorWidth = 2.0,
  41. double? cursorHeight,
  42. Radius? cursorRadius,
  43. Color? cursorColor,
  44. Brightness? keyboardAppearance,
  45. EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
  46. bool? enableInteractiveSelection,
  47. TextSelectionControls? selectionControls,
  48. InputCounterWidgetBuilder? buildCounter,
  49. ScrollPhysics? scrollPhysics,
  50. Iterable<String>? autofillHints,
  51. ScrollController? scrollController,
  52. String? restorationId,
  53. bool enableIMEPersonalizedLearning = true,
  54. MouseCursor? mouseCursor,
  55. SpellCheckConfiguration? spellCheckConfiguration,
  56. TextMagnifierConfiguration? magnifierConfiguration,
  57. UndoHistoryController? undoController,
  58. AppPrivateCommandCallback? onAppPrivateCommand,
  59. bool? cursorOpacityAnimates,
  60. BoxHeightStyle selectionHeightStyle = BoxHeightStyle.tight,
  61. BoxWidthStyle selectionWidthStyle = BoxWidthStyle.tight,
  62. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  63. ContentInsertionConfiguration? contentInsertionConfiguration,
  64. Clip clipBehavior = Clip.hardEdge,
  65. bool stylusHandwritingEnabled = true,
  66. bool canRequestFocus = true,
  67. AutovalidateMode? autovalidateMode = AutovalidateMode.onUserInteraction,
  68. InputDecoration? decoration,
  69. bool? isRequired,
  70. CustomInputSize size = CustomInputSize.small,
  71. bool useCameraScanner = false,
  72. bool showBorder = false,
  73. bool? clearable,
  74. double? width,
  75. EdgeInsetsGeometry? padding,
})

ListTileInput 列表项输入框组件

Implementation

const CustomListTileInput({
  super.key,
  // -------------------------------------------------------------------- > List Tile
  this.title,
  this.titleText,
  this.subtitle,
  this.subtitleText,
  this.contentPadding,
  // -------------------------------------------------------------------- > TextFormField
  this.controller,
  this.initialValue,
  this.focusNode,
  this.keyboardType,
  this.textCapitalization = TextCapitalization.none,
  this.textInputAction,
  this.style,
  this.strutStyle,
  this.textDirection,
  this.textAlign = TextAlign.start,
  this.textAlignVertical,
  this.autofocus = false,
  this.readOnly = false,
  this.showCursor,
  this.obscuringCharacter = '*',
  this.obscureText = false,
  this.autocorrect = true,
  this.smartDashesType,
  this.smartQuotesType,
  this.enableSuggestions = true,
  this.maxLengthEnforcement,
  this.maxLines = 1,
  this.minLines,
  this.expands = false,
  this.maxLength,
  this.onChanged,
  this.onTap,
  this.onTapOutside,
  this.onFieldSubmitted,
  this.onSaved,
  this.validator,
  this.inputFormatters,
  this.enabled,
  this.cursorWidth = 2.0,
  this.cursorHeight,
  this.cursorRadius,
  this.cursorColor,
  this.keyboardAppearance,
  this.scrollPadding = const EdgeInsets.all(20.0),
  this.enableInteractiveSelection,
  this.selectionControls,
  this.buildCounter,
  this.scrollPhysics,
  this.autofillHints,
  this.scrollController,
  this.restorationId,
  this.enableIMEPersonalizedLearning = true,
  this.mouseCursor,
  this.spellCheckConfiguration,
  this.magnifierConfiguration,
  this.undoController,
  this.onAppPrivateCommand,
  this.cursorOpacityAnimates,
  this.selectionHeightStyle = BoxHeightStyle.tight,
  this.selectionWidthStyle = BoxWidthStyle.tight,
  this.dragStartBehavior = DragStartBehavior.start,
  this.contentInsertionConfiguration,
  this.clipBehavior = Clip.hardEdge,
  this.stylusHandwritingEnabled = true,
  this.canRequestFocus = true,
  this.autovalidateMode = AutovalidateMode.onUserInteraction,
  this.decoration,
  // -------------------------------------------------------------------- > Custom
  this.isRequired,
  this.size = CustomInputSize.small,
  this.useCameraScanner = false,
  this.showBorder = false,
  this.clearable,
  this.width,
  this.padding,
})  : assert((title != null) != (titleText != null), '必须设置 title 或 titleText 其中一个参数'),
      assert(!(subtitle != null && subtitleText != null), '不能同时设置 subtitle 和 subtitleText');