flutter desktop Codec Preference

This commit is contained in:
csf
2022-09-16 19:43:28 +08:00
parent e3a5218eb1
commit c6e1e84c72
5 changed files with 152 additions and 84 deletions

View File

@@ -219,17 +219,12 @@ class _GeneralState extends State<_General> {
}
Widget hwcodec() {
return _futureBuilder(
future: bind.mainHasHwcodec(),
hasData: (data) {
return Offstage(
offstage: !(data as bool),
child: _Card(title: 'Hardware Codec', children: [
_OptionCheckBox(
context, 'Enable hardware codec', 'enable-hwcodec'),
]),
);
});
return Offstage(
offstage: !bind.mainHasHwcodec(),
child: _Card(title: 'Hardware Codec', children: [
_OptionCheckBox(context, 'Enable hardware codec', 'enable-hwcodec'),
]),
);
}
Widget audio(BuildContext context) {