FixSuggestion class
A categorized fix suggestion for a layout issue.
Suggestions are generated by analyzing the layout decision, constraint chain, and known widget patterns to provide actionable fixes.
Usage
final suggestions = FixSuggestionEngine.suggest(decision);
for (final fix in suggestions) {
print('${fix.description} (confidence: ${fix.confidence})');
if (fix.codeHint != null) print(' Try: ${fix.codeHint}');
}
Constructors
- FixSuggestion({required String description, String? codeHint, double confidence = 0.5, int priority = 0, FixCategory category = FixCategory.general})
-
const
Properties
- category → FixCategory
-
The category of this fix suggestion.
final
- codeHint → String?
-
Optional code snippet or approach hint.
final
- confidence → double
-
Confidence level from 0.0 (guess) to 1.0 (certain).
final
- description → String
-
Short human-readable description of the fix.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- priority → int
-
Priority: lower = higher priority. Used for sorting.
final
- 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.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited