LedgerTextField constructor
const
LedgerTextField({
- Key? key,
- EdgeInsets? margin,
- Widget? suffix,
- Widget? prefix,
- String? label,
- String? hintText,
- ValueChanged<
String> ? onClear, - bool showLabel = true,
- bool showClear = true,
- TextEditingController? controller,
- ValueChanged<
String> ? onChanged, - String? initialValue,
- FocusNode? focusNode,
- InputDecoration? decoration,
- TextInputType? keyboardType,
- TextCapitalization textCapitalization = TextCapitalization.none,
- TextInputAction? textInputAction,
- TextStyle? style,
- TextStyle? hintStyle,
- TextStyle? labelStyle,
- StrutStyle? strutStyle,
- TextDirection? textDirection,
- TextAlign textAlign = TextAlign.start,
- TextAlignVertical? textAlignVertical,
- bool autofocus = false,
- bool readOnly = false,
- String obscuringCharacter = '•',
- bool obscureText = false,
- bool autocorrect = false,
- SmartDashesType? smartDashesType,
- SmartQuotesType? smartQuotesType,
- bool enableSuggestions = false,
- MaxLengthEnforcement? maxLengthEnforcement,
- int maxLines = 1,
- int? minLines,
- bool expands = false,
- int? maxLength,
- GestureTapCallback? onTap,
- TapRegionCallback? onTapOutside,
- VoidCallback? onEditingComplete,
- ValueChanged<
String> ? onFieldSubmitted, - ValueChanged<
String?> ? onSaved, - String? validator(
- String? value
- List<
TextInputFormatter> ? inputFormatters, - bool? enabled,
- double cursorWidth = 2.0,
- double? cursorHeight,
- Radius? cursorRadius,
- Color? cursorColor,
- bool? filled,
- Color? fillColor,
- Brightness? keyboardAppearance,
- EdgeInsets scrollPadding = const EdgeInsets.all(20),
- bool? enableInteractiveSelection,
- TextSelectionControls? selectionControls,
- InputCounterWidgetBuilder? buildCounter,
- ScrollPhysics? scrollPhysics,
- Iterable<
String> ? autofillHints, - AutovalidateMode? autovalidateMode,
- ScrollController? scrollController,
- String? restorationId,
- bool enableIMEPersonalizedLearning = false,
- MouseCursor? mouseCursor,
- EditableTextContextMenuBuilder? contextMenuBuilder,
- SpellCheckConfiguration? spellCheckConfiguration,
- TextMagnifierConfiguration? magnifierConfiguration,
- 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',
);