Last updated:
0 purchases
material neumorphic switch
Material Neumorphic Switch #
Part of Material Neumorphic widgets suit.
Usage #
Used to toggle the on/off state of a single setting.
The switch itself does not maintain any state. Instead, when the state of the switch changes, the widget calls the onChanged callback.
Most widgets that use a switch will listen for the onChanged callback and rebuild the switch with a new value to update the visual appearance of the switch.
notifies a ValueChanged<bool> : onChanged
need a value [bool] parameter
NeumorphicSwitch(
value: _switch2Value,
style: NeumorphicSwitchStyle(
thumbShape: NeumorphicShape.flat,
),
onChanged: (value) {
setState(() {
_switch2Value = value;
});
},
),
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.