refact: audio input, combobox instead of radio (#8965)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou 2024-08-06 17:07:05 +08:00 committed by GitHub
parent 5a2121501d
commit 51b250435d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -515,16 +515,16 @@ class _GeneralState extends State<_General> {
}
builder(devices, currentDevice, setDevice) {
return _Card(title: 'Audio Input Device', children: [
...devices.map((device) => _Radio<String>(context,
value: device,
groupValue: currentDevice,
autoNewLine: false,
label: device, onChanged: (value) {
setDevice(value);
setState(() {});
}))
]);
final child = ComboBox(
keys: devices,
values: devices,
initialKey: currentDevice,
onChanged: (key) async {
setDevice(key);
setState(() {});
},
).marginOnly(left: _kContentHMargin);
return _Card(title: 'Audio Input Device', children: [child]);
}
return AudioInput(builder: builder, isCm: false, isVoiceCall: false);