InputField.password constructor
InputField.password({
- Key? key,
- required TextEditingController controller,
- String labelText = "Password",
- bool passwordVisible = true,
- bool obscureText = true,
- bool autoFocus = false,
- TextInputType keyboardType = TextInputType.text,
- TextAlign? textAlign,
- int maxLines = 1,
- bool validateOnFocusChange = false,
- dynamic handleValidationError(
- FormValidationResult handleError
- int? minLines,
- bool enableSuggestions = true,
- String? hintText,
- TextStyle? hintStyle,
- FocusNode? focusNode,
- FormValidator? formValidator,
- String? dummyData,
- dynamic onChanged(
- String value
- TextStyle? style,
- StrutStyle? strutStyle,
- TextInputAction? textInputAction,
- bool readOnly = false,
- bool? showCursor,
- int? maxLength,
- bool? enabled,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- double? cursorHeight,
- Radius? cursorRadius,
- Color? cursorColor,
- GestureTapCallback? onTap,
- TapRegionCallback? onTapOutside,
- MouseCursor? mouseCursor,
- TextCapitalization textCapitalization = TextCapitalization.none,
- MaxLengthEnforcement? maxLengthEnforcement,
- double cursorWidth = 2.0,
- AppPrivateCommandCallback? onAppPrivateCommand,
- List<
TextInputFormatter> ? inputFormatters, - bool expands = false,
- TextAlignVertical? textAlignVertical,
- TextDirection? textDirection,
- String obscuringCharacter = '•',
- bool autocorrect = true,
- SmartDashesType? smartDashesType,
- SmartQuotesType? smartQuotesType,
- InputDecoration? decoration,
- VoidCallback? onEditingComplete,
- Brightness? keyboardAppearance,
- EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
- TextSelectionControls? selectionControls,
- ValueChanged<
String> ? onSubmitted, - ScrollController? scrollController,
- ScrollPhysics? scrollPhysics,
- bool? passwordViewable,
- Iterable<
String> ? autofillHints = const <String>[], - Clip clipBehavior = Clip.hardEdge,
- Widget? prefixIcon,
- Color? backgroundColor,
- BorderRadius? borderRadius,
- InputBorder? border,
- InputBorder? focusedBorder,
- InputBorder? enabledBorder,
- EdgeInsetsGeometry? contentPadding,
- TextStyle? labelStyle,
- Widget? header,
- bool? clearable,
- Widget? clearIcon,
- String? mask,
- String? maskMatch,
- bool? maskedReturnValue,
- DecoratorTextField? decorator,
- String? stateName,
Password Text Field - obscured by default with visibility toggle
Implementation
InputField.password({
Key? key,
required TextEditingController controller,
String labelText = "Password",
bool passwordVisible = true,
bool obscureText = true,
bool autoFocus = false,
TextInputType keyboardType = TextInputType.text,
TextAlign? textAlign,
int maxLines = 1,
bool validateOnFocusChange = false,
Function(FormValidationResult handleError)? handleValidationError,
int? minLines,
bool enableSuggestions = true,
String? hintText,
TextStyle? hintStyle,
FocusNode? focusNode,
FormValidator? formValidator,
String? dummyData,
Function(String value)? onChanged,
TextStyle? style,
StrutStyle? strutStyle,
TextInputAction? textInputAction,
bool readOnly = false,
bool? showCursor,
int? maxLength,
bool? enabled,
DragStartBehavior dragStartBehavior = DragStartBehavior.start,
double? cursorHeight,
Radius? cursorRadius,
Color? cursorColor,
GestureTapCallback? onTap,
TapRegionCallback? onTapOutside,
MouseCursor? mouseCursor,
TextCapitalization textCapitalization = TextCapitalization.none,
MaxLengthEnforcement? maxLengthEnforcement,
double cursorWidth = 2.0,
AppPrivateCommandCallback? onAppPrivateCommand,
List<TextInputFormatter>? inputFormatters,
bool expands = false,
TextAlignVertical? textAlignVertical,
TextDirection? textDirection,
String obscuringCharacter = '•',
bool autocorrect = true,
SmartDashesType? smartDashesType,
SmartQuotesType? smartQuotesType,
InputDecoration? decoration,
VoidCallback? onEditingComplete,
Brightness? keyboardAppearance,
EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
TextSelectionControls? selectionControls,
ValueChanged<String>? onSubmitted,
ScrollController? scrollController,
ScrollPhysics? scrollPhysics,
bool? passwordViewable,
Iterable<String>? autofillHints = const <String>[],
Clip clipBehavior = Clip.hardEdge,
Widget? prefixIcon,
Color? backgroundColor,
BorderRadius? borderRadius,
InputBorder? border,
InputBorder? focusedBorder,
InputBorder? enabledBorder,
EdgeInsetsGeometry? contentPadding,
TextStyle? labelStyle,
Widget? header,
Widget? footer,
bool? clearable,
Widget? clearIcon,
String? mask,
String? maskMatch,
bool? maskedReturnValue,
DecoratorTextField? decorator,
String? stateName,
}) : this(
key: key,
controller: controller,
labelText: labelText,
passwordVisible: passwordVisible,
obscureText: obscureText,
autoFocus: autoFocus,
keyboardType: keyboardType,
textAlign: textAlign,
maxLines: maxLines,
validateOnFocusChange: validateOnFocusChange,
handleValidationError: handleValidationError,
minLines: minLines,
enableSuggestions: enableSuggestions,
hintText: hintText,
hintStyle: hintStyle,
focusNode: focusNode,
formValidator: formValidator,
dummyData: dummyData,
onChanged: onChanged,
style: style,
strutStyle: strutStyle,
textInputAction: textInputAction,
readOnly: readOnly,
showCursor: showCursor,
maxLength: maxLength,
enabled: enabled,
dragStartBehavior: dragStartBehavior,
cursorHeight: cursorHeight,
cursorRadius: cursorRadius,
cursorColor: cursorColor,
onTap: onTap,
onTapOutside: onTapOutside,
mouseCursor: mouseCursor,
textCapitalization: textCapitalization,
maxLengthEnforcement: maxLengthEnforcement,
cursorWidth: cursorWidth,
onAppPrivateCommand: onAppPrivateCommand,
inputFormatters: inputFormatters,
expands: expands,
textAlignVertical: textAlignVertical,
textDirection: textDirection,
obscuringCharacter: obscuringCharacter,
autocorrect: autocorrect,
smartDashesType: smartDashesType,
smartQuotesType: smartQuotesType,
decoration: decoration,
onEditingComplete: onEditingComplete,
keyboardAppearance: keyboardAppearance,
scrollPadding: scrollPadding,
selectionControls: selectionControls,
onSubmitted: onSubmitted,
scrollController: scrollController,
scrollPhysics: scrollPhysics,
passwordViewable: passwordViewable,
autofillHints: autofillHints,
clipBehavior: clipBehavior,
prefixIcon: prefixIcon,
backgroundColor: backgroundColor,
borderRadius: borderRadius,
border: border,
focusedBorder: focusedBorder,
enabledBorder: enabledBorder,
contentPadding: contentPadding,
labelStyle: labelStyle,
header: header,
footer: footer,
clearable: clearable,
clearIcon: clearIcon,
mask: mask,
maskMatch: maskMatch,
maskedReturnValue: maskedReturnValue,
decorator: decorator,
stateName: stateName,
);