FixContributorMixin class abstract

A partial implementation of a FixContributor that iterates over the list of errors and provides a utility method to make it easier to add fixes.

Clients may not extend or implement this class, but are allowed to use it as a mix-in when creating a subclass of FixContributor.

Implemented types

Constructors

FixContributorMixin()

Properties

collector FixCollector?
The collector to which fixes should be added.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
request DartFixesRequest?
The request that specifies the fixes that are to be built.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addFix(AnalysisError error, FixKind kind, ChangeBuilder builder, {List<Object>? args}) → void
Add a fix for the given error. Use the kind of the fix to get the message and priority, and use the change builder to get the edits that comprise the fix. If the message has parameters, then use the list of args to populate the message.
computeFixes(covariant DartFixesRequest request, FixCollector collector) Future<void>
Contribute fixes for the location in the file specified by the given request into the given collector.
override
computeFixesForError(AnalysisError error) Future<void>
Compute the fixes that are appropriate for the given error and add them to the fix collector.
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