-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[camera,video_player] replace onSurfaceDestroyed with onSurfaceCleanup #9316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[camera,video_player] replace onSurfaceDestroyed with onSurfaceCleanup #9316
Conversation
@matanlurey Have I correctly understood that we no longer need all the save/restore, as discussed in the issue thread? A quick manual test suggests that it works, but I don't know if there were more subtle problems that led to the save/restore approach. |
The (implicit - Dart SDK bump) formatter rev makes this harder to review - would you consider doing that in a first PR? |
|
This is a prequel to #9316 to separate out auto-generated changes. All this does is: - Set the minimum SDK version to 3.29. - Run the autoformatter—which changes a ton of things because the 3.29 minimum opts into the new formatter. ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
Rebased; the Dart changes are gone. |
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 for the cleanup! LGTM!
/cc @camsim99
Replaces deprecated
onSurfaceDestroyed
withonSurfaceCleanup
, which became available in Flutter 3.29 (which these packages require as of #9317).The changes to video player are non-trivial because rather than make the minimal change, this makes the changes discussed in flutter/flutter#160933 (comment) that motivated the change in API in the first place, which simplifies the handling of backgrounding, and restores background playback.
Fixes flutter/flutter#161256
Fixes flutter/flutter#156936
Pre-Review Checklist
[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///
).Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3