|
|
@ -13,13 +13,10 @@ class ToggleSettingsTile extends InputSettingsTile<ToggleOption> { |
|
|
|
@override |
|
|
|
@override |
|
|
|
Widget build(final BuildContext context) => ValueListenableBuilder( |
|
|
|
Widget build(final BuildContext context) => ValueListenableBuilder( |
|
|
|
valueListenable: option, |
|
|
|
valueListenable: option, |
|
|
|
builder: (final context, final value, final child) => CheckboxListTile.adaptive( |
|
|
|
builder: (final context, final value, final child) => SwitchListTile.adaptive( |
|
|
|
enabled: option.enabled, |
|
|
|
|
|
|
|
title: child, |
|
|
|
title: child, |
|
|
|
value: value, |
|
|
|
value: value, |
|
|
|
onChanged: (final value) { |
|
|
|
onChanged: option.enabled ? (final value) => option.value = value : null, |
|
|
|
option.value = value!; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
child: Text(option.label(context)), |
|
|
|
child: Text(option.label(context)), |
|
|
|
); |
|
|
|
); |
|
|
|