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) { builder(devices, currentDevice, setDevice) {
return _Card(title: 'Audio Input Device', children: [ final child = ComboBox(
...devices.map((device) => _Radio<String>(context, keys: devices,
value: device, values: devices,
groupValue: currentDevice, initialKey: currentDevice,
autoNewLine: false, onChanged: (key) async {
label: device, onChanged: (value) { setDevice(key);
setDevice(value);
setState(() {}); setState(() {});
})) },
]); ).marginOnly(left: _kContentHMargin);
return _Card(title: 'Audio Input Device', children: [child]);
} }
return AudioInput(builder: builder, isCm: false, isVoiceCall: false); return AudioInput(builder: builder, isCm: false, isVoiceCall: false);