fix lan option reaction

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages 2023-09-11 16:42:01 +08:00
parent d0173fbdc5
commit 4d0b660c73

View File

@ -1537,9 +1537,14 @@ Widget _OptionCheckBox(BuildContext context, String label, String key,
isServer
? await mainSetBoolOption(key, option)
: await mainSetLocalBoolOption(key, option);
ref.value = isServer
final readOption = isServer
? mainGetBoolOptionSync(key)
: mainGetLocalBoolOptionSync(key);
if (reverse) {
ref.value = !readOption;
} else {
ref.value = readOption;
}
update?.call();
}
}