OverflowRecorder class
Captures Flutter's overflow errors while it is active.
Flutter reports a RenderFlex overflow by calling FlutterError.onError. This recorder temporarily replaces that handler, keeps any overflow messages for itself, and forwards every other error to the previous handler untouched -- so normal error reporting still works.
Used by both the runtime demo (live detection) and the test-time
checkLayout API.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasOverflow → bool
-
Whether any overflow has been captured.
no setter
-
issues
→ List<
OverflowIssue> -
All overflow issues captured since the last clear.
no setter
- onIssue ↔ void Function(OverflowIssue issue)?
-
Called every time a new overflow is captured (optional).
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clear(
) → void - Forget all captured issues (keeps intercepting).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
start(
{bool alsoReport = false}) → void - Begin intercepting overflow errors. Safe to call more than once.
-
stop(
) → void - Stop intercepting and restore the previous error handler.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited