diagramo_textfield 0.0.1 diagramo_textfield: ^0.0.1 copied to clipboard
CustomTextFormField is a versatile Flutter widget designed for creating customizable text input fields. It supports features like labels, hint text, icons, validation, and flexible styling options, ma [...]
CustomTextFormField Widget #
A custom text form field widget designed for Flutter applications. This widget provides several customization options including label, hint text, icons, validation, and more. It is useful for forms and user inputs.
Features #
- Label: Display a label above the text field.
- Hint Text: A helper message inside the text field to guide the user.
- Customizable Border: Change border color and radius.
- Icons: Add prefix and suffix icons to the text field.
- Validation: Supports custom validation logic.
- Obscure Text: Option to obscure the text for password fields.
- Flexible Layout: Custom flex values to manage the space in the layout.
Parameters #
Name | Type | Description |
---|---|---|
label |
String? |
Field label displayed above the text field. |
hint |
String? |
Hint text displayed inside the text field. |
borderColor |
Color? |
Color of the text field border. |
textStyle |
TextStyle? |
Style for the text inside the field. |
controller |
TextEditingController? |
Controller for managing the text input. |
onChanged |
Function(String)? |
Callback when the text changes. |
obscureText |
bool? |
Whether to obscure text (useful for password fields). |
keyboardType |
TextInputType? |
The type of keyboard to use (text, number, email, etc.). |
prefixIcon |
Icon? |
Icon displayed on the left side of the field. |
suffixIcon |
Icon? |
Icon displayed on the right side of the field. |
fillColor |
Color? |
Background color of the field. |
filled |
bool? |
Whether the field should be filled with the background color. |
errorText |
String? |
Error message to display during validation. |
borderRadius |
BorderRadius? |
Rounding of the text field's border corners. |
flex |
int? |
Flex value to control layout flexibility. |
validator |
String? Function(String?)? |
Validator function to handle input validation. |