Skip to content

InteractiveViewer should support rotation #57698

Open

Description

@justinmc

I wrote InteractiveViewer in #56409 to support rotation, but I removed the feature to speed up development. I plan to revisit it and finish the rotation feature. The part that still needs work is how it interacts with boundaryMargin, and there is a TODO in the code explaining more and referencing this issue.

Activity

  1. yasinarik commented on May 20, 2020

    @yasinarik

    Excuse me Justin @justinmc , maybe not related but does the InteractiveViewer renders on-demand? If this is not related here, let me move this comment to an appropriate place :)

    I mean I have been building a Google Spreadsheet kinda widget that I call "AdvancedTable" for a long time.

    It consists of dynamically added, removed columns (which are separate ListView.builder() actually). I use the .builder() method for rendering thousands of cells on-demand for avoiding performance issues.

    The columns can be frozen as well as headers. So there is a frozen are and a scrollable are which allows vertical and horizontal scrolling. However, as you can guess, it is not smooth. I can go with scroll locking (when you start scrolling vertically, it won't start scrolling horizontally vice versa). However, scroll locking is not available.

    I wonder if I can wrap the scrollable area of my table with your InteractiveView and have no performance issues. I'll give it a try but is there anything you can say to me?

  2. justinmc commented on May 20, 2020

    @justinmc
    ContributorAuthor

    @yasinarik I haven't built anything into InteractiveViewer to handle rendering on-demand, unfortunately. So I would guess that switching to InteractiveViewer wouldn't give you any performance benefit. Are you hoping for something like ListView.builder?

    P.S. I was thinking about adding scroll locking to InteractiveViewer. It might be a good near-term feature to add.

  3. added
    c: proposalA detailed proposal for a change to Flutter
    and removed
    p: material_uimaterial_ui package in flutter/packages
    on Jun 3, 2020
  4. justinmc commented on Jun 3, 2020

    @justinmc
    ContributorAuthor

    I created a separate issue as a feature request for something like InteractiveViewer.builder: #58603

  5. victor-lozhnikov commented on Aug 9, 2020

    @victor-lozhnikov

    Are there any analogues in Flutter at the moment? I need a container with these functions: movement, zoom, rotation. And I need the ability to set the minimum and maximum scale. I'm really looking forward to the rotation support in InteractiveViewer!

  6. justinmc commented on Aug 10, 2020

    @justinmc
    ContributorAuthor

    My work on rotation is in this branch: https://github.com/justinmc/flutter/tree/iv-rotation

    It works, but it has some complex interactions with the boundary that I still need to make sure I get 100% correct.

  7. doppio commented on Aug 22, 2020

    @doppio

    Is this likely to be included in the next release of Flutter? It's exactly what I need for my use case! :)

  8. justinmc commented on Aug 24, 2020

    @justinmc
    ContributorAuthor

    @doppio Unfortunately it's probably not likely for the next stable release (9/7 cutoff). Thanks for the comment though, this gives me some more motivation to get it done. I'll make sure this issue is up to date.

  9. KopiasCsaba commented on Dec 6, 2020

    @KopiasCsaba

    I've bumped into this too, i would like to have rotation feature too:-) Just for some motivation++:)

  10. justinmc commented on Feb 1, 2021

    @justinmc
    ContributorAuthor

    @hacker1024 You mentioned wanting a rotation gesture for MacOS and iPadOS in #64210 (comment). Do you have an opinion of what that would be? Maybe like option + scroll or something?

  11. liu1013269528 commented on Oct 26, 2021

    @liu1013269528

    I am making a painting tool and using the InteractiveViewer as the canvas container, currently has two finger drag, zoom function. I would be grateful if InteractiveViewer could support rotation.
    image

  12. justinmc commented on Oct 29, 2021

    @justinmc
    ContributorAuthor

    @liu1013269528 I had this working in #73358, but I wasn't happy with the code so I closed it for now. I hope to have time to come back to it.

  13. cshang412 commented on Feb 7, 2022

    @cshang412

    i also need rotation feature +1 , come on !

  14. JaffaKetchup commented on Jul 17, 2022

    @JaffaKetchup
    Contributor

    Rotation would be appreciated here as well!

  15. added
    P3Issues that are less important to the Flutter project
    on Aug 23, 2022
  16. kristapus commented on Jan 26, 2023

    @kristapus

    Any updates or near future plans to release this feature? Would be really nice to have it!

  17. mobile-development-group-com commented on May 9, 2023

    @mobile-development-group-com

    @justinmc Any update or special reasons on why this is still not working after two years? Is there an alternative option to make it a pub package at this time?

  18. justinmc commented on May 9, 2023

    @justinmc
    ContributorAuthor

    I had a PR linked above but I didn't have time to get it through code review: #73358

  19. pamafe1976 commented on Nov 8, 2025

    @pamafe1976

    Is this feature still being considered?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: proposalA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions