hide blodeuwedd in settings if not supported
This commit is contained in:
parent
68c83f2c9a
commit
e0546eb502
|
@ -162,27 +162,29 @@ class _GlobalSettingsExperimentsViewState extends State<GlobalSettingsExperiment
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
SwitchListTile(
|
Visibility(
|
||||||
title: Text(AppLocalizations.of(context)!.blodeuweddExperimentEnable),
|
visible: Provider.of<FlwtchState>(context, listen: false).cwtch.IsBlodeuweddSupported(),
|
||||||
subtitle: Provider.of<FlwtchState>(context, listen: false).cwtch.IsBlodeuweddSupported()
|
child: SwitchListTile(
|
||||||
? Text(AppLocalizations.of(context)!.blodeuweddDescription)
|
title: Text(AppLocalizations.of(context)!.blodeuweddExperimentEnable),
|
||||||
: Text(AppLocalizations.of(context)!.blodeuweddNotSupported),
|
subtitle: Provider.of<FlwtchState>(context, listen: false).cwtch.IsBlodeuweddSupported()
|
||||||
value: Provider.of<FlwtchState>(context, listen: false).cwtch.IsBlodeuweddSupported() && settings.isExperimentEnabled(BlodeuweddExperiment),
|
? Text(AppLocalizations.of(context)!.blodeuweddDescription)
|
||||||
onChanged: Provider.of<FlwtchState>(context, listen: false).cwtch.IsBlodeuweddSupported()
|
: Text(AppLocalizations.of(context)!.blodeuweddNotSupported),
|
||||||
? (bool value) {
|
value: Provider.of<FlwtchState>(context, listen: false).cwtch.IsBlodeuweddSupported() && settings.isExperimentEnabled(BlodeuweddExperiment),
|
||||||
if (value) {
|
onChanged: Provider.of<FlwtchState>(context, listen: false).cwtch.IsBlodeuweddSupported()
|
||||||
settings.enableExperiment(BlodeuweddExperiment);
|
? (bool value) {
|
||||||
} else {
|
if (value) {
|
||||||
settings.disableExperiment(BlodeuweddExperiment);
|
settings.enableExperiment(BlodeuweddExperiment);
|
||||||
|
} else {
|
||||||
|
settings.disableExperiment(BlodeuweddExperiment);
|
||||||
|
}
|
||||||
|
saveSettings(context);
|
||||||
}
|
}
|
||||||
saveSettings(context);
|
: null,
|
||||||
}
|
activeTrackColor: settings.theme.defaultButtonColor,
|
||||||
: null,
|
inactiveTrackColor: settings.theme.defaultButtonDisabledColor,
|
||||||
activeTrackColor: settings.theme.defaultButtonColor,
|
inactiveThumbColor: settings.theme.defaultButtonDisabledColor,
|
||||||
inactiveTrackColor: settings.theme.defaultButtonDisabledColor,
|
secondary: Icon(Icons.assistant, color: settings.current().mainTextColor),
|
||||||
inactiveThumbColor: settings.theme.defaultButtonDisabledColor,
|
)),
|
||||||
secondary: Icon(Icons.assistant, color: settings.current().mainTextColor),
|
|
||||||
),
|
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: Provider.of<FlwtchState>(context, listen: false).cwtch.IsBlodeuweddSupported() && settings.isExperimentEnabled(BlodeuweddExperiment),
|
visible: Provider.of<FlwtchState>(context, listen: false).cwtch.IsBlodeuweddSupported() && settings.isExperimentEnabled(BlodeuweddExperiment),
|
||||||
child: CwtchFolderPicker(
|
child: CwtchFolderPicker(
|
||||||
|
|
Loading…
Reference in New Issue