Skip to content
On this page

Button

Button demo

A representation of Button.

NikuButton accepts all the props as same as Button.

// Using namespace
n.Button("".n);

// Using Niku Prefix
NikuButton("".n);

Example Usage

n.Button("My Button".n)
    ..color = Colors.blue
    ..splash = Colors.blue.withOpacity(.1)
    ..fontSize = 16
    ..bold
    ..rounded = 8
    ..px = 16
    ..py = 8;

Factory Method

Niku can accepts 6 factory method.

Factory MethodEquivalent Widget
n.ButtonTextButton
n.Button.iconTextButton.icon
n.Button.elevatedElevatedButton
n.Button.elevatedIconElevatedButton.icon
n.Button.outlinedOutlinedButton
n.Button.outlinedIconOutlineButton.icon

Defination

View Defination on pub.dev