-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[video_player] bugfix caption still showing when text is empty #3374
[video_player] bugfix caption still showing when text is empty #3374
Conversation
Merge master
…f the text was empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again @vanlooverenkoen - LGTM
CI failure appears to be unrelated - failed to clone flutter git repository.
cc @cyanglaz - this one is good to go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
# Conflicts: # packages/video_player/video_player/CHANGELOG.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, but needs a test. Could you add a widget test covering this case?
Master merge
# Conflicts: # packages/video_player/video_player/CHANGELOG.md # packages/video_player/video_player/pubspec.yaml
# Conflicts: # packages/video_player/video_player/CHANGELOG.md # packages/video_player/video_player/pubspec.yaml
build_all_plugins_ipa timedout. How can I fix that? |
@stuartmorgan the tests are added for this regression issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! Sorry for the delay getting back to this review.
@@ -914,11 +914,12 @@ class ClosedCaption extends StatelessWidget { | |||
/// Creates a a new closed caption, designed to be used with | |||
/// [VideoPlayerValue.caption]. | |||
/// | |||
/// If [text] is null, nothing will be displayed. | |||
/// If [text] is null or empty, nothing will be displayed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally text
should be non-nullable with a default to ''
so that we don't have two ways of expressing the same thing, but unfortunately that would be a breaking change at this point.
I've resolved the version bump conflicts; I expect web tests to fail here due to an infra issue we're having at the moment, in which case merging in master again tomorrow should fix it. |
Description
Caption widget will still show the dark background if the text is empty. If null it would already be hidden.
Related Issues
#Fixed flutter/flutter#72999
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).flutter analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?