Diagnostic class
A diagnostic, as defined by the Diagnostic Design Guidelines:
An indication of a specific problem at a specific location within the source code being processed by a development tool.
Clients may not extend, implement or mix-in this class.
Constructors
-
Diagnostic.forValues({required Source source, required int offset, required int length, DiagnosticCode? diagnosticCode, @Deprecated("Pass a value for 'diagnosticCode' instead") DiagnosticCode? errorCode, required String message, String? correctionMessage, List<
DiagnosticMessage> contextMessages = const [], Object? data}) -
Diagnostic.tmp({required Source source, required int offset, required int length, DiagnosticCode? diagnosticCode, @Deprecated("Pass a value for 'diagnosticCode' instead") DiagnosticCode? errorCode, List<
Object?> arguments = const [], List<DiagnosticMessage> contextMessages = const [], Object? data}) -
Initialize a newly created diagnostic.
factory
Properties
-
contextMessages
→ List<
DiagnosticMessage> -
A list of messages that provide context for understanding the problem
being reported. The list will be empty if there are no such messages.
final
- correction → String?
-
The template used to create the correction to be displayed for this
diagnostic, or
null
if there is no correction information for this error. The correction should indicate how the user can fix the error.no setter - correctionMessage → String?
-
A description of how to fix the problem, or
null
if there is no such description.final - data → Object?
-
Data associated with this diagnostic, specific for diagnosticCode.
final
- diagnosticCode → DiagnosticCode
-
The diagnostic code associated with the diagnostic.
final
- errorCode → DiagnosticCode
-
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- length → int
-
The number of characters from the offset to the end of the source which
encompasses the compilation error.
no setter
- message → String
-
The message to be displayed for this diagnostic.
no setter
- offset → int
-
The character offset from the beginning of the source (zero based) where
the diagnostic occurred.
no setter
- problemMessage → DiagnosticMessage
-
A message describing what is wrong and why.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- severity → Severity
-
no setter
- source → Source
-
The source in which the diagnostic occurred, or
null
if unknown.final
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.
override