From 699bd40423b65101ae348d4e9a472a8d0f0b573e Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Wed, 6 May 2026 22:29:05 +0200 Subject: [PATCH] fix Overlay sizing in widget_harness for Flutter 3.27+ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .pql/pql-plan.json | 2 +- test/helpers/widget_harness.dart | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.pql/pql-plan.json b/.pql/pql-plan.json index f2cff59a..9d1dab87 100644 --- a/.pql/pql-plan.json +++ b/.pql/pql-plan.json @@ -1,5 +1,5 @@ { - "exported_at": "2026-05-06T20:28:58Z", + "exported_at": "2026-05-06T20:29:05Z", "decisions": [ { "id": "D-1", diff --git a/test/helpers/widget_harness.dart b/test/helpers/widget_harness.dart index 090df2a0..345c426d 100644 --- a/test/helpers/widget_harness.dart +++ b/test/helpers/widget_harness.dart @@ -22,7 +22,10 @@ Widget harness(KernelFixture fixture, Widget child) { data: const MediaQueryData(), child: Overlay( initialEntries: [ - OverlayEntry(builder: (_) => child), + OverlayEntry( + canSizeOverlay: true, + builder: (_) => child, + ), ], ), ),