RistoTextField.password constructor

RistoTextField.password({
  1. Key? key,
  2. TextEditingController? controller,
  3. String? title,
  4. String? hint,
  5. String? validator(
    1. String?
    )?,
  6. void onChanged(
    1. String
    )?,
  7. void onSubmitted(
    1. String
    )?,
  8. FocusNode? focusNode,
  9. EdgeInsetsGeometry? margin,
  10. double borderRadius = 12.0,
  11. Widget? innerLeading,
  12. bool horizontalLayout = false,
  13. Color? fillColor,
  14. Color? borderColor,
  15. Color? focusedBorderColor,
  16. EdgeInsetsGeometry? contentPadding,
  17. double? fieldHeight,
})

Implementation

factory RistoTextField.password({
  Key? key,
  TextEditingController? controller,
  String? title,
  String? hint,
  String? Function(String?)? validator,
  void Function(String)? onChanged,
  void Function(String)? onSubmitted,
  FocusNode? focusNode,
  EdgeInsetsGeometry? margin,
  double borderRadius = 12.0,
  Widget? innerLeading,
  bool horizontalLayout = false,
  Color? fillColor,
  Color? borderColor,
  Color? focusedBorderColor,
  EdgeInsetsGeometry? contentPadding,
  double? fieldHeight,
}) {
  return RistoTextField(
    key: key,
    controller: controller,
    title: title ?? 'Password',
    hint: hint ?? '••••••••',
    isSecret: true,
    innerLeading: innerLeading ?? const Icon(Icons.lock_outline),
    validator: validator,
    onChanged: onChanged,
    onSubmitted: onSubmitted,
    focusNode: focusNode,
    margin: margin,
    borderRadius: borderRadius,
    horizontalLayout: horizontalLayout,
    fillColor: fillColor,
    borderColor: borderColor,
    focusedBorderColor: focusedBorderColor,
    contentPadding: contentPadding,
    fieldHeight: fieldHeight,
    counterText: '',
  );
}