Skip to content

Icon Button

Icon Button demo

A representation of Icon Button.

NikuIconButton accepts all the props as same as IconButton.

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

// Using Niku Prefix
NikuIconButton(Icons.home)

Example Usage

dart
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.

dart
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