You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, InteractiveViewer has no built-in support for generating its content on-demand. This makes it impractical to use for very large tables due to performance. We should add a constructor similar to ListView.builder.
The builder signature currently looks like this: (BuildContext context, Rect viewport) where the viewport is post-transformation, relative to the child, so it can be easily used to check if some widget in the child's subtree is visible or not, if its position is known. Would that work for what you guys are expecting @caxerx @shatterball?
Done, though I changed the Rect to a Quad so that rotated viewports can be supported.
Note that this does no automatic optimization of the children out-of-the-box. You'll be responsible for changing the content that you return from builder based on the viewport.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
dietpizza commentedon Sep 11, 2020
I would really love for InteractiveViewer to support builder constructor.
caxerx commentedon Feb 14, 2021
Love to see this to be implement.
justinmc commentedon Mar 5, 2021
Proposal: #77414
The builder signature currently looks like this:
(BuildContext context, Rect viewport)where the viewport is post-transformation, relative to the child, so it can be easily used to check if some widget in the child's subtree is visible or not, if its position is known. Would that work for what you guys are expecting @caxerx @shatterball?caxerx commentedon Mar 5, 2021
This seems work for me, thank you for the update!
justinmc commentedon Mar 23, 2021
Done, though I changed the
Rectto aQuadso that rotated viewports can be supported.Note that this does no automatic optimization of the children out-of-the-box. You'll be responsible for changing the content that you return from
builderbased on the viewport.github-actions commentedon Aug 4, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.