fix Overlay sizing in widget_harness for Flutter 3.27+

Flutter 3.27 changed Overlay layout: an Overlay given infinite
height constraints now requires at least one OverlayEntry with
`canSizeOverlay: true` to delegate sizing, otherwise the entire
golden suite throws "Overlay was given infinite constraints" before
any test can render.

Marking the harness's only entry as size-determining is the minimal
fix — keeps the existing MediaQuery-driven layout shape intact and
unblocks every widget/golden test that uses `harness()`.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-05-06 22:29:05 +02:00
co-authored by Claude
parent bfa128f131
commit 699bd40423
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
{
"exported_at": "2026-05-06T20:28:58Z",
"exported_at": "2026-05-06T20:29:05Z",
"decisions": [
{
"id": "D-1",
+4 -1
View File
@@ -22,7 +22,10 @@ Widget harness(KernelFixture fixture, Widget child) {
data: const MediaQueryData(),
child: Overlay(
initialEntries: [
OverlayEntry(builder: (_) => child),
OverlayEntry(
canSizeOverlay: true,
builder: (_) => child,
),
],
),
),