Appearance
Text Form Field
A representation of Text Field.
NikuTextFormField
accepts all the props as same as TextField.
// Using namespace
n.TextFormField();
// Using Niku Prefix
NikuTextFormField();
Example Usage
n.TextFormField()
..controller = controller
..labelText = "Username";
As password
n.TextFormField()
..asPassword
..labelText = "Password";
Adding prefix icon
n.TextFormField()
..prefixIcon = Icon(Icons.edit);
Decorate as outlined
n.TextFormField()
..outlined;
Decorate as filled
n.TextFormField()
..isFilled;
Remove underline
n.TextFormField()
..noUnderline;
Set prefix/suffix style
n.TextFormField()
..labelText = "Value"
..usePrefixStyle((v) => v..color = Colors.white);
Decorate border
n.TextFormField()
..rounded = 16
..useBorderWidth(all: 2)
..useBorderColor(bottom: Colors.blue);
Factory Method
Niku can accepts 5 factory method.
Factory Method | Equivalent Widget |
---|---|
n.TextFormField | TextFormField |
n.TextFormField.cupertino | CupertinoTextField |
n.TextFormField.adaptive | - |
n.TextFormField.hint | - |
n.TextFormField.label | - |