testing library

overflow_guard -- test-time library.

Import this ONLY from test files. It pulls in flutter_test and provides the CI-facing checkLayout + expectNoOverflow helpers, plus everything from the runtime library.

Classes

DeviceResult
The result of checking one screen on one DeviceSize at one text scale.
DeviceSize
A single device configuration to render a screen at.
LayoutReport
The result of checking one screen across a set of device sizes / scales.
OverflowIssue
A single overflow occurrence, parsed from Flutter's error message.
OverflowRecorder
Captures Flutter's overflow errors while it is active.

Functions

checkLayout(WidgetTester tester, Widget screen, {List<DeviceSize> devices = DeviceSize.common, List<double> textScales = const <double>[1.0], bool settle = false, bool wrapInMaterialApp = true}) Future<LayoutReport>
Render screen on every size in devices (optionally at several text scales) inside a widget test and report which combinations overflow.
expectNoOverflow(LayoutReport report) → void
Fail the current test (with a readable report) if report found any overflow. Passes silently otherwise.