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:
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"exported_at": "2026-05-06T20:28:58Z",
|
||||
"exported_at": "2026-05-06T20:29:05Z",
|
||||
"decisions": [
|
||||
{
|
||||
"id": "D-1",
|
||||
|
||||
@@ -22,7 +22,10 @@ Widget harness(KernelFixture fixture, Widget child) {
|
||||
data: const MediaQueryData(),
|
||||
child: Overlay(
|
||||
initialEntries: [
|
||||
OverlayEntry(builder: (_) => child),
|
||||
OverlayEntry(
|
||||
canSizeOverlay: true,
|
||||
builder: (_) => child,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user