LedgerTextField constructor

const LedgerTextField({
  1. Key? key,
  2. EdgeInsets? margin,
  3. Widget? suffix,
  4. Widget? prefix,
  5. String? label,
  6. String? hintText,
  7. ValueChanged<String>? onClear,
  8. bool showLabel = true,
  9. bool showClear = true,
  10. TextEditingController? controller,
  11. ValueChanged<String>? onChanged,
  12. String? initialValue,
  13. FocusNode? focusNode,
  14. InputDecoration? decoration,
  15. TextInputType? keyboardType,
  16. TextCapitalization textCapitalization = TextCapitalization.none,
  17. TextInputAction? textInputAction,
  18. TextStyle? style,
  19. TextStyle? hintStyle,
  20. TextStyle? labelStyle,
  21. StrutStyle? strutStyle,
  22. TextDirection? textDirection,
  23. TextAlign textAlign = TextAlign.start,
  24. TextAlignVertical? textAlignVertical,
  25. bool autofocus = false,
  26. bool readOnly = false,
  27. String obscuringCharacter = '•',
  28. bool obscureText = false,
  29. bool autocorrect = false,
  30. SmartDashesType? smartDashesType,
  31. SmartQuotesType? smartQuotesType,
  32. bool enableSuggestions = false,
  33. MaxLengthEnforcement? maxLengthEnforcement,
  34. int maxLines = 1,
  35. int? minLines,
  36. bool expands = false,
  37. int? maxLength,
  38. GestureTapCallback? onTap,
  39. TapRegionCallback? onTapOutside,
  40. VoidCallback? onEditingComplete,
  41. ValueChanged<String>? onFieldSubmitted,
  42. ValueChanged<String?>? onSaved,
  43. String? validator(
    1. String? value
    )?,
  44. List<TextInputFormatter>? inputFormatters,
  45. bool? enabled,
  46. double cursorWidth = 2.0,
  47. double? cursorHeight,
  48. Radius? cursorRadius,
  49. Color? cursorColor,
  50. bool? filled,
  51. Color? fillColor,
  52. Brightness? keyboardAppearance,
  53. EdgeInsets scrollPadding = const EdgeInsets.all(20),
  54. bool? enableInteractiveSelection,
  55. TextSelectionControls? selectionControls,
  56. InputCounterWidgetBuilder? buildCounter,
  57. ScrollPhysics? scrollPhysics,
  58. Iterable<String>? autofillHints,
  59. AutovalidateMode? autovalidateMode,
  60. ScrollController? scrollController,
  61. String? restorationId,
  62. bool enableIMEPersonalizedLearning = false,
  63. MouseCursor? mouseCursor,
  64. EditableTextContextMenuBuilder? contextMenuBuilder,
  65. SpellCheckConfiguration? spellCheckConfiguration,
  66. TextMagnifierConfiguration? magnifierConfiguration,
  67. bool? showCursor,
})

Implementation

const LedgerTextField({
  super.key,
  this.margin,
  this.suffix,
  this.prefix,
  this.label,
  this.hintText,
  this.onClear,
  this.showLabel = true,
  this.showClear = true,
  this.controller,
  this.onChanged,
  this.initialValue,
  this.focusNode,
  this.decoration,
  this.keyboardType,
  this.textCapitalization = TextCapitalization.none,
  this.textInputAction,
  this.style,
  this.hintStyle,
  this.labelStyle,
  this.strutStyle,
  this.textDirection,
  this.textAlign = TextAlign.start,
  this.textAlignVertical,
  this.autofocus = false,
  this.readOnly = false,
  this.obscuringCharacter = '•',
  this.obscureText = false,
  this.autocorrect = false,
  this.smartDashesType,
  this.smartQuotesType,
  this.enableSuggestions = false,
  this.maxLengthEnforcement,
  this.maxLines = 1,
  this.minLines,
  this.expands = false,
  this.maxLength,
  this.onTap,
  this.onTapOutside,
  this.onEditingComplete,
  this.onFieldSubmitted,
  this.onSaved,
  this.validator,
  this.inputFormatters,
  this.enabled,
  this.cursorWidth = 2.0,
  this.cursorHeight,
  this.cursorRadius,
  this.cursorColor,
  this.filled,
  this.fillColor,
  this.keyboardAppearance,
  this.scrollPadding = const EdgeInsets.all(20),
  this.enableInteractiveSelection,
  this.selectionControls,
  this.buildCounter,
  this.scrollPhysics,
  this.autofillHints,
  this.autovalidateMode,
  this.scrollController,
  this.restorationId,
  this.enableIMEPersonalizedLearning = false,
  this.mouseCursor,
  this.contextMenuBuilder,
  this.spellCheckConfiguration,
  this.magnifierConfiguration,
  this.showCursor,
}) : assert(
        showLabel && label != null,
        'Please provide label or make showLabel false',
      );