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

@@ -352,6 +352,23 @@ RadioListTile<T> getRadio<T>(
);
}
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);
});
if (option == "show-quality-monitor") {
gFFI.qualityMonitorModel.checkShowQualityMonitor(id);
}
},
dense: true,
title: Text(translate(name)));
}
/// find ffi, tag is Remote ID
/// for session specific usage
FFI ffi(String? tag) {