Pin by commit in the docs, tags trip pub up

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013F4NWNvYcdeSgqbWMT1VQ7
This commit is contained in:
ImBenji
2026-09-23 18:53:41 +01:00
co-authored by Claude Opus 5.5
parent b269201919
commit 21c380595f
3 changed files with 31 additions and 14 deletions
+16 -5
View File
@@ -585,7 +585,9 @@ class SelectPopup<T> extends StatefulWidget {
/// whether the search field is shown (only in builder mode).
final bool enableSearch;
/// whether the list shrink-wraps (static lists do, builder lists scroll).
/// whether the rows are a plain Column (static lists) or a lazy ListView
/// (builder lists, which can be long). Both only take the height they
/// need - see [_listView].
final bool shrinkWrap;
const SelectPopup({
@@ -657,9 +659,9 @@ class _SelectPopupState<T> extends State<SelectPopup<T>> {
// nothing to measure - asking a column how wide it wants to be and then
// ignoring the answer is just a layout pass nobody reads.
//
// [shrinkWrap] still decides the VERTICAL: a static list is a scrolling
// Column that takes only the height it needs, the builder path is a lazy
// ListView.
// [shrinkWrap] picks which list: a static one is a scrolling Column, the
// builder path is a lazy ListView. Either way the popup ends up as tall
// as its rows and no taller.
return _popupSurface(theme, column);
}
@@ -729,10 +731,19 @@ class _SelectPopupState<T> extends State<SelectPopup<T>> {
);
}
// shrinkWrap regardless of [widget.shrinkWrap] - that flag is about which
// list we build, not how tall it ends up. A ListView left to expand eats
// every pixel of popupMaxHeight its handed, so a one-row "Search lines"
// popup opened a 312px wall of empty surface under its single row.
//
// This stays lazy: the incoming maxHeight is bounded (the overlay's
// ConstrainedBox, then Flexible), so the shrink wrapping viewport still
// only lays out as far as that extent and stops. Its the *unbounded* case
// that forces a full layout pass, and we never hand it one.
return ListView.separated(
controller: _scrollController,
padding: EdgeInsets.all(inset),
shrinkWrap: widget.shrinkWrap,
shrinkWrap: true,
itemCount: count,
separatorBuilder: (context, _) => Gap(_popupRowGap(theme)),
itemBuilder: (context, index) =>