DartFixContext class
An object used to provide context information for Dart fix contributors.
Clients may not extend, implement or mix-in this class.
- Implemented types
Constructors
- DartFixContext.new({required InstrumentationService instrumentationService, required ChangeWorkspace workspace, required ResolvedLibraryResult libraryResult, required ResolvedUnitResult unitResult, required AnalysisError error, bool autoTriggered = false})
Properties
- autoTriggered → bool
-
Whether fixes were triggered automatically (for example by a save
operation).
final
- error → AnalysisError
-
The error to fix.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- instrumentationService → InstrumentationService
-
The instrumentation service used to report errors that prevent a fix from
being composed.
final
- libraryResult → ResolvedLibraryResult
-
The library result in which the fix operates.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- unitResult → ResolvedUnitResult
-
The unit result in which the fix operates.
final
- workspace → ChangeWorkspace
-
The workspace in which the fix contributor operates.
final
Methods
-
getTopLevelDeclarations(
String name) → Future< Map< LibraryElement2, Element2> > - Returns the mapping from each library (that is available to this context) to a top-level declaration that is exported (not necessary declared) by this library, and has the requested base name.
-
librariesWithExtensions(
String memberName) → Stream< LibraryElement2> -
Returns libraries with extensions that declare non-static public
extension members with the
memberName
. -
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