Skip to content

feat(cupertino): audio and subtitle track menus, live subtitles - #979

Merged
diegotori merged 1 commit into
fluttercommunity:masterfrom
Fullphysio:feat/cupertino-tracks
Nov 17, 2026
Merged

diegotori merged 1 commit into
fluttercommunity:masterfrom
Fullphysio:feat/cupertino-tracks

Conversation

@Ortes

@Ortes Ortes commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

CupertinoControls gets the track support MaterialControls already has since #948 and #949. Nothing changes when no tracks are set.

  • Renders liveSubtitle while a subtitle track is on, the static subtitle list otherwise.
  • Shows the subtitle toggle for tracks too. The toggle selects the active track, else the first one, or turns subtitles off.
  • Adds Audio and Subtitles entries to the options. Each opens an action sheet that marks the active track; Subtitles has an Off row.
  • Shows the options button when tracks exist without additionalOptions.
  • Rebuilds on ChewieController notifications, so tracks set after load appear.

Tests: test/cupertino/cupertino_tracks_test.dart. Full suite passes.

Independent of #978. If both land, the toggle on Cupertino can pick defaultSubtitleTrack instead of the first track: a one-line follow-up.

Proposed CHANGELOG entry:

  • ⬆️ Cupertino controls: audio and subtitle track menus, and live subtitles.

Screenshots (iPhone 17 Pro simulator, demo tracks)

Live subtitle Options Subtitles Audio
cupertino_live cupertino_options cupertino_subtitles cupertino_audio

Material, same state, for comparison:

Live subtitle Options
material_live material_options

@codecov

codecov Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.84946% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.98%. Comparing base (874afe7) to head (b4cd2de).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
lib/src/cupertino/cupertino_controls.dart 97.84% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #979      +/-   ##
==========================================
+ Coverage   82.67%   83.98%   +1.31%     
==========================================
  Files          48       48              
  Lines        2978     3060      +82     
==========================================
+ Hits         2462     2570     +108     
+ Misses        516      490      -26     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

CupertinoControls now matches MaterialControls for selectable tracks:
- renders liveSubtitle while a subtitle track is on, the static subtitle
  list otherwise;
- shows the subtitle toggle for tracks too, and the toggle selects the
  active-or-first track or null;
- adds Audio and Subtitles entries to the options, each opening an action
  sheet that marks the active track (Subtitles has an Off row);
- shows the options button when tracks exist without additionalOptions;
- rebuilds on ChewieController notifications, so tracks set after load
  appear.

Nothing changes when no tracks are set.
@Ortes
Ortes force-pushed the feat/cupertino-tracks branch from c199300 to b4cd2de Compare November 17, 2026 22:29

@diegotori diegotori left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@diegotori
diegotori merged commit 1ef6ee5 into fluttercommunity:master Nov 17, 2026
5 checks passed
diegotori added a commit that referenced this pull request Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants