Switch
A representation of Switch.
NikuListView
accepts all the props as same as ListView.
dart
// Using namespace
n.Switch(true);
// Using Niku Prefix
NikuSwitch(true);
Example Usage
dart
n.Switch(state)
..onChanged = updateState;
Using Cupertino Switch
dart
n.Switch.cupertino(state)
..onChanged = updateState;
Using adaptive
dart
n.Switch.adaptive(state)
..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 |