Skip to content

InteractiveViewer builder constructor #58603

Closed

Description

@justinmc

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.

Activity

  1. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    c: proposalA detailed proposal for a change to Flutter
    and removed
    c: proposalA detailed proposal for a change to Flutter
    on Jun 3, 2020
  2. added
    P3Issues that are less important to the Flutter project
    c: new featureNothing broken; request for a new capability
    on Jun 3, 2020
  3. dietpizza commented on Sep 11, 2020

    @dietpizza

    I would really love for InteractiveViewer to support builder constructor.

  4. caxerx commented on Feb 14, 2021

    @caxerx

    Love to see this to be implement.

  5. justinmc commented on Mar 5, 2021

    @justinmc
    ContributorAuthor

    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?

  6. caxerx commented on Mar 5, 2021

    @caxerx

    This seems work for me, thank you for the update!

  7. justinmc commented on Mar 23, 2021

    @justinmc
    ContributorAuthor

    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.

  8. github-actions commented on Aug 4, 2021

    @github-actions

    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.

  9. locked as resolved and limited conversation to collaborators on Aug 4, 2021
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: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions