Repository navigation
Conversation
cb98203 to
8f75652
Compare
The bottom bar is wrapped in a SafeArea, but the top bar was not, so outside fullscreen its buttons (mute, cast, additional controls) sat under a notch or status rail on devices with a side inset. Pad the top bar by the side insets only, since the player often sits below the embedder's own header where the top inset has already been accounted for. Fixes fluttercommunity#971 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
8f75652 to
6cfcea9
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #972 +/- ##
=======================================
Coverage 82.60% 82.61%
=======================================
Files 48 48
Lines 2967 2968 +1
=======================================
+ Hits 2451 2452 +1
Misses 516 516 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ibrahim-iqbal
left a comment
There was a problem hiding this comment.
Fix is spot on — SafeArea(top: false, bottom: false) with the implicit left: true, right: true is exactly the right shape for a bar that sits inside an embedder that already owns the top inset. The test is particularly nice because the asserted invariant (mute button's right edge stays inside screenWidth - rightInset) is the actual user-facing symptom, so it's resistant to layout refactors.
Two tiny style nits, take or leave:
videoPlayerControllerandchewieControllerin the new test are never reassigned —finalwould read a touch cleaner.expect(muteButton, findsOneWidget)beforetester.getRect(muteButton.first)would make the test fail with a clearer message if the ancestor finder ever matches zero or multiple.
Neither blocks the merge.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Thanks for the review, @ibrahim-iqbal!
@diegotori this is ready for a look when you have a moment. |
Fixes #971.
CupertinoControlswrapped its bottom bar in aSafeAreabut not its top bar, so outside fullscreen the top bar's end-side buttons (mute, cast, additional controls) sat under the notch or status rail on devices with a side inset: an iPhone in landscape, or the iPhone Duo in every pose.The top bar is now wrapped in a
SafeArea(top: false, bottom: false). It's sides only, because the player usually sits below the embedder's own header, where the top inset is already accounted for; padding the top would push the bar down by the status bar's height. In fullscreen,PlayerWithControlsalready applies its ownSafeArea, so nothing changes there.Verified with a test in
test/uninitialized_controls_state_test.dart: the mute button stays clear of a right inset, and it fails without the fix.flutter testandflutter analyzepass.🤖 Generated with Claude Code