AnalysisError class
AnalysisError
{ "severity": AnalysisErrorSeverity "type": AnalysisErrorType "location": Location "message": String "correction": optional String "code": String "url": optional String "contextMessages": optional List
Clients may not extend, implement or mix-in this class.
Constructors
-
AnalysisError(AnalysisErrorSeverity severity, AnalysisErrorType type, Location location, String message, String code, {String? correction, String? url, List<
DiagnosticMessage> ? contextMessages, bool? hasFix}) - AnalysisError.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object? json)
-
factory
Properties
- code ↔ String
-
The name, as a string, of the error code associated with this error.
getter/setter pair
-
contextMessages
↔ List<
DiagnosticMessage> ? -
Additional messages associated with this diagnostic that provide context
to help the user understand the diagnostic.
getter/setter pair
- correction ↔ String?
-
The correction message to be displayed for this error. The correction
message should indicate how the user can fix the error. The field is
omitted if there is no correction message associated with the error code.
getter/setter pair
- hasFix ↔ bool?
-
A hint to indicate to interested clients that this error has an
associated fix (or fixes). The absence of this field implies there are
not known to be fixes. Note that since the operation to calculate whether
fixes apply needs to be performant it is possible that complicated tests
will be skipped and a false negative returned. For this reason, this
attribute should be treated as a "hint". Despite the possibility of false
negatives, no false positives should be returned. If a client sees this
flag set they can proceed with the confidence that there are in fact
associated fixes.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setteroverride
- location ↔ Location
-
The location associated with the error.
getter/setter pair
- message ↔ String
-
The message to be displayed for this error. The message should indicate
what is wrong with the code and why it is wrong.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- severity ↔ AnalysisErrorSeverity
-
The severity of the error.
getter/setter pair
- type ↔ AnalysisErrorType
-
The type of the error.
getter/setter pair
- url ↔ String?
-
The URL of a page containing documentation associated with this error.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object> - Returns a JSON presentation of the object.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override