PremiumTextField constructor

const PremiumTextField({
  1. Key? key,
  2. TextEditingController? controller,
  3. FocusNode? focusNode,
  4. String? label,
  5. String? hint,
  6. String? helperText,
  7. String? errorText,
  8. String? prefixText,
  9. String? suffixText,
  10. IconData? leadingIcon,
  11. IconData? trailingIcon,
  12. Widget? leading,
  13. Widget? trailing,
  14. PremiumTextFieldVariant variant = PremiumTextFieldVariant.filled,
  15. bool isPassword = false,
  16. bool readOnly = false,
  17. bool enabled = true,
  18. bool autofocus = false,
  19. int? maxLines = 1,
  20. int? minLines,
  21. int? maxLength,
  22. TextInputType? keyboardType,
  23. TextInputAction? textInputAction,
  24. TextCapitalization textCapitalization = TextCapitalization.none,
  25. List<TextInputFormatter>? inputFormatters,
  26. String? validator(
    1. String?
    )?,
  27. ValueChanged<String>? onChanged,
  28. ValueChanged<String>? onSubmitted,
  29. VoidCallback? onEditingComplete,
  30. VoidCallback? onTap,
  31. VoidCallback? onTrailingTap,
  32. Color? primaryColor,
  33. Color? errorColor,
  34. Color? backgroundColor,
  35. double? borderRadius,
  36. EdgeInsetsGeometry? contentPadding,
  37. bool isDarkMode = true,
  38. bool showCounter = false,
  39. ModernStyleOptions? styleOptions,
})

Implementation

const PremiumTextField({
  super.key,
  this.controller,
  this.focusNode,
  this.label,
  this.hint,
  this.helperText,
  this.errorText,
  this.prefixText,
  this.suffixText,
  this.leadingIcon,
  this.trailingIcon,
  this.leading,
  this.trailing,
  this.variant = PremiumTextFieldVariant.filled,
  this.isPassword = false,
  this.readOnly = false,
  this.enabled = true,
  this.autofocus = false,
  this.maxLines = 1,
  this.minLines,
  this.maxLength,
  this.keyboardType,
  this.textInputAction,
  this.textCapitalization = TextCapitalization.none,
  this.inputFormatters,
  this.validator,
  this.onChanged,
  this.onSubmitted,
  this.onEditingComplete,
  this.onTap,
  this.onTrailingTap,
  this.primaryColor,
  this.errorColor,
  this.backgroundColor,
  this.borderRadius,
  this.contentPadding,
  this.isDarkMode = true,
  this.showCounter = false,
  this.styleOptions,
});