Skip to content
On this page

Icon Button

Icon Button demo

A representation of Icon Button.

NikuIconButton accepts all the props as same as IconButton.

// Using namespace
n.IconButton(Icons.home)

// Using Niku Prefix
NikuIconButton(Icons.home)

Example Usage

n.IconButton(Icons.home)
    ..onPressed = handlePress
    ..iconSize = 24
    ..splshColor = Colors.blue.withOpacity(.125)
    ..p = 16;

Using IconButton.widget

You can pass any widget into IconButton not limited to icon.

n.IconButton("π".n)
    ..onPressed = handlePress
    ..iconSize = 24;

Factory Method

Niku can accepts 2 factory method.

Factory MethodEquivalent Widget
n.IconButtonIconButton
n.IconButton.widget-

Defination

View Defination on pub.dev