ExplanationEngine class
Generates human-readable explanations for layout decisions.
Uses a template-based system to match common layout patterns and produce developer-friendly explanations with fix suggestions.
Usage
final decisions = LayoutDecisionRecorder.instance.overflows;
for (final decision in decisions) {
final explanation = ExplanationEngine.explain(decision);
print(explanation.title);
print(explanation.detail);
for (final fix in explanation.suggestions) {
print(' Fix: ${fix.description}');
}
}
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
explain(
LayoutDecision decision) → LayoutExplanation - Generate an explanation for a single layout decision.
-
explainAllOverflows(
) → List< LayoutExplanation> - Explain all recent overflows from the recorder's buffer.