Appearance
Switch
A representation of Switch.
NikuListView
accepts all the props as same as ListView.
// Using namespace
n.Switch(true);
// Using Niku Prefix
NikuSwitch(true);
Example Usage
n.Switch(state)
..onChanged = updateState;
Using Cupertino Switch
n.Switch.cupertino(state)
..onChanged = updateState;
Using adaptive
n.Switch.adaptive()
..activeColor = Colors.amber
..onChanged = updateState;
Factory Method
Niku can accepts 3 factory method.
Factory Method | Equivalent Widget |
---|---|
n.Switch | Switch |
n.Switch.cupertino | CupertinoSwitch |
n.Switch.adaptive | Switch.adaptive |