InputField.fromFieldInfo constructor
InputField.fromFieldInfo(
- FieldInfo info, {
- double? labelFieldSpace,
- Color? borderColor,
- double? elevation,
- EdgeInsets? contentPadding,
- InputDecoration? inputDecoration,
- InputDecorationBuilder? inputDecorationBuilder,
- Color? fillColor,
- TextStyle? textStyle,
- TextStyle? allTextStyle,
- TextStyle? labelStyle,
- TextStyle? hintStyle,
- TextStyle? innerLabelStyle,
- bool? labelIsBold,
- BorderRadius? borderRadius,
- FocusNode? focusNode,
- TextDirection? textDirection,
- TextAlign? textAlign,
- Key? key,
This constructor takes a field info object for the main properties (used mostly for forms)
Implementation
InputField.fromFieldInfo(
FieldInfo info, {
this.labelFieldSpace,
this.borderColor,
this.elevation,
this.contentPadding,
this.inputDecoration,
this.inputDecorationBuilder,
this.fillColor,
this.textStyle,
this.allTextStyle,
this.labelStyle,
this.hintStyle,
this.innerLabelStyle,
this.labelIsBold,
this.borderRadius,
this.focusNode,
this.textDirection,
this.textAlign,
super.key,
}) : controller = info.controller,
hintText = info.hint,
prefixIcon = info.prefixIcon,
suffixIcon = info.suffixIcon,
labelText = info.label == null ? null : '${info.label}${(info.required ?? false) ? (info.requiredString ?? ' (Required)') : ''}',
inputType = info.inputType,
isMultiline = info.multiLine,
innerLabelText = info.innerLabel == null
? null
: '${info.innerLabel}${((info.label == null && (info.required ?? false)) ? (info.requiredString ?? '*') : '')}',
onTap = info.onTap,
onTapOutside = info.onTapOutside,
readOnly = info.readOnly,
isObscure = info.isObscure,
minLines = info.minLines,
maxLines = info.maxLines,
onChanged = info.onChanged,
inputFormatters = info.inputFormatters,
validator = info.validator;