InputField.fromFieldStyleText constructor
InputField.fromFieldStyleText({
- required Field field,
- FieldStyleTextField? style,
- FormValidator? formValidator,
- dynamic onChanged(
- String value
Implementation
InputField.fromFieldStyleText({
required Field field,
FieldStyleTextField? style,
FormValidator? formValidator,
Function(String value)? onChanged,
}) : this(
field: field,
labelText: field.name,
stateName: field.stateKey,
controller: TextEditingController(
text: _formatInitialText(
field.value?.toString() ?? field.dummyData ?? '',
style?.inputFormatters,
),
),
obscureText: style?.obscureText ?? false,
autoFocus: field.autofocus || (style?.autoFocus ?? false),
keyboardType: style?.keyboardType ?? TextInputType.text,
textAlign: style?.textAlign,
validateOnFocusChange: style?.validateOnFocusChange ?? false,
maxLines: style?.maxLines ?? 1,
minLines: style?.minLines,
handleValidationError: style?.handleValidationError,
enableSuggestions: style?.enableSuggestions ?? true,
hintText: style?.hintText,
hintStyle: style?.hintStyle,
focusNode: style?.focusNode,
formValidator: formValidator,
dummyData: style?.dummyData,
onChanged: onChanged,
strutStyle: style?.strutStyle,
textInputAction: style?.textInputAction,
readOnly: style?.readOnly ?? false,
showCursor: style?.showCursor,
maxLength: style?.maxLength,
enabled: style?.enabled ?? true,
dragStartBehavior: style?.dragStartBehavior ?? DragStartBehavior.start,
cursorHeight: style?.cursorHeight,
cursorRadius: style?.cursorRadius,
cursorColor: style?.cursorColor,
onTap: style?.onTap,
onTapOutside: style?.onTapOutside,
mouseCursor: style?.mouseCursor,
textCapitalization:
style?.textCapitalization ?? TextCapitalization.none,
maxLengthEnforcement:
style?.maxLengthEnforcement ?? MaxLengthEnforcement.enforced,
cursorWidth: style?.cursorWidth ?? 2.0,
onAppPrivateCommand: style?.onAppPrivateCommand,
inputFormatters: style?.inputFormatters ?? const [],
expands: style?.expands ?? false,
textAlignVertical: style?.textAlignVertical,
textDirection: style?.textDirection,
obscuringCharacter: style?.obscuringCharacter ?? '•',
autocorrect: style?.autocorrect ?? true,
smartDashesType: style?.smartDashesType,
smartQuotesType: style?.smartQuotesType,
decoration: style?.decoration,
onEditingComplete: style?.onEditingComplete,
keyboardAppearance: style?.keyboardAppearance,
scrollPadding: style?.scrollPadding ?? const EdgeInsets.all(20.0),
selectionControls: style?.selectionControls,
onSubmitted: style?.onSubmitted,
scrollController: style?.scrollController,
scrollPhysics: style?.scrollPhysics,
autofillHints: style?.autofillHints ?? const <String>[],
clipBehavior: style?.clipBehavior ?? Clip.hardEdge,
passwordVisible: style?.passwordVisible,
passwordViewable: style?.passwordViewable,
prefixIcon: style?.prefixIcon,
suffixIcon: style?.suffixIcon,
backgroundColor: style?.backgroundColor,
borderRadius: style?.borderRadius,
border: style?.border,
focusedBorder: style?.focusedBorder,
enabledBorder: style?.enabledBorder,
contentPadding: style?.contentPadding,
labelStyle: style?.labelStyle,
header: style?.header,
footer: style?.footer,
clearable: style?.clearable,
clearIcon: style?.clearIcon,
mask: style?.mask,
maskMatch: style?.maskMatch,
maskedReturnValue: style?.maskedReturnValue,
decorator: style?.decorator,
);