video: fixed disabling subtitles
This commit is contained in:
parent
0fc2710e62
commit
b34487f766
1 changed files with 3 additions and 2 deletions
|
@ -143,8 +143,9 @@ class _VideoStreamSelectionDialogState extends State<VideoStreamSelectionDialog>
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||||
child: TextDropdownButton<MediaStreamSummary>(
|
// allow `null` subtitle stream to disable subtitles
|
||||||
values: streams.whereNotNull().toList(),
|
child: TextDropdownButton<MediaStreamSummary?>(
|
||||||
|
values: streams,
|
||||||
valueText: _streamName,
|
valueText: _streamName,
|
||||||
value: current,
|
value: current,
|
||||||
onChanged: streams.length > 1 ? (newValue) => setState(() => setter(newValue)) : null,
|
onChanged: streams.length > 1 ? (newValue) => setState(() => setter(newValue)) : null,
|
||||||
|
|
Loading…
Reference in a new issue