Switch
Toggle boolean state with smooth animation.
Installation
bash
bricolage_ui add switchbash
flutter pub add bricolage_uiUsage
dart
CustomSwitch(
value: isEnabled,
onChanged: (value) {
setState(() {
isEnabled = value;
});
},
)API Reference
Properties
| Property | Type | Default | Description |
|---|---|---|---|
value | bool | required | Current switch state |
onChanged | ValueChanged? | null | Callback when state changes |
