Skip to content
On this page

Text Form Field

Text Form Field demo

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 MethodEquivalent Widget
n.TextFormFieldTextFormField
n.TextFormField.cupertinoCupertinoTextField
n.TextFormField.adaptive-
n.TextFormField.hint-
n.TextFormField.label-

Defination

View Defination on pub.dev