Added nullrhi option

This commit is contained in:
Alessandro Autiero
2022-09-27 22:00:31 +02:00
parent 52af8ac646
commit 908936c76c
12 changed files with 226 additions and 42 deletions

View File

@@ -50,11 +50,11 @@ class _SmartSwitchState extends State<SmartSwitch> {
double get _uncheckedOpacity => widget.enabled ? 0.8 : 0.5;
void _onChanged(checked) {
void _onChanged(bool checked) {
if (!widget.enabled) {
return;
}
setState(() => widget.value(checked));
setState(() => widget.value.value = checked);
}
}