Hello developers in this tutorial we will discuss about how to make textFormField decorate in flutter
S.no | Contents-topics |
---|---|
1 | What is Textfield or textformfield |
2 | Decorate with Icons |
3 | Decorate with Hint text |
4 | Decorate with Borders |
Working of Flutter forms or on any screen where user enters his input is used as TextField or TextFormField , in both widgets we are getting input from the user.
So in thses widgets we have an option of decoration as
Widget? icon,
Color? iconColor,
Widget? label,
String? labelText,
TextStyle? labelStyle,
TextStyle? floatingLabelStyle,
String? helperText,
TextStyle? helperStyle,
int? helperMaxLines,
String? hintText,
TextStyle? hintStyle,
TextDirection? hintTextDirection,
int? hintMaxLines,
String? errorText,
TextStyle? errorStyle,
int? errorMaxLines,
FloatingLabelBehavior? floatingLabelBehavior,
FloatingLabelAlignment? floatingLabelAlignment,
bool isCollapsed = false,
bool? isDense,
EdgeInsetsGeometry? contentPadding,
Widget? prefixIcon,
BoxConstraints? prefixIconConstraints,
in this tutorial we will see some basics TextFields decoration
Working with icons we options to set icons as prefixIcon and suffixicon
Copy for prefixicon and suffixiconCopy
Also read: BOX DECORATION IN FLUTTER 3 , DECORATE CONTAINER IN FLUTTER 3
hint text decoration code: Copy
InputBorder.none
inputBorder code: Copy
Also read: WHAT IS FLUTTER & DART , WHY TO CHOOSE FLUTTER , FLUTTER FEATURES
UnderlineInputBorder()
UnderlineInputBorder code: Copy
OutlineInputBorder()
OutlineInputBorder code: Copy
Specifying border type focussedBorder , enabledBorder, disabledBorder , errorBorder and focussedErrorBorder
code: Copy
0 Comments (Please let us know your query)