StrongModeCode class

This class has Strong Mode specific error codes.

"Strong Mode" was the prototype for Dart 2's sound type system. Many of these errors became part of Dart 2. Some of them are optional flags, used for stricter checking.

These error codes tend to use the same message across different severity levels, so they are grouped for clarity.

Inheritance

Constructors

StrongModeCode(ErrorType type, String name, String message, {String correction, bool hasPublishedDocs})
Initialize a newly created error code to have the given type and name. [...]
const

Properties

correction String
The template used to create the correction to be displayed for this error, or null if there is no correction information for this error. The correction should indicate how the user can fix the error.
read-only, inherited
errorSeverity ErrorSeverity
The severity of the error.
read-only, override
hashCode int
The hash code for this object. [...]
read-only, inherited
hasPublishedDocs bool
Return true if diagnostics with this code have documentation for them that has been published.
final, inherited
isIgnorable bool
Whether a finding of this error is ignorable via comments such as // ignore: or // ignore_for_file:.
read-only, inherited
isUnresolvedIdentifier bool
Whether this error is caused by an unresolved identifier.
final, inherited
message String
The template used to create the message to be displayed for this error. The message should indicate what is wrong and why it is wrong.
read-only, inherited
name String
The name of the error code.
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
type ErrorType
The type of the error.
final
uniqueName String
The unique name of this error code.
read-only, inherited
url String
Return a URL that can be used to access documentation for diagnostics with this code, or null if there is no published documentation.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Constants

TOP_LEVEL_FUNCTION_LITERAL_BLOCK → const StrongModeCode
StrongModeCode(ErrorType.HINT, 'TOP_LEVEL_FUNCTION_LITERAL_BLOCK', 'The type of the function literal can't be inferred because the ' 'literal has a block as its body.', cor…
TOP_LEVEL_IDENTIFIER_NO_TYPE → const StrongModeCode
StrongModeCode(ErrorType.HINT, 'TOP_LEVEL_IDENTIFIER_NO_TYPE', 'The type of '{0}' can't be inferred because the type of '{1}' ' 'couldn't be inferred.',…
TOP_LEVEL_INSTANCE_GETTER → const StrongModeCode
StrongModeCode(ErrorType.STATIC_WARNING, 'TOP_LEVEL_INSTANCE_GETTER', 'The type of '{0}' can't be inferred because it refers to an instance ' 'getter, '{1}', wh…
TOP_LEVEL_INSTANCE_METHOD → const StrongModeCode
StrongModeCode(ErrorType.STATIC_WARNING, 'TOP_LEVEL_INSTANCE_METHOD', 'The type of '{0}' can't be inferred because it refers to an instance ' 'method, '{1}', wh…