zulip-flutter icon indicating copy to clipboard operation
zulip-flutter copied to clipboard

lightbox: Allow zooming in with video lightbox.

Open lennylin1998 opened this issue 8 months ago • 1 comments

Implement zoom in with video lightbox. Working Example:

https://github.com/user-attachments/assets/a1a999ba-bb2a-4f97-a19f-cb5cfa7dc264

Key changes:

  • Wrap InteractiveViwer around SafeArea widget. I changed the layer order in _LightboxPageLayout's child because the loading indicator would get zoomed out of screen if I wrap the InteractiveViwer before Stack. Though some syntax changes, the functionality stays the same, and all previous test pass.
  • Add test to check video player zooming in/ out correctly. I intentionally start the zoom gesture from the corner instead of the center because the wrong setting would leave dead areas where gesutre is not received(see Flutter Doc). This is just to make the zoom in functionality for video lightbox coherent with that for image lightbox.

I hope this explain how and why I made those changes. This is my first Zulip PR and open-source contribution. I'd love to hear any suggestions or feedback!

Fixes #1287

lennylin1998 avatar Mar 30 '25 19:03 lennylin1998