Skip to content

[Docs] CustomScrollView's documentation should be more clear on its use case #142673

Closed

Description

@yakagami

Related: #130360

Developers are using shrinkWrap: true on their Lists/ SingleChildScrollView s when they run into vertical viewport was given unbounded height which is not performant. See the above issue about deprecating shrinkWrap. Also note that the first result on google for

vertical viewport was given unbounded height

recommends using shrinkWrap: true. I would add that the naming and documentation of CustomScrollView adds to this issue. New developers often try not to use CustomScrollView because of the word "custom" which implies that it is meant for advanced use cases. But really almost every app should be using CustomScrollView at some point. The subtitle in the documentation doesn't help much here:

A ScrollView that creates custom scroll effects using slivers.

It's true that you can create custom effects with CustomScrollView via eg. SliverAppBar but the main use case for most uses of this API don't actually care about custom scroll effects. So developers just add shrinkWrap: true to avoid CustomScrollView which sounds scarier. So we should at least change the documentation so that developers know they should be using CustomScrollView whenever they want a List to scroll along with another Widget be that a Text or another sliver and remove the "custom scroll effects" line from the subtitle.

Maybe something like

A ScrollView that allows arbitrary widgets to be scrolled together using slivers

would make it more clear when it should be used.

Perhaps another issue should be filed about potentially renaming CustomScrollView. (I think MultiChildScrollView or MultiSliverScrollView might work)

Activity

  1. added
    in triagePresently being triaged by the triage team
    frameworkflutter/packages/flutter repository. See also f: labels.
    f: scrollingViewports, list views, slivers, etc.
    d: api docsIssues with https://api.flutter.dev/
    c: proposalA detailed proposal for a change to Flutter
    and removed
    in triagePresently being triaged by the triage team
    on Feb 1, 2024
  2. goderbauer commented on Feb 6, 2024

    @goderbauer
    Member

    Feel free to submit a PR to make these improvements!

  3. added
    P3Issues that are less important to the Flutter project
    on Feb 6, 2024
  4. added a commit that references this issue on Jul 29, 2026
    2a230d1
  5. github-actions commented on Aug 12, 2026

    @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.

  6. locked as resolved and limited conversation to collaborators on Aug 12, 2026
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 Flutterd: api docsIssues with https://api.flutter.dev/f: scrollingViewports, list views, slivers, etc.frameworkflutter/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