fix mobile features

This commit is contained in:
csf
2022-08-05 20:29:43 +08:00
parent a22daccb0c
commit 0ef1659b87
6 changed files with 89 additions and 114 deletions

View File

@@ -887,32 +887,6 @@ class ImagePainter extends CustomPainter {
}
}
CheckboxListTile getToggle(
String id, void Function(void Function()) setState, option, name) {
final opt = bind.getSessionToggleOptionSync(id: id, arg: option);
return CheckboxListTile(
value: opt,
onChanged: (v) {
setState(() {
bind.sessionToggleOption(id: id, value: option);
});
},
dense: true,
title: Text(translate(name)));
}
RadioListTile<String> getRadio(String name, String toValue, String curValue,
void Function(String?) onChange) {
return RadioListTile<String>(
controlAffinity: ListTileControlAffinity.trailing,
title: Text(translate(name)),
value: toValue,
groupValue: curValue,
onChanged: onChange,
dense: true,
);
}
void showOptions(String id) async {
String quality = await bind.getSessionImageQuality(id: id) ?? 'balanced';
if (quality == '') quality = 'balanced';