PasswordField constructor

PasswordField({
  1. Key? key,
  2. String text = "",
  3. required TextEditingController controller,
  4. String hintText = "",
  5. bool singleLine = true,
  6. TextStyle? titleStyle,
  7. TextStyle? textStyle,
  8. TextStyle? hintStyle,
  9. Color? color,
  10. Color? borderColor,
  11. double? borderWidth,
  12. double radius = 10.0,
  13. TextStyle? errorStyle,
  14. Color? iconColor,
  15. bool error = false,
  16. String? errorText,
  17. dynamic onChanged(
    1. String
    )?,
  18. Color? enabledColor,
  19. Color? focusedColor,
  20. String? labelText,
  21. TextStyle? labelStyle,
  22. bool isUnderline = true,
  23. bool expands = false,
  24. double? width,
  25. double? height,
  26. TextInputType textInputType = TextInputType.text,
  27. Color? bacgroundColor,
  28. EdgeInsetsGeometry? padding = EdgeInsets.zero,
  29. EdgeInsetsGeometry? innerPadding,
  30. bool noInputBorder = false,
  31. int flex = 1,
})

Implementation

PasswordField(
    {super.key,
    this.text = "",
    required this.controller,
    this.hintText = "",
    this.singleLine = true,
    TextStyle? titleStyle,
    TextStyle? textStyle,
    TextStyle? hintStyle,
    this.color,
    this.borderColor,
    this.borderWidth,
    this.radius = 10.0,
    TextStyle? errorStyle,
    Color? iconColor,
    this.error = false,
    this.errorText,
    this.onChanged,
    Color? enabledColor,
    Color? focusedColor,
    this.labelText,
    TextStyle? labelStyle,
    this.isUnderline = true,
    this.expands = false,
    this.width,
    this.height,
    this.textInputType = TextInputType.text,
    this.bacgroundColor,
    this.padding = EdgeInsets.zero,
    EdgeInsetsGeometry? innerPadding,
    this.noInputBorder = false,
    this.flex = 1})
    : innerPadding =
          innerPadding ?? const EdgeInsets.symmetric(horizontal: 10),
      titleStyle = titleStyle ??
          (Rixa.properties.anyMobile
              ? Get.find<AppFonts>().S(fontWeight: FontWeight.w600)
              : Get.find<AppFonts>().S(fontWeight: FontWeight.w600)),
      iconColor = iconColor ?? Get.find<AppColors>().iconColor,
      textStyle = textStyle ?? Get.find<AppFonts>().S(),
      labelStyle = labelStyle ?? Get.find<AppFonts>().S(),
      errorStyle = errorStyle ?? Get.find<AppFonts>().xS(color: Colors.red),
      hintStyle = hintStyle ??
          Get.find<AppFonts>().xS(color: Get.find<AppColors>().hintColor),
      enabledColor = enabledColor ?? Get.find<AppColors>().textColor,
      focusedColor = focusedColor ?? Colors.cyan,
      enabledBorder = !noInputBorder && isUnderline
          ? UnderlineInputBorder(
              borderSide: BorderSide(
                  color: enabledColor ?? Get.find<AppColors>().textColor),
            )
          : !noInputBorder && !isUnderline
              ? OutlineInputBorder(
                  borderSide: BorderSide(
                      color: enabledColor ?? Get.find<AppColors>().textColor),
                  borderRadius: BorderRadius.circular(radius))
              : null,
      focusedBorder = !noInputBorder && isUnderline
          ? UnderlineInputBorder(
              borderSide: BorderSide(color: focusedColor ?? Colors.cyan),
            )
          : !noInputBorder && !isUnderline
              ? OutlineInputBorder(
                  borderSide: BorderSide(color: focusedColor ?? Colors.cyan),
                  borderRadius: BorderRadius.circular(radius))
              : null,
      border = borderColor != null || borderWidth != null
          ? Border.all(
              width: borderWidth ?? 1,
              color: borderColor ?? Get.find<AppColors>().textColor)
          : null;