Skip to content
On this page

Radio

Radio demo

A representation of Radio Buttons.

NikuRadio accepts all the props as same as Radio.

// Using namespace
n.Radio(true);

// Using Niku Prefix
NikuRadio(true);

Example Usage

n.Radio(state)
    ..onChanged = updateState;

Declarative color

Using declarative hook to update MaterialStateProperty, consists of:

  • fillColor
  • overlayColor
n.Radio(state)
    ..onChanged = updateState
    ..useFillColor(
        base: Colors.gray,
        hovered: Colors.blue,
        pressed: Colors.blue,
        focused: Colors.blue,
    )
    ..useOverlayColor(
        all: Colors.blue,
    );

Defination

View Defination on pub.dev