FancyPasswordField constructor
const
FancyPasswordField({
- Key? key,
- ValueChanged<
String> ? onChanged, - FormFieldSetter<
String> ? onSaved, - FormFieldValidator<
String> ? validator, - InputDecoration? decoration,
- TextEditingController? controller,
- Set<
ValidationRule> validationRules = const {}, - bool hasShowHidePassword = true,
- Icon? showPasswordIcon,
- Icon? hidePasswordIcon,
- Widget? showPasswordWidget,
- Widget? hidePasswordWidget,
- bool hasStrengthIndicator = true,
- StrengthIndicatorBuilder? strengthIndicatorBuilder,
- bool hasValidationRules = true,
- ValidationRulesBuilder? validationRuleBuilder,
- FancyPasswordController? passwordController,
- String? initialValue,
- FocusNode? focusNode,
- TextInputType? keyboardType,
- TextCapitalization textCapitalization = TextCapitalization.none,
- TextInputAction? textInputAction,
- TextStyle? style,
- StrutStyle? strutStyle,
- TextDirection? textDirection,
- TextAlign textAlign = TextAlign.start,
- TextAlignVertical? textAlignVertical,
- bool autofocus = false,
- bool readOnly = false,
- bool? showCursor,
- String obscuringCharacter = '•',
- bool autocorrect = true,
- SmartDashesType? smartDashesType,
- SmartQuotesType? smartQuotesType,
- bool enableSuggestions = true,
- MaxLengthEnforcement? maxLengthEnforcement,
- int? maxLines = 1,
- int? minLines,
- bool expands = false,
- int? maxLength,
- GestureTapCallback? onTap,
- VoidCallback? onEditingComplete,
- ValueChanged<
String> ? onFieldSubmitted, - List<
TextInputFormatter> ? inputFormatters, - bool? enabled,
- double cursorWidth = 2.0,
- double? cursorHeight,
- Radius? cursorRadius,
- Color? cursorColor,
- Brightness? keyboardAppearance,
- EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
- bool enableInteractiveSelection = true,
- TextSelectionControls? selectionControls,
- InputCounterWidgetBuilder? buildCounter,
- ScrollPhysics? scrollPhysics,
- Iterable<
String> ? autofillHints, - AutovalidateMode? autovalidateMode,
- ScrollController? scrollController,
- String? restorationId,
- bool enableIMEPersonalizedLearning = true,
- bool? obscureText,
Implementation
const FancyPasswordField({
Key? key,
this.onChanged,
this.onSaved,
this.validator,
this.decoration,
this.controller,
this.validationRules = const {},
this.hasShowHidePassword = true,
this.showPasswordIcon,
this.hidePasswordIcon,
this.showPasswordWidget,
this.hidePasswordWidget,
this.hasStrengthIndicator = true,
this.strengthIndicatorBuilder,
this.hasValidationRules = true,
this.validationRuleBuilder,
this.passwordController,
this.initialValue,
this.focusNode,
this.keyboardType,
this.textCapitalization = TextCapitalization.none,
this.textInputAction,
this.style,
this.strutStyle,
this.textDirection,
this.textAlign = TextAlign.start,
this.textAlignVertical,
this.autofocus = false,
this.readOnly = false,
this.showCursor,
this.obscuringCharacter = '•',
this.autocorrect = true,
this.smartDashesType,
this.smartQuotesType,
this.enableSuggestions = true,
this.maxLengthEnforcement,
this.maxLines = 1,
this.minLines,
this.expands = false,
this.maxLength,
this.onTap,
this.onEditingComplete,
this.onFieldSubmitted,
this.inputFormatters,
this.enabled,
this.cursorWidth = 2.0,
this.cursorHeight,
this.cursorRadius,
this.cursorColor,
this.keyboardAppearance,
this.scrollPadding = const EdgeInsets.all(20.0),
this.enableInteractiveSelection = true,
this.selectionControls,
this.buildCounter,
this.scrollPhysics,
this.autofillHints,
this.autovalidateMode,
this.scrollController,
this.restorationId,
this.enableIMEPersonalizedLearning = true,
this.obscureText,
}) : assert(showPasswordIcon == null || showPasswordWidget == null,
"showPasswordIcon and showPasswordWidget can't be used at the same time"),
assert(hidePasswordIcon == null || hidePasswordWidget == null,
"hidePasswordIcon and hidePasswordWidget can't be used at the same time"),
super(key: key);