Skip to content

Document using a ListView inside a Column - #195145

Merged
auto-submit[bot] merged 5 commits into
flutter:masterfrom
npankov:docs-listview-in-column
Nov 13, 2026
Merged

auto-submit[bot] merged 5 commits into
flutter:masterfrom
npankov:docs-listview-in-column

Conversation

@npankov

@npankov npankov commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Adds a "Using a ListView inside a Column" section to the ListView documentation.

A vertical ListView placed directly inside a Column is given unbounded height and fails layout with "Vertical viewport was given unbounded height", which is a common stumbling block. The new section explains the cause and lists the ways to give the list a bounded height: Expanded, SizedBox/ConstrainedBox, or shrinkWrap (with its cost and the overflow caveat, and Flexible to combine it with available space). It also mentions the horizontal Row case and CustomScrollView, and includes a short snippet.

Documentation only, no code changes.

Fixes #18341

Pre-launch Checklist

@github-actions github-actions Bot added framework flutter/packages/flutter repository. See also f: labels. f: scrolling Viewports, list views, slivers, etc. labels Oct 23, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds documentation to packages/flutter/lib/src/widgets/scroll_view.dart regarding the usage of ListView within Column and Row widgets. The review comments suggest linking the shrinkWrap property for better clarity and updating the documentation to explicitly explain the performance implications of using shrinkWrap with Flexible to ensure developers are aware of the impact on lazy building.

victorsanni
victorsanni previously approved these changes Oct 28, 2026

@victorsanni victorsanni left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with comments

hannah-hyj
hannah-hyj previously approved these changes Nov 3, 2026

@hannah-hyj hannah-hyj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@victorsanni victorsanni added CICD Run CI/CD and removed CICD Run CI/CD labels Nov 3, 2026
@npankov
npankov dismissed stale reviews from hannah-hyj and victorsanni via d8e532a November 3, 2026 09:36
@npankov

npankov commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review! I addressed all the comments in d8e532a: moved the section under Troubleshooting, corrected the shrinkWrap/Flexible description, added the common-errors link and reworded the error sentence. Since the approvals were dismissed by the new commit, could you please take another look? @victorsanni @hannah-hyj

@npankov

npankov commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the latest three comments in c4e21b7. Could you please take another look? @victorsanni

@npankov
npankov requested a review from victorsanni November 9, 2026 12:50

@hannah-hyj hannah-hyj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@victorsanni victorsanni left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@victorsanni victorsanni added the CICD Run CI/CD label Nov 9, 2026
A vertical ListView placed directly in a Column is given unbounded height and fails layout with "Vertical viewport was given unbounded height". Add a section to the ListView docs explaining the cause and the options (Expanded, SizedBox/ConstrainedBox, shrinkWrap with Flexible), with a short example.
Link shrinkWrap in the ListView docs and note that a shrink-wrapped list in a Flexible still loses lazy building.
Move the ListView-in-Column section under Troubleshooting, correct the description of shrinkWrap inside a Flexible, link the common errors page and reword the error sentence.
Clarify ConstrainedBox and Flexible behavior in the ListView-in-Column docs and describe the common errors link.
@npankov
npankov force-pushed the docs-listview-in-column branch from c4e21b7 to 95a53e2 Compare November 10, 2026 15:34
@flutter-dashboard flutter-dashboard Bot removed the CICD Run CI/CD label Nov 10, 2026
@npankov

npankov commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

Hi @victorsanni, I rebased the branch on the latest master to fix the ci.yaml validation failure (a stale builder entry from an earlier master merge). The doc changes are identical to what you approved. Could you please re-apply the CICD label so the full presubmit runs? Thanks!

@victorsanni victorsanni added CICD Run CI/CD autosubmit Merge PR when tree becomes green via auto submit App labels Nov 10, 2026
@justinmc

Copy link
Copy Markdown
Contributor

Looks like CICD is applied, but the Google tests are hanging? Maybe another rebase? Sorry for the delay @npankov .

@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 11, 2026
@auto-submit

auto-submit Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

auto label is removed for flutter/flutter/195145, Failed to enqueue flutter/flutter/195145 with HTTP 400: Pull request Required status check "Check Code Freeze" is expected..

@flutter-dashboard flutter-dashboard Bot removed the CICD Run CI/CD label Nov 11, 2026
@victorsanni victorsanni added autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD labels Nov 11, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 11, 2026
@auto-submit

auto-submit Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

auto label is removed for flutter/flutter/195145, Failed to enqueue flutter/flutter/195145 with HTTP 400: Pull request Required status check "Check Code Freeze" is expected..

@victorsanni victorsanni added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 11, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 11, 2026
@auto-submit

auto-submit Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

auto label is removed for flutter/flutter/195145, Failed to enqueue flutter/flutter/195145 with HTTP 400: Pull request Required status check "Check Code Freeze" is expected..

@npankov

npankov commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

Hi @victorsanni, thanks again for the approval!

The autosubmit label was removed by the bot a few times with "Required status check 'Check Code Freeze' is expected". The latest "Material and Cupertino Code Freeze" workflow runs for 97b9818 are in action_required and need to be approved by a maintainer (the PR doesn't touch any frozen paths, and the earlier run passed).

Could you please approve the workflow run and re-apply autosubmit? Everything else is green and the tree is open now.

@victorsanni victorsanni added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 13, 2026
@auto-submit
auto-submit Bot added this pull request to the merge queue Nov 13, 2026
Merged via the queue into flutter:master with commit 30953fc Nov 13, 2026
34 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 13, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Nov 16, 2026
flutter/flutter@1b95854...d8bd864

2026-11-16 [email protected] Roll Skia from f2790b0ea630 to 118eaff3deb4 (8 revisions) (flutter/flutter#196661)
2026-11-16 [email protected] [native_assets] Keep a dylib's install name in flutter test when its path does not fit (flutter/flutter#194802)
2026-11-16 [email protected] Reland "[android]: prewarms shaders when the context is created" (flutter/flutter#196579)
2026-11-16 [email protected] [flutter_tools] Bound Browser.close in Chromium.close (flutter/flutter#196211)
2026-11-16 [email protected] Roll Skia from e8ff7a4187ec to f2790b0ea630 (13 revisions) (flutter/flutter#196652)
2026-11-14 [email protected] Revert: Balance web_canvaskit_tests and web_skwasm_tests subshards by duration (flutter/flutter#196580)
2026-11-14 [email protected] Revert: Reland "[android]: prewarms shaders when the context is created" (flutter/flutter#196575)
2026-11-14 [email protected] [flutter_tools] Guard ExtensionManager initialization against concurrent disposal (flutter/flutter#196459)
2026-11-14 [email protected] [ImpellerC] Escape spaces in depfile paths (flutter/flutter#196555)
2026-11-14 [email protected] Reland "[android]: prewarms shaders when the context is created" (flutter/flutter#196549)
2026-11-14 [email protected] Balance web_canvaskit_tests and web_skwasm_tests subshards by duration (flutter/flutter#196260)
2026-11-13 [email protected] Safely return null on malformed stack trace line in StackFrame.fromStackTraceLine (flutter/flutter#194673)
2026-11-13 [email protected] Clarify that super.dispose() must be called synchronously (flutter/flutter#193416)
2026-11-13 [email protected] Consolidate exit-code parameters on runCommand with ExpectedExit (flutter/flutter#196479)
2026-11-13 [email protected] Support multi-view apps in widget test binding (flutter/flutter#194480)
2026-11-13 [email protected] Document using a ListView inside a Column (flutter/flutter#195145)
2026-11-13 [email protected] Add didChangeAlwaysUse24HourFormat to WidgetsBinding and update MediaQuery (flutter/flutter#196117)
2026-11-13 [email protected] Build local engine wasm configs on 32-core Linux bots (flutter/flutter#196284)
2026-11-13 [email protected] [Android] Fix Hybrid Composition resize deadlock (flutter/flutter#196255)
2026-11-13 [email protected] Roll Skia from 11f46cfe8838 to e8ff7a4187ec (9 revisions) (flutter/flutter#196557)
2026-11-13 [email protected] [Impeller] Fix SurfaceContextVK submission tracking and double HostBuffer reset (flutter/flutter#196064)
2026-11-13 [email protected] Manual roll Packages from 14f9933 to 015df97 (5 revisions) (flutter/flutter#196558)
2026-11-13 [email protected] Remove routes_transition_test from widgets (flutter/flutter#186620)
2026-11-13 [email protected] [flutter_tools] Replace TargetPlatform.simpleName with cpuArch (flutter/flutter#196264)
2026-11-13 [email protected] Add a deferred platform-view-created path to the shell and use it on Android (flutter/flutter#196342)
2026-11-13 [email protected] Optimize RenderSliverVariedExtentList and introduce protected itemExtentOf API in RenderSliverFixedExtentBoxAdaptor (flutter/flutter#192384)
2026-11-13 [email protected] Revert: [android]: prewarms shaders when the context is created (flutter/flutter#196468)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document ListView usage with the Column widget

4 participants