Skip to content

Conversation

abalmagd
Copy link
Contributor

  1. Added missing values to copyWith method.
  2. Hide controls when interacting with zoom and pan.
  3. Move up the InteractiveViewer to the parent Stack.
  4. Increase example app android compile sdk version.
  5. Add zoomAndPan: true to example app controller.
  • After checks zoomAndPan works for both fullscreen and non fullscreen

Hide controls while interacting with zoomAndPan.
Copy link

codecov bot commented Apr 30, 2025

Codecov Report

Attention: Patch coverage is 43.47826% with 13 lines in your changes missing coverage. Please review.

Project coverage is 44.47%. Comparing base (e176704) to head (d51d4e5).
Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
lib/src/player_with_controls.dart 52.63% 9 Missing ⚠️
lib/src/chewie_player.dart 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #920      +/-   ##
==========================================
- Coverage   44.91%   44.47%   -0.44%     
==========================================
  Files          21       21              
  Lines        1574     1585      +11     
==========================================
- Hits          707      705       -2     
- Misses        867      880      +13     

☔ View full report in Codecov by Sentry.
📢 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.

@maxbritto
Copy link

Any news from the team regarding this PR ?

@abalmagd : Maybe you could add the InteractiveViewer in the tree only if the zoomAndPan is set to true by saving the stack into a final var, then either returning that var or returning it embedded in the InteractiveViewer if the boolean is true.
That way users that do not enable the zoomAndPan feature, will keep existing code unchanged.

@maxbritto maxbritto mentioned this pull request Jun 30, 2025
@abalmagd
Copy link
Contributor Author

@maxbritto The TransformationController may still be passed and control the InteractiveViewer via the controller instead of gestures.

I added it to the tree if zoomAndPan is set to true OR if TransformationController is provided.

Also, I think zooming or panning via the controller does not require ui to be updated as it wasn't done with gestures, so the onInteractionUpdate and onInteractionEnd are unchanged.

@maxbritto
Copy link

Nice change, hopefully this will help reviewers accept it 🤞

@diegotori
Copy link
Collaborator

@abalmagd please re-sync your changes with master.

Thanks

@diegotori
Copy link
Collaborator

Also, revert the formatting. Thanks.

re-sync with master
revert formatted line for LayoutBuilder
@abalmagd
Copy link
Contributor Author

@diegotori Done, although most of the formatted/white space is due to inserting/replacing some parent widgets

@diegotori
Copy link
Collaborator

@abalmagd please re-sync your changes again with master.

Once that's done, then you should be able to keep the format. Otherwise, run dart format . on the library. Thanks.

# Conflicts:
#	lib/src/player_with_controls.dart
@abalmagd
Copy link
Contributor Author

@diegotori Re-synced with master

Copy link
Collaborator

@diegotori diegotori left a comment

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 0b5d1b1 into fluttercommunity:master Jul 1, 2025
3 of 5 checks passed
diegotori added a commit that referenced this pull request Jul 1, 2025
@diegotori
Copy link
Collaborator

@abalmagd published in version 1.12.1. Thanks for your contribution.

lg8294 added a commit to lg8294/chewie that referenced this pull request Aug 5, 2025
* commit 'c094ed8ec7751e597a0f09dcf5b6689503793d04':
  chewie, version 1.12.1. Addresses Issue fluttercommunity#920.
  Upgraded iOS example project.
  Ran dart format on library.
  Added improvements to the Github workflow.
  refactor(player-with-controls): replace provider call to context.read
  refactor(player-with-controls): Remove interactive viewer from tree if its not used
  Fix zoomAndPan not having an effect. Hide controls while interacting with zoomAndPan.

# Conflicts:
#	lib/src/player_with_controls.dart
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.

zoomAndPan functionality
3 participants