Skip to main content

Diagnostic messages

An index of the diagnostics produced by the Dart analyzer.

This page lists diagnostic messages produced by the Dart analyzer, with details about what those messages mean and how you can fix your code. For more information about the analyzer, see Customizing static analysis.

Diagnostic index

#

The analyzer produces the following diagnostics for code that doesn't conform to the language specification or that might work in unexpected ways.

If a diagnostic has extra documentation and guidance, click Learn more to view it.

Classes extending 'AbiSpecificInteger' must have exactly one const constructor, no other members, and no type parameters.
Learn more
Classes extending 'AbiSpecificInteger' must have exactly one 'AbiSpecificIntegerMapping' annotation specifying the mapping from ABI to a 'NativeType' integer with a fixed size.
Learn more
Classes extending 'AbiSpecificInteger' must have exactly one 'AbiSpecificIntegerMapping' annotation specifying the mapping from ABI to a 'NativeType' integer with a fixed size.
Learn more
Invalid mapping to '{0}'; only mappings to 'Int8', 'Int16', 'Int32', 'Int64', 'Uint8', 'Uint16', 'UInt32', and 'Uint64' are supported.
Learn more
abstract_class_member
Members of classes can't be declared to be 'abstract'.
abstract_external_field
Fields can't be declared both 'abstract' and 'external'.
Abstract fields can't have initializers.
Learn more
abstract_final_base_class
An 'abstract' class can't be declared as both 'final' and 'base'.
abstract_final_interface_class
An 'abstract' class can't be declared as both 'final' and 'interface'.
abstract_late_field
Abstract fields cannot be late.
A 'sealed' class can't be marked 'abstract' because it's already implicitly abstract.
Learn more
abstract_static_field
Static fields can't be declared 'abstract'.
abstract_static_method
Static methods can't be declared to be 'abstract'.
The {0} '{1}' is always abstract in the supertype.
Learn more
The '.address' expression can only be used as argument to a leaf native external call.
Learn more
The receiver of '.address' must be a concrete 'TypedData', a concrete 'TypedData' '[]', an 'Array', an 'Array' '[]', a Struct field, or a Union field.
Learn more
The function '{0}' should have a return type but doesn't. The method '{0}' should have a return type but doesn't.
toggle_on
Learn more
Statement should be on a separate line.
toggle_on
Learn more
Required named parameters should be before optional named parameters.
toggle_on
Learn more
always_require_non_null_named_parameters
toggle_on
Missing type annotation.
toggle_on
Learn more
Use 'package:' imports for files in the 'lib' directory.
toggle_on
Learn more
ambiguous_comment_reference
The name '{0}' is ambiguous because it is defined in the libraries {1}. The prefix '{0}' can't be used to reference a library, because it's used to import more than one library: {1}.
The name '{0}' is defined in the libraries '{1}' and '{2}'.
Learn more
A member named '{0}' is defined in '{1}' and '{2}', and neither is more specific. A member named '{0}' is defined in {1}, and none are more specific.
Learn more
The {0} '{1}' is defined in the libraries {2}.
Learn more
The literal can't be either a map or a set because it contains at least one literal map entry or a spread operator spreading a 'Map', and at least one element which is neither of these.
Learn more
This literal must be either a map or a set, but the elements don't have enough information for type inference to work.
Learn more
The option '{0}' is no longer supported.
Learn more
analysis_options_deprecated_plugins
Support for legacy plugins is deprecated, and will be removed in an upcoming version of Dart.
analyzer_element_model_tracking_bad
Bad tracking annotation for this member.
analyzer_element_model_tracking_more_than_one
There can be only one tracking annotation.
analyzer_element_model_tracking_zero
No required tracking annotation.
analyzer_public_api_bad_part_directive
Part directives in the analyzer public API should point to files in the analyzer public API.
analyzer_public_api_bad_type
Element makes use of type(s) which is not part of the analyzer public API: {0}.
analyzer_public_api_experimental_inconsistency
Element makes use of experimental type(s), but is not itself marked with @experimental: {0}.
analyzer_public_api_exports_non_public_name
Export directive exports element(s) that are not part of the analyzer public API: {0}.
analyzer_public_api_impl_in_public_api
Declarations in the analyzer public API should not end in "Impl".
analyzer_v1_ast_use
'{0}' is part of the V1 AST API, and should be used only from other V1 AST API.{1}
The member '{0}' overrides an inherited member but isn't annotated with '@override'.
toggle_on
Learn more
The member '{0}' is redeclaring but isn't annotated with '@redeclare'.
toggle_on
Learn more
Fields in a struct class whose type is 'Pointer' shouldn't have any annotations.
Learn more
annotation_on_type_argument
Type arguments can't have annotations because they aren't declarations.
annotation_space_before_parenthesis
Annotations can't have spaces or comments before the parenthesis.
annotation_with_type_arguments
An annotation can't use type arguments.
annotation_with_type_arguments_uninstantiated
An annotation with type arguments must be followed by an argument list.
anonymous_method_wrong_parameter_list
An anonymous method with a parameter list must have exactly one required, positional parameter.
anonymous_method_wrong_parameter_type
The receiver type '{0}' must be assignable to the formal parameter type '{1}' in an anonymous method.
Argument '{0}' must be a constant.
Learn more
Argument to 'Native.addressOf' must be annotated with @Native
Learn more
The argument type '{0}' can't be assigned to the parameter type '{1}'. {2}
Learn more
The argument type '{0}' can't be assigned to the parameter type '{1} Function(Object)' or '{1} Function(Object, StackTrace)'.
Learn more
A redirecting constructor can't have an 'assert' initializer.
Learn more
The asset directory '{0}' doesn't exist.
Learn more
The asset file '{0}' doesn't exist.
Learn more
The value of the 'assets' field is expected to be a list of relative file paths.
Learn more
Asset map entry must contain a 'path' field.
Learn more
Assets are required to be file paths (strings).
Learn more
An asset value is required to be a file path (string) or map.
Learn more
Asset paths are required to be file paths (strings).
Learn more
'{0}' is marked 'doNotStore' and shouldn't be assigned to a field or top-level variable.
Learn more
Constant variables can't be assigned a value after initialization.
Learn more
'{0}' can't be used as a setter because it's final.
Learn more
The final variable '{0}' can only be set once.
Learn more
There isn't a setter named '{0}' in class '{1}'.
Learn more
Functions can't be assigned a value.
Learn more
Methods can't be assigned a value.
Learn more
assignment_to_primary_constructor_parameter
A primary constructor parameter can't be assigned to in an initializer.
Types can't be assigned a value.
Learn more
The async for-in loop can only be used in an async function.
Learn more
async_keyword_used_as_identifier
The keywords 'await' and 'yield' can't be used as identifiers in an asynchronous or generator function.
Returning a 'Future' without 'await'.
toggle_on
Learn more
augmentation_extends_clause_already_present
The augmentation has an 'extends' clause, but an augmentation target already includes an 'extends' clause and it isn't allowed to be repeated or changed.
augmentation_formal_parameter_modifier_extra
The augmentation has the '{0}' modifier on this formal parameter, but the declaration doesn't.
augmentation_formal_parameter_modifier_missing
The augmentation is missing the '{0}' modifier on this formal parameter that the declaration has.
augmentation_formal_parameter_type_mismatch
The augmentation's formal parameter type '{0}' must be the same as the declaration's formal parameter type '{1}'.
augmentation_modifier_extra
The augmentation has the '{0}' modifier that the declaration doesn't have.
augmentation_modifier_missing
The augmentation is missing the '{0}' modifier that the declaration has.
augmentation_named_formal_parameter_extra
The augmentation has a named formal parameter '{0}', but the declaration doesn't.
augmentation_named_formal_parameter_missing
The augmentation is missing the named formal parameter '{0}' from the declaration.
augmentation_of_different_declaration_kind
Can't augment a {0} with a {1}.
augmentation_of_mixin_application_class
Mixin application classes can't be augmented.
augmentation_optional_positional_formal_parameter_count
The augmentation has {0} optional positional formal parameters, but the declaration has {1}.
augmentation_positional_formal_parameter_name
The parameter name '{0}' must either match the name '{1}' from a preceding declaration or be '_'.
augmentation_required_positional_formal_parameter_count
The augmentation has {0} required positional formal parameters, but the declaration has {1}.
augmentation_return_type_mismatch
The augmentation's return type '{0}' must be the same as the introductory declaration's return type '{1}'. The getter induced by this augmentation has return type '{0}', but the getter being augmented has return type '{1}'.
augmentation_type_parameter_bound
The augmentation type parameter must have the same bound as the corresponding type parameter of the declaration.
augmentation_type_parameter_count
The augmentation must have the same number of type parameters as the declaration.
augmentation_type_parameter_name
The augmentation type parameter must have the same name as the corresponding type parameter of the declaration.
augmentation_variable_different_getter_setter_types
The getter and setter augmented by this variable have different types: '{0}' and '{1}'.
augmentation_without_declaration
The declaration being augmented doesn't exist. This augmentation induces a getter, but no getter declaration named '{0}' exists to augment. This augmentation induces a setter, but no setter declaration named '{0}' exists to augment.
augmented_expression_is_not_setter
The augmented declaration is not a setter, it can't be used to write a value.
augmented_expression_is_setter
The augmented declaration is a setter, it can't be used to read a value.
augmented_expression_not_operator
The enclosing augmentation doesn't augment the operator '{0}'.
augments_constant_variable
Const variables can't be augmented.
Unnecessary 'dynamic' type annotation.
toggle_on
Learn more
avoid_as
toggle_on
Conditional expressions with a 'bool' literal can be simplified.
toggle_on
Learn more
Catch clause should use 'on' to specify the type of exception being caught.
toggle_on
Learn more
avoid_catching_errors
The type 'Error' should not be caught. The type '{0}' should not be caught because it is a subclass of 'Error'.
toggle_on
avoid_classes_with_only_static_members
Classes should define instance members.
toggle_on
Explicit check for double or int.
toggle_on
Learn more
Method invocation or property access on a 'dynamic' target.
toggle_on
Learn more
Empty statements are not allowed in an 'else' clause.
toggle_on
Learn more
avoid_equals_and_hash_code_on_mutable_classes
The method '{0}' should not be overridden in classes not annotated with '@immutable'.
toggle_on
Unnecessary escape of '{0}'.
toggle_on
Learn more
avoid_field_initializers_in_const_classes
Fields in 'const' classes should not have initializers.
toggle_on
Parameters should not be marked as 'final'.
toggle_on
Learn more
Function literals shouldn't be passed to 'forEach'.
toggle_on
Learn more
Don't use the type 'FutureOr'.
toggle_on
Learn more
avoid_implementing_value_types
Classes that override '==' should not be implemented.
toggle_on
Redundant initialization to 'null'.
toggle_on
Learn more
Integer literal can't be represented exactly when compiled to JavaScript.
toggle_on
Learn more
Multiple variables declared on a single line.
toggle_on
Learn more
avoid_null_checks_in_equality_operators
Unnecessary null comparison in implementation of '=='.
toggle_on
'bool' parameters should be named parameters.
toggle_on
Learn more
Don't invoke 'print' in production code.
toggle_on
Learn more
avoid_private_typedef_functions
The typedef is unnecessary because it is only used in one place.
toggle_on
The value of the argument is redundant because it matches the default value.
toggle_on
Learn more
Can't use a relative path to import a library in 'lib'.
toggle_on
Learn more
The parameter name '{0}' doesn't match the name '{1}' in the overridden method.
toggle_on
Learn more
Unnecessary return type on a setter.
toggle_on
Learn more
avoid_returning_null
toggle_on
avoid_returning_null_for_future
toggle_on
Don't return 'null' from a function with a return type of 'void'. Don't return 'null' from a method with a return type of 'void'.
toggle_on
Learn more
avoid_returning_this
Don't return 'this' from a method.
toggle_on
avoid_setters_without_getters
Setter has no corresponding getter.
toggle_on
The type parameter '{0}' shadows a type parameter from the enclosing {1}.
toggle_on
Learn more
Unnecessary cascade expression.
toggle_on
Learn more
Use of an async 'dart:io' method.
toggle_on
Learn more
Using 'toString' on a 'Type' is not safe in production code.
toggle_on
Learn more
The parameter name '{0}' matches a visible type name. The type parameter name '{0}' matches a visible type name.
toggle_on
Learn more
Unnecessary type annotation on a function expression parameter.
toggle_on
Learn more
Unnecessary instance of 'Container'.
toggle_on
Learn more
avoid_unstable_final_fields
toggle_on
The parameter '{0}' is not used in the constructor.
toggle_on
Learn more
avoid_void_async
An 'async' function should have a 'Future' return type when it doesn't return a value.
toggle_on
Don't use web-only libraries outside Flutter web plugins.
toggle_on
Learn more
The 'await' expression can't be used in a 'late' local variable's initializer.
Learn more
await_in_wrong_context
The await expression can only be used in an async function.
The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'.
Learn more
Uses 'await' on an instance of '{0}', which is not a subtype of 'Future'.
toggle_on
Learn more
base_enum
Enums can't be declared to be 'base'.
binary_operator_written_out
Binary operator '{0}' is written as '{1}' instead of the written out word.
The body might complete normally, causing 'null' to be returned, but the return type, '{0}', is a potentially non-nullable type.
Learn more
This 'onError' handler must return a value assignable to '{0}', but ends without returning a value.
Learn more
This function has a nullable return type of '{0}', but ends without returning a value.
Learn more
A break label resolves to the 'case' or 'default' statement.
Learn more
break_outside_of_loop
A break statement can't be used outside of a loop or switch statement.
The built-in identifier '{0}' can't be used as a type.
Learn more
The built-in identifier '{0}' can't be used as a prefix name. The built-in identifier '{0}' can't be used as a type name. The built-in identifier '{0}' can't be used as a type parameter name. The built-in identifier '{0}' can't be used as a typedef name. The built-in identifier '{0}' can't be used as an extension name. The built-in identifier '{0}' can't be used as an extension type name.
Learn more
The extension name '{0}' isn't an UpperCamelCase identifier.
toggle_on
Learn more
The type name '{0}' isn't an UpperCamelCase identifier.
toggle_on
Learn more
camera_permissions_incompatible
Camera permissions make app incompatible for Chrome OS, consider adding optional features "android.hardware.camera" and "android.hardware.camera.autofocus".
Uncancelled instance of 'StreamSubscription'.
toggle_on
Learn more
cascade_invocations
Unnecessary duplication of receiver.
toggle_on
The last statement of the 'case' should be 'break', 'continue', 'rethrow', 'return', or 'throw'.
Learn more
The switch case expression type '{0}' can't override the '==' operator.
Learn more
The switch case expression type '{0}' must be a subtype of the switch expression type '{1}'.
Learn more
This cast always throws an exception because the expression always evaluates to 'null'.
Learn more
This cast will always throw an exception because the nullable local variable '{0}' is not assigned.
Learn more
cast_nullable_to_non_nullable
Don't cast a nullable value to a non-nullable type.
toggle_on
The name '{0}' isn't a type, so it can't be used in an 'as' expression.
Learn more
catch_syntax
'catch' must be followed by '(identifier)' or '(identifier, identifier)'.
catch_syntax_extra_parameters
'catch' must be followed by '(identifier)' or '(identifier, identifier)'.
class_in_class
Classes can't be declared inside other classes.
class_instantiation_access_to_member
The class '{0}' doesn't have a constructor named '{1}'. The instance member '{0}' can't be accessed on a class instantiation. The static member '{0}' can't be accessed on a class instantiation.
The class '{0}' can't be used as a mixin because it's neither a mixin class nor a mixin.
Learn more
The class '{0}' can't be used as a mixin because it declares a generative constructor.
Learn more
Unclosed instance of 'Sink'.
toggle_on
Learn more
Constant values from a deferred library can't be used as keys in a 'const' map literal. Constant values from a deferred library can't be used as values in a 'const' constructor. Constant values from a deferred library can't be used as values in a 'const' list literal. Constant values from a deferred library can't be used as values in a 'const' map literal. Constant values from a deferred library can't be used as values in a 'const' set literal.
Learn more
The argument type '{0}' isn't related to '{1}'.
toggle_on
Learn more
colon_in_place_of_in
For-in loops use 'in' rather than a colon.
combinators_ordering
Sort combinator names alphabetically.
toggle_on
comment_references
The referenced name isn't visible in scope.
toggle_on
The class '{0}' can't implement Finalizable.
Learn more
Concrete classes can't have 'Enum' as a superinterface.
Learn more
'{0}' must have a method body because '{1}' isn't abstract.
Learn more
conditional_uri_does_not_exist
The target of the conditional URI '{0}' doesn't exist.
toggle_on
'{0}' can't be used to name both a constructor and a static field in this class. '{0}' can't be used to name both a constructor and a static getter in this class. '{0}' can't be used to name both a constructor and a static method in this class. '{0}' can't be used to name both a constructor and a static setter in this class.
Learn more
conflicting_field_and_method
Class '{0}' can't define field '{1}' and have method '{2}.{1}' with the same name.
The {0} '{1}' can't implement both '{2}' and '{3}' because the type arguments are different.
Learn more
conflicting_inherited_method_and_setter
The {0} '{1}' can't inherit both a method and a setter named '{2}'.
conflicting_key
The key '{0}' can't be used when '{1}' is also used.
conflicting_method_and_field
Class '{0}' can't define method '{1}' and have field '{2}.{1}' with the same name.
conflicting_modifiers
Members can't be declared to be both '{0}' and '{1}'.
conflicting_static_and_instance
Class '{0}' can't define static member '{1}' and have instance member '{2}.{1}' with the same name.
'{0}' can't be used to name both a type parameter and the class in which the type parameter is defined. '{0}' can't be used to name both a type parameter and the enum in which the type parameter is defined. '{0}' can't be used to name both a type parameter and the extension in which the type parameter is defined. '{0}' can't be used to name both a type parameter and the extension type in which the type parameter is defined. '{0}' can't be used to name both a type parameter and the mixin in which the type parameter is defined.
Learn more
'{0}' can't be used to name both a type parameter and a member in this class. '{0}' can't be used to name both a type parameter and a member in this enum. '{0}' can't be used to name both a type parameter and a member in this extension type. '{0}' can't be used to name both a type parameter and a member in this extension. '{0}' can't be used to name both a type parameter and a member in this mixin.
Learn more
const_and_final
Members can't be declared to be both 'const' and 'final'.
const_class
Classes can't be declared to be 'const'.
const_constructor_field_type_mismatch
In a const constructor, a value of type '{0}' can't be assigned to the field '{1}', which has type '{2}'.
A value of type '{0}' can't be assigned to a parameter of type '{1}' in a const constructor.
Learn more
const_constructor_throws_exception
Const constructors can't throw exceptions.
const_constructor_with_body
Const constructors can't have a body.
Can't define the 'const' constructor because the field '{0}' is initialized with a non-constant value.
Learn more
const_constructor_with_mixin_with_field
This constructor can't be declared 'const' because a mixin adds the instance field: {0}. This constructor can't be declared 'const' because the mixins add the instance fields: {0}.
A constant constructor can't call a non-constant super constructor of '{0}'.
Learn more
Can't define a const constructor for a class with non-final fields.
Learn more
Deferred classes can't be created with 'const'.
Learn more
const_eval_assertion_failure
The assertion in this constant expression failed.
const_eval_assertion_failure_with_message
An assertion failed with message '{0}'.
const_eval_extension_method
Extension methods can't be used in constant expressions.
const_eval_extension_type_method
Extension type methods can't be used in constant expressions.
const_eval_for_element
Constant expressions don't support 'for' elements.
const_eval_method_invocation
Methods can't be invoked in constant expressions.
const_eval_primitive_equality
In constant expressions, operands of the equality operator must have primitive equality.
const_eval_property_access
The property '{0}' can't be accessed on the type '{1}' in a constant expression.
const_eval_throws_exception
Evaluation of this constant expression throws an exception.
const_eval_throws_idbze
Evaluation of this constant expression throws an IntegerDivisionByZeroException.
const_eval_type_bool
In constant expressions, operands of this operator must be of type 'bool'.
const_eval_type_bool_int
In constant expressions, operands of this operator must be of type 'bool' or 'int'.
const_eval_type_bool_num_string
In constant expressions, operands of this operator must be of type 'bool', 'num', 'String' or 'null'.
const_eval_type_int
In constant expressions, operands of this operator must be of type 'int'.
const_eval_type_num
In constant expressions, operands of this operator must be of type 'num'.
const_eval_type_num_string
In constant expressions, operands of this operator must be of type 'num' or 'String'.
const_eval_type_string
In constant expressions, operands of this operator must be of type 'String'.
const_eval_type_type
In constant expressions, operands of this operator must be of type 'Type'.
const_factory
Only redirecting factory constructors can be declared to be 'const'.
Const variables must be initialized with a constant value.
Learn more
Constant values from a deferred library can't be used to initialize a 'const' variable.
Learn more
Only static fields can be declared as const.
Learn more
The type of a key in a constant map can't override the '==' operator, or 'hashCode', but the class '{0}' does.
Learn more
const_method
Getters, setters and methods can't be declared to be 'const'.
The constant '{0}' must be initialized.
Learn more
const_primary_constructor_with_body
The body part of a constant primary constructor can't have a block body. The body part of a constant primary constructor can't have an expression body.
An element in a constant set can't override the '==' operator, or 'hashCode', but the type '{0}' does.
Learn more
A list or a set is expected in this spread.
Learn more
A map is expected in this spread.
Learn more
const_type_parameter
Type parameters can't be used in a constant expression.
The constructor being called isn't a const constructor.
Learn more
Arguments of a constant creation must be constant expressions.
Learn more
A constant constructor tearoff can't use a type parameter as a type argument. A constant creation can't use a type parameter as a type argument. A constant function tearoff can't use a type parameter as a type argument.
Learn more
const_with_undefined_constructor
The class '{0}' doesn't have a constant constructor '{1}'.
const_with_undefined_constructor_default
The class '{0}' doesn't have an unnamed constant constructor.
const_without_primary_constructor
'const' can only be used together with a primary constructor declaration.
The constant name '{0}' isn't a lowerCamelCase identifier.
toggle_on
Learn more
The matched value type '{0}' can never be equal to this constant of type '{1}'.
Learn more
The expression of a constant pattern must be a valid constant.
Learn more
constant_variable_augmentation
Variable augmentations can't be const.
constructor_with_return_type
Constructors can't have a return type.
constructor_with_type_arguments
A constructor invocation can't have type arguments after the constructor name.
The label used in a 'continue' statement must be defined on either a loop or a switch member.
Learn more
continue_outside_of_loop
A continue statement can't be used outside of a loop or switch statement.
continue_without_label_in_case
A continue statement in a switch statement must have a label as a target.
Use of '{0}' in a 'finally' clause.
toggle_on
Learn more
could_not_infer
Couldn't infer type parameter '{0}'.{1}
covariant_and_static
Members can't be declared to be both 'covariant' and 'static'.
covariant_constructor
A constructor can't be declared to be 'covariant'.
covariant_member
Getters, setters and methods can't be declared to be 'covariant'.
Subclasses of 'Struct' and 'Union' are backed by native memory, and can't be instantiated by a generative constructor.
Learn more
The name '{0}' isn't a class.
Learn more
Statements in {0} should be enclosed in a block.
toggle_on
Learn more
Dangling library doc comment.
toggle_on
Learn more
Dead code. Dead code: The assigned-to wildcard variable is marked late and can never be referenced so this initializer will never be evaluated.
Learn more
Dead code: Catch clauses after a 'catch (e)' or an 'on Object catch (e)' are never reached.
Learn more
Dead code: This on-catch block won't be executed because '{0}' is a subtype of '{1}' and hence will have been caught already.
Learn more
The left operand can't be null, so the right operand is never executed.
Learn more
declaration_already_complete
The augmentation can't provide a body because the function or member is already complete. The augmentation can't provide a body, initializers, or initializing formal or super formal parameters because the constructor is already complete. The getter induced by this augmentation is complete, but the getter being augmented is already complete. The setter induced by this augmentation is complete, but the setter being augmented is already complete.
default_in_switch_expression
A switch expression may not use the default keyword.
The default 'List' constructor isn't available when null safety is enabled.
Learn more
default_value_already_specified_in_augmentation_chain
The default value for this optional parameter was already specified in the augmentation chain.
Parameters in a function type can't have default values.
Learn more
Default values aren't allowed in factory constructors that redirect to another constructor.
Learn more
Required named parameters can't have a default value.
Learn more
deferred_after_prefix
The deferred keyword should come immediately before the prefix ('as' clause).
Deferred library imports must hide all extension declarations.
Learn more
The late local variable '{0}' is definitely unassigned at this point.
Learn more
The imported package '{0}' isn't a dependency of the importing package.
toggle_on
Learn more
The value of the '{0}' field is expected to be a map.
Learn more
Using a colon as the separator before a default value is deprecated and will not be supported in language version 3.0 and later.
Learn more
deprecated_consistency
Constructors in a deprecated class should be deprecated. Fields that are initialized by a deprecated parameter should be deprecated. Parameters that initialize a deprecated field should be deprecated.
toggle_on
The ability to import '{0}' indirectly is deprecated.
Learn more
Extending '{0}' is deprecated.
Learn more
Methods named 'factory' will become constructors when the primary_constructors feature is enabled.
Learn more
The '{0}' field is no longer used and can be removed.
Learn more
Implementing '{0}' is deprecated.
Learn more
Instantiating '{0}' is deprecated.
Learn more
The lint rule '{0}' is deprecated and shouldn't be enabled.
Learn more
deprecated_lint_with_replacement
The lint rule '{0}' is deprecated and replaced by '{1}'.
'{0}' is deprecated and shouldn't be used. '{0}' is deprecated and shouldn't be used. {1} The implicitly invoked super constructor '{0}' is deprecated and shouldn't be used. The implicitly invoked super constructor '{0}' is deprecated and shouldn't be used. {1} The implicitly referenced type '{0}' is deprecated and shouldn't be used. The implicitly referenced type '{0}' is deprecated and shouldn't be used. {1}
Learn more
deprecated_member_use_from_same_package
'{0}' is deprecated and shouldn't be used. '{0}' is deprecated and shouldn't be used. {1}
toggle_on
Mixing in '{0}' is deprecated.
Learn more
Using the 'new' keyword in a comment reference is deprecated.
Learn more
Omitting an argument for the '{0}' parameter is deprecated.
Learn more
Subclassing '{0}' is deprecated.
Learn more
Extending 'Function' is deprecated. Implementing 'Function' has no effect. Mixing in 'Function' is deprecated.
Learn more
'dart:{0}' is deprecated and shouldn't be used as an import/export configuration.
Learn more
The public property isn't described by either 'debugFillProperties' or 'debugDescribeChildren'.
toggle_on
Learn more
different_inherited_getter_and_setter_types
Can't infer a type for '{0}' because the combined member signature of the getter has return type '{1}', which is not the same as the parameter type '{2}' of the combined member signature of the setter.
directive_after_declaration
Directives must appear before any declarations.
directives_ordering
Place 'dart:' {0} before other {0}. Place 'package:' {0} before relative {0}. Sort directive sections alphabetically. Specify exports in a separate section after all imports.
toggle_on
Only a generic type, generic function, generic instance method, or generic constructor can have type arguments.
Learn more
discarded_futures
'Future'-returning calls in a non-'async' function. 'FutureOr'-returning calls in a non-'async' function.
toggle_on
The operator x ~/ y is more efficient than (x / y).toInt().
Learn more
do_not_use_environment
Invalid use of an environment declaration.
toggle_on
doc_directive_argument_wrong_format
The '{0}' argument must be formatted as {1}.
doc_directive_has_extra_arguments
The '{0}' directive has '{1}' arguments, but only '{2}' are expected.
doc_directive_has_unexpected_named_argument
The '{0}' directive has an unexpected named argument, '{1}'.
doc_directive_missing_argument
The '{0}' directive is missing a '{1}' and a '{2}' argument. The '{0}' directive is missing a '{1}' argument. The '{0}' directive is missing a '{1}', a '{2}', and a '{3}' argument.
doc_directive_missing_closing_brace
Doc directive is missing a closing curly brace ('}').
doc_directive_missing_closing_tag
Doc directive is missing a closing tag.
doc_directive_missing_opening_tag
Doc directive is missing an opening tag.
doc_directive_unknown
Doc directive '{0}' is unknown.
Doc imports can't be deferred.
Learn more
Doc imports can't have show or hide combinators.
Learn more
Doc imports can't have configurations.
Learn more
Doc imports can't have prefixes.
Learn more
doc_import_in_part_file
Doc imports in part files require the 'enhanced-parts' language feature.
document_ignores
Missing documentation explaining why the diagnostic is ignored.
toggle_on
A dot shorthand can't be used where there is no context type.
Learn more
The static getter '{0}' isn't defined for the context type '{1}'. The static method or constructor '{0}' isn't defined for the context type '{1}'.
Learn more
The constructor with name '{0}' is already defined. The unnamed constructor is already defined.
Learn more
duplicate_deferred
An import directive can only have one 'deferred' keyword.
The name '{0}' is already defined.
Learn more
Duplicate export. Duplicate of export in '{0}'.
Learn more
The field '{0}' can't be initialized by multiple parameters in the same constructor.
Learn more
The field name '{0}' is already used in this record.
Learn more
Duplicate hidden name.
Learn more
The diagnostic '{0}' doesn't need to be ignored here because it's already being ignored.
Learn more
Duplicate import. Duplicate of import in '{0}'.
Learn more
duplicate_label_in_switch_statement
The label '{0}' was already used in this switch statement.
The argument for the named parameter '{0}' was already specified.
Learn more
The library already contains a part with the URI '{0}'.
Learn more
The variable '{0}' is already assigned in this pattern.
Learn more
The field '{0}' is already matched in this pattern.
Learn more
duplicate_prefix
An import directive can only have one prefix ('as' clause).
At most one rest element is allowed in a list or map pattern.
Learn more
The rule '{0}' is already enabled and doesn't need to be enabled again.
Learn more
Duplicate shown name.
Learn more
The variable '{0}' is already defined in this pattern.
Learn more
duplicated_modifier
The modifier '{0}' was already specified.
Empty catch block.
toggle_on
Learn more
Empty constructor bodies should be written using a ';' rather than '{}'.
toggle_on
Learn more
Empty {0} bodies should be written using a ';' rather than '{}'.
toggle_on
Learn more
empty_enum_body
An enum must declare at least one constant name.
A map pattern must have at least one entry.
Learn more
A record literal without fields can't have a trailing comma.
Learn more
The list of named fields in a record type can't be empty.
Learn more
A record type without fields can't have a trailing comma.
Learn more
Unnecessary empty statement.
toggle_on
Learn more
The class '{0}' can't be empty because it's a subclass of '{1}'.
Learn more
enable_null_safety
toggle_on
encoding
Unable to decode bytes as UTF-8.
enum_constant_invokes_factory_constructor
An enum value can't invoke a factory constructor.
The name of the enum value can't be the same as the enum's name.
Learn more
The invoked constructor isn't a 'const' constructor.
Learn more
enum_in_class
Enums can't be declared inside classes.
enum_instantiated_to_bounds_is_not_well_bounded
The result of instantiating the enum to bounds is not well-bounded.
Mixins applied to enums can't have instance variables.
Learn more
'{0}' must have a method body because '{1}' is an enum.
Learn more
The name 'values' is not a valid name for an enum.
Learn more
enum_without_constants
The enum must have at least one enum constant.
Missing a newline at the end of the file. Too many newlines at the end of the file.
toggle_on
Learn more
Two elements in a constant set literal can't be equal.
Learn more
Two elements in a set literal shouldn't be equal.
Learn more
Two keys in a constant map literal can't be equal.
Learn more
Two keys in a map literal shouldn't be equal.
Learn more
Two keys in a map pattern can't be equal.
Learn more
equality_cannot_be_equality_operand
A comparison expression can't be an operand of another comparison expression.
erase_dart_type_extension_types
Unsafe use of 'DartType' in an 'is' check.
exclude_invalid_glob
The exclude glob pattern '{0}' shouldn't start with a forward slash.
Missing case clauses for some constants in '{0}'.
toggle_on
Learn more
expected_body
A catch clause must have a body, even if it is empty. A class declaration must have a body, even if it is empty. A finally clause must have a body, even if it is empty. A mixin declaration must have a body, even if it is empty. A switch expression must have a body, even if it is empty. A switch statement must have a body, even if it is empty. A try statement must have a body, even if it is empty. An extension declaration must have a body, even if it is empty. An extension type declaration must have a body, even if it is empty.
expected_case_or_default
Expected 'case' or 'default'.
expected_class_member
Expected a class member.
expected_else_or_comma
Expected 'else' or comma.
expected_executable
Expected a method, getter, setter or operator declaration.
expected_identifier_but_got_keyword
'{0}' can't be used as an identifier because it's a keyword.
expected_instead
Expected '{0}' instead of this.
expected_list_or_map_literal
Expected a list or map literal.
expected_named_type
Expected a class name. Expected a mixin name. Expected the name of a class or mixin.
List patterns require one type argument or none, but {0} found.
Learn more
List literals require one type argument or none, but {0} found.
Learn more
Set literals require one type argument or none, but {0} were found.
Learn more
expected_primary
Expected either an identifier or a string literal.
expected_representation_field
Expected a representation field.
expected_representation_type
Expected a representation type.
expected_string_literal
Expected a string literal.
expected_token
Expected to find '{0}'.
Map patterns require two type arguments or none, but {0} found.
Learn more
Map literals require two type arguments or none, but {0} found.
Learn more
expected_type_name
Expected a type name.
experiment_not_enabled
This requires the '{0}' language feature to be enabled.
experiment_not_enabled_off_by_default
This requires the experimental '{0}' language feature to be enabled.
experimental_member_use
'{0}' is experimental and could be removed or changed at any time.
export_directive_after_part_directive
Export directives must precede part directives.
The library '{0}' is internal and can't be exported.
Learn more
The symbol '{0}' is defined in a legacy library, and can't be re-exported from a library with null safety enabled.
Learn more
The exported library '{0}' can't have a part-of directive.
Learn more
Expressions can't be used in a map literal.
Learn more
Classes can only extend other classes.
Learn more
Extension '{0}' can't be used as an expression.
Learn more
extension_augmentation_has_on_clause
Extension augmentations can't have 'on' clauses.
extension_augmentation_without_name
An extension augmentation must have a name.
An extension can't define static member '{0}' and an instance member with the same name.
Learn more
Extensions can't declare abstract members.
Learn more
Extensions can't declare constructors.
Learn more
Extensions can't declare instance fields.
Learn more
Extensions can't declare members with the same name as a member declared by 'Object'.
Learn more
An extension override can't be used to access a static member from an extension.
Learn more
The type of the argument to the extension override '{0}' isn't assignable to the extended type '{1}'.
Learn more
Extension overrides have no value so they can't be used as the receiver of a cascade expression.
Learn more
An extension override can only be used to access instance members.
Learn more
extension_primary_constructor
Extensions can't have primary constructors.
extension_type_augmentation_specifies_representation_field
An extension type augmentation can't specify a representation field.
Extension type constructors can't declare super formal parameters.
Learn more
Extension type constructors can't include super initializers.
Learn more
Extension types can't declare instance fields.
Learn more
Extension types can't declare members with the same name as a member declared by 'Object'.
Learn more
extension_type_extends
An extension type declaration can't have an 'extends' clause.
Extension types can't implement '{0}'.
Learn more
The extension type can't implement itself.
Learn more
'{0}' is not a supertype of '{1}', the representation type.
Learn more
'{0}', the representation type of '{1}', is not a supertype of '{2}', the representation type of '{3}'.
Learn more
The extension type '{0}' has more than one distinct member named '{1}' from implemented types.
Learn more
The extension type representation can't depend on itself.
Learn more
The representation type can't be a bottom type.
Learn more
extension_type_with
An extension type declaration can't have a 'with' clause.
'{0}' must have a method body because '{1}' is an extension type.
Learn more
external_class
Classes can't be declared to be 'external'.
external_constructor_with_field_initializers
An external constructor can't initialize fields.
external_constructor_with_initializer
An external constructor can't have any initializers.
external_enum
Enums can't be declared to be 'external'.
external_factory_redirection
A redirecting factory can't be external.
external_factory_with_body
External factories can't have a body.
external_getter_with_body
External getters can't have a body.
external_late_field
External fields cannot be late.
external_method_with_body
An external or native method can't have a body.
external_operator_with_body
External operators can't have a body.
external_setter_with_body
External setters can't have a body.
external_typedef
Typedefs can't be declared to be 'external'.
External fields can't have initializers. External variables can't have initializers.
Learn more
Fields in a struct class must have exactly one annotation indicating the native type.
Learn more
Too many positional arguments: {0} expected, but {1} found.
Learn more
Too many positional arguments: {0} expected, but {1} found.
Learn more
'Array's must have exactly one 'Array' annotation.
Learn more
extraneous_modifier
Can't have modifier '{0}' here.
extraneous_modifier_in_extension_type
Can't have modifier '{0}' in an extension type.
extraneous_modifier_in_primary_constructor
Can't have modifier '{0}' in a primary constructor.
factory_constructor_new_name
Factory constructors can't be named 'new'.
factory_not_complete_after_augmentations
The factory constructor '{0}' must have a body or redirection after all augmentations are applied.
factory_top_level_declaration
Top-level declarations can't be declared to be 'factory'.
factory_with_initializers
A 'factory' constructor can't have initializers.
factory_without_body
A non-redirecting 'factory' constructor must have a body.
There may be at most one @DefaultAsset annotation on a library.
Learn more
Native functions and fields must have exactly one @Native annotation.
Learn more
Native functions must be declared external.
Learn more
Only classes extending NativeFieldWrapperClass1 can be passed as Pointer.
Learn more
Unexpected number of Native annotation parameters. Expected {0} but has {1}.
Learn more
Unexpected number of Native annotation parameters. Expected {0} but has {1}. Native instance method annotation must have receiver as first argument.
Learn more
Fields in subclasses of 'Struct' and 'Union' can't have initializers.
Learn more
The field '{0}' can't be initialized twice in the same constructor.
Learn more
field_initialized_in_declaration_and_initializer_of_primary_constructor
Fields can't be initialized in both the primary constructor and at their declaration.
field_initialized_in_declaration_and_parameter_of_primary_constructor
Fields can't be initialized in both the primary constructor parameter list and at their declaration.
Fields can't be initialized in the constructor if they are final and were already initialized at their declaration.
Learn more
Fields can't be initialized in both the parameter list and the initializers.
Learn more
field_initialized_outside_declaring_class
A field can only be initialized in its declaring class
Initializing formal parameters can't be used in factory constructors.
Learn more
Constructors in subclasses of 'Struct' and 'Union' can't have field initializers.
Learn more
The initializer type '{0}' can't be assigned to the field type '{1}' in a const constructor. The initializer type '{0}' can't be assigned to the field type '{1}'.
Learn more
Field formal parameters can only be used in a constructor.
Learn more
The redirecting constructor can't have a field initializer.
Learn more
The parameter type '{0}' is incompatible with the field type '{1}'.
Learn more
Fields of 'Struct' and 'Union' subclasses must be marked external.
Learn more
The file name '{0}' isn't a lower_case_with_underscores identifier.
toggle_on
Learn more
final_and_covariant
Members can't be declared to be both 'final' and 'covariant'.
final_and_covariant_late_with_initializer
Members marked 'late' with an initializer can't be declared to be both 'final' and 'covariant'.
final_and_var
Members can't be declared to be both 'final' and 'var'.
final_constructor
A constructor can't be declared to be 'final'.
final_enum
Enums can't be declared to be 'final'.
'{0}' is final and was given a value when it was declared, so it can't be set to a new value.
Learn more
final_method
Getters, setters and methods can't be declared to be 'final'.
final_mixin
A mixin can't be declared 'final'.
final_mixin_class
A mixin class can't be declared 'final'.
The final variable '{0}' must be initialized.
Learn more
All final variables must be initialized, but '{0}' and '{1}' aren't. All final variables must be initialized, but '{0}' isn't. All final variables must be initialized, but '{0}', '{1}', and {2} others aren't.
Learn more
fixme
{0}
The value of the 'flutter' field is expected to be a map.
Learn more
flutter_style_todos
To-do comment doesn't follow the Flutter style.
toggle_on
The type '{0}' used in the 'for' loop must implement '{1}' with a type argument that can be assigned to '{2}'.
Learn more
The type '{0}' used in the 'for' loop must implement '{1}'.
Learn more
A for-in loop variable can't be a 'const'.
Learn more
function_not_complete_after_augmentations
The function or member '{0}' must have a body after all augmentations are applied.
function_typed_parameter_var
Function-typed parameters can't specify 'const', 'final' or 'var' in place of a return type.
For synchronous values, Future.syncValue is more performant.
toggle_on
Learn more
generic_function_type_cannot_be_bound
Generic function types can't be used as type parameter bounds.
generic_function_type_cannot_be_type_argument
A generic function type can't be a type argument.
A method tear-off on a receiver whose type is 'dynamic' can't have type arguments.
Learn more
The class '{0}' can't extend 'Struct' or 'Union' because '{0}' is generic.
Learn more
getter_constructor
Constructors can't be a getter.
getter_in_function
Getters can't be defined within methods or functions.
getter_not_assignable_setter_types
The return type of getter '{0}' is '{1}' which isn't assignable to the type '{2}' of its setter '{3}'.
The return type of getter '{0}' is '{1}' which isn't a subtype of the type '{2}' of its setter '{3}'.
Learn more
getter_with_parameters
Getters must be declared without a parameter list.
hack
{0}
Missing a corresponding override of '{0}'.
toggle_on
Learn more
if_element_condition_from_deferred_library
Constant values from a deferred library can't be used as values in an if condition inside a const collection literal.
illegal_assignment_to_non_assignable
Illegal assignment to non-assignable expression.
Functions marked 'async*' must have a return type that is a supertype of 'Stream' for some type 'T'.
Learn more
Functions marked 'async' must have a return type which is a supertype of 'Future'.
Learn more
illegal_character
Illegal character '{0}'.
A concrete instance member named '{0}' can't be declared in a class that implements 'Enum'. A concrete instance member named '{0}' can't be inherited from '{1}' in a class that implements 'Enum'.
Learn more
An instance member named 'values' can't be declared in a class that implements 'Enum'. An instance member named 'values' can't be inherited from '{0}' in a class that implements 'Enum'.
Learn more
illegal_language_version_override
The language version must be {0}.
illegal_pattern_assignment_variable_name
A variable assigned by a pattern assignment can't be named '{0}'.
illegal_pattern_identifier_name
A pattern can't refer to an identifier named '{0}'.
illegal_pattern_variable_name
The variable declared by a variable pattern can't be named '{0}'.
Functions marked 'sync*' must have a return type that is a supertype of 'Iterable' for some type 'T'.
Learn more
Import of a library in the 'lib/src' directory of another package.
toggle_on
Learn more
implements_before_extends
The extends clause must be before the implements clause.
implements_before_on
The on clause must be before the implements clause.
implements_before_with
The with clause must be before the implements clause.
Classes and mixins can only implement other classes and mixins.
Learn more
'{0}' can only be implemented once.
Learn more
'{0}' can't be used in both the 'extends' and 'implements' clauses. '{0}' can't be used in both the 'extends' and 'with' clauses.
Learn more
implements_super_class_constraint
'{0}' can't be used in both the 'on' and 'implements' clauses.
Implicit tear-off of the 'call' method.
toggle_on
Learn more
implicit_reopen
The {0} '{1}' reopens '{2}' because it is not marked '{3}'.
toggle_on
The implicitly invoked unnamed constructor from '{0}' has required parameters.
Learn more
The instance member '{0}' can't be accessed in an initializer.
Learn more
The imported library defines a top-level function named 'loadLibrary' that is hidden by deferring this library.
Learn more
import_directive_after_part_directive
Import directives must precede part directives.
The library '{0}' is internal and can't be imported.
Learn more
The library '{0}' is legacy, and shouldn't be imported into a null safe library.
Learn more
The imported library '{0}' can't have a part-of directive.
Learn more
The URI '{0}' included in '{1}' can't be found when analyzing '{2}'.
Learn more
{0} in {1}({2}..{3})
Learn more
Warning in the included options file {0}({1}..{2}): {3}
Learn more
incompatible_element_kind
An element of kind '{0}' can't be replaced by an element of kind '{1}'.
The rule '{0}' is incompatible with '{1}'. The rule '{0}' is incompatible with {1}, which is included from {2} file{3}. The rule '{0}' is incompatible with {1}.
Learn more
incompatible_plugin_source
The plugin '{0}' is specified with a different source in '{1}'.
inconsistent_case_expression_types
Case expressions must have the same types, '{0}' isn't a '{1}'.
Superinterfaces don't have a valid override for '{0}': {1}.
Learn more
inconsistent_inheritance_getter_and_method
'{0}' is inherited as a getter (from '{1}') and also a method (from '{2}').
Parts must have exactly the same language version override as the library.
Learn more
The variable '{0}' has a different type and/or finality in this branch of the logical-or pattern.
Learn more
induced_getter_not_complete_after_augmentations
The getter induced by '{0}' must have a body after all augmentations are applied.
induced_getter_without_body
The getter induced by '{0}' must have a body.
induced_setter_not_complete_after_augmentations
The setter induced by '{0}' must have a body after all augmentations are applied.
induced_setter_without_body
The setter induced by '{0}' must have a body.
The type argument(s) of '{0}' can't be inferred.
Learn more
The type argument(s) of the function '{0}' can't be inferred.
Learn more
The return type of '{0}' can't be inferred.
Learn more
inference_failure_on_generic_invocation
The type argument(s) of the generic function type '{0}' can't be inferred.
inference_failure_on_instance_creation
The type argument(s) of the constructor '{0}' can't be inferred.
The type of '{0}' can't be inferred without either a type or initializer.
Learn more
The type of '{0}' can't be inferred; a type must be explicitly provided.
Learn more
Field should be initialized in the field declaration.
toggle_on
Learn more
initialized_variable_in_for_each
The loop variable in a for-each loop can't be initialized.
'{0}' isn't a field in the enclosing class.
Learn more
'{0}' is a static field in the enclosing class. Fields initialized in a constructor can't be static.
Learn more
initializing_declaring_parameter
Declaring parameters can't be initializing.
'{0}' isn't a field in the enclosing class.
Learn more
The static {0} '{1}' can't be accessed through an instance.
Learn more
Instance members can't be accessed from a factory constructor.
Learn more
Instance members can't be accessed from a static method.
Learn more
Abstract classes can't be instantiated.
Learn more
Enums can't be instantiated.
Learn more
Type aliases that expand to a type parameter can't be instantiated.
Learn more
The integer literal is being used as a double, but can't be represented as a 64-bit double without overflow or loss of precision: '{0}'.
Learn more
The integer literal {0} can't be represented in 64 bits.
Learn more
interface_enum
Enums can't be declared to be 'interface'.
interface_mixin
A mixin can't be declared 'interface'.
interface_mixin_class
A mixin class can't be declared 'interface'.
Annotation must be either a const variable reference or const constructor invocation.
Learn more
Constant values from a deferred library can't be used in annotations.
Learn more
Constant values from a deferred library can't be used as annotations.
Learn more
The annotation '{0}' can only be used on {1}.
Learn more
A value of type '{0}' can't be assigned to a variable of type '{1}'.
Learn more
invalid_await_in_for
The keyword 'await' isn't allowed for a normal 'for' statement.
The annotation 'awaitNotRequired' can only be applied to a Future-returning function, or a Future-typed field.
Learn more
invalid_case_patterns
This expression is not valid in a 'case' clause in Dart 3.0.
toggle_on
invalid_cast_function
The function '{0}' has type '{1}' that isn't of expected type '{2}'. This means its parameter or return type doesn't match what is expected.
invalid_cast_function_expr
The function expression type '{0}' isn't of type '{1}'. This means its parameter or return type doesn't match what is expected. Consider changing parameter type(s) or the returned type(s).
invalid_cast_literal
The literal '{0}' with type '{1}' isn't of expected type '{2}'.
invalid_cast_literal_list
The list literal type '{0}' isn't of expected type '{1}'. The list's type can be changed with an explicit generic type argument or by changing the element types.
invalid_cast_literal_map
The map literal type '{0}' isn't of expected type '{1}'. The map's type can be changed with an explicit generic type arguments or by changing the key and value types.
invalid_cast_literal_set
The set literal type '{0}' isn't of expected type '{1}'. The set's type can be changed with an explicit generic type argument or by changing the element types.
invalid_cast_method
The method tear-off '{0}' has type '{1}' that isn't of expected type '{2}'. This means its parameter or return type doesn't match what is expected.
invalid_cast_new_expr
The constructor returns type '{0}' that isn't of expected type '{1}'.
invalid_change_for_kind
A change of type '{0}' can't be used for an element of kind '{1}'.
invalid_character
Invalid character '{0}'.
invalid_code_point
The escape sequence '{0}' isn't a valid code point.
invalid_comment_reference
Comment references should contain a possibly prefixed identifier, but shouldn't contain anything else.
invalid_constant
Invalid constant value.
invalid_constant_const_prefix
The expression can't be prefixed by 'const' to form a constant pattern.
invalid_constant_pattern_binary
The binary operator {0} is not supported as a constant pattern.
invalid_constant_pattern_duplicate_const
Duplicate 'const' keyword in constant expression.
invalid_constant_pattern_empty_record_literal
The empty record literal is not supported as a constant pattern.
invalid_constant_pattern_generic
This expression is not supported as a constant pattern.
invalid_constant_pattern_negation
Only negation of a numeric literal is supported as a constant pattern.
invalid_constant_pattern_unary
The unary operator {0} is not supported as a constant pattern.
invalid_constructor_name
The name of a constructor must match the name of the enclosing class.
invalid_covariant_modifier_in_primary_constructor
The 'covariant' modifier can only be used on non-final declaring parameters.
Publishable packages can't have '{0}' dependencies.
Learn more
The annotation '@Deprecated.extend' can only be applied to extendable classes.
Learn more
The annotation '@Deprecated.implement' can only be applied to implementable classes.
Learn more
The annotation '@Deprecated.instantiate' can only be applied to classes.
Learn more
The annotation '@Deprecated.mixin' can only be applied to classes.
Learn more
The annotation '@Deprecated.optional' can only be applied to optional parameters.
Learn more
The annotation '@Deprecated.subclass' can only be applied to subclassable classes and mixins.
Learn more
The method {0} can't have an exceptional return value (the second argument) when the return type of the function is either 'void', 'Handle' or 'Pointer'.
Learn more
The member '{0}' can't be exported as a part of a package's public API.
Learn more
The member '{0}' can't be exported as a part of a package's public API, but is indirectly exported as part of the signature of '{1}'.
Learn more
Extension overrides must have exactly one argument: the value of 'this' in the extension method.
Learn more
Factory method '{0}' must have a return type.
Learn more
Factory method '{0}' doesn't return a newly allocated object.
Learn more
The name of a factory constructor must be the same as the name of the immediately enclosing class.
Learn more
Record field names can't be a dollar sign followed by an integer when the integer is the index of a positional field. Record field names can't be private. Record field names can't be the same as a member from 'Object'.
Learn more
Fields in struct classes can't have the type '{0}'. They can only be declared as 'int', 'double', 'Array', 'Pointer', or subtype of 'Struct' or 'Union'.
Learn more
invalid_generic_function_type
Invalid generic function type.
invalid_hex_escape
An escape sequence starting with '\x' must be followed by 2 hexadecimal digits.
'{0}.{1}' ('{2}') isn't a valid concrete implementation of '{3}.{1}' ('{4}'). The setter '{0}.{1}' ('{2}') isn't a valid concrete implementation of '{3}.{1}' ('{4}').
Learn more
invalid_initializer
Not a valid initializer.
Inline function types can't be used for parameters in a generic function type.
Learn more
invalid_inside_unary_pattern
This pattern cannot appear inside a unary pattern (cast pattern, null check pattern, or null assert pattern) without parentheses.
Only public elements in a package's private API can be annotated as being internal.
Learn more
invalid_key
Keys must be of type 'String' but found the type '{0}'.
The Dart language version override comment can't be followed by any non-whitespace characters. The Dart language version override comment must be specified with a version number, like '2.0', after the '=' character. The Dart language version override comment must be specified with an '=' character. The Dart language version override comment must be specified with exactly two slashes. The Dart language version override comment must be specified with the word 'dart' in all lower case. The Dart language version override number can't be prefixed with a letter. The Dart language version override number must begin with '@dart'. The language version override can't specify a version greater than the latest known language version: {0}.{1}. The language version override must be specified before any declaration or directive.
Learn more
Only const constructors can have the @literal annotation.
Learn more
invalid_literal_in_configuration
The literal in a configuration can't contain interpolation.
The modifier '{0}' can't be applied to the body of a constructor.
Learn more
Setters can't use 'async', 'async*', or 'sync*'.
Learn more
The annotation '@nonVirtual' can only be applied to a concrete instance member.
Learn more
The element can't be null, so the null-aware operator '?' is unnecessary. The map entry key can't be null, so the null-aware operator '?' is unnecessary. The map entry value can't be null, so the null-aware operator '?' is unnecessary. The receiver can't be 'null' because of short-circuiting, so the null-aware operator '{0}' can't be used. The receiver can't be null, so the null-aware operator '{0}' is unnecessary.
Learn more
invalid_operator
The string '{0}' isn't a user-definable operator.
invalid_operator_for_super
The operator '{0}' can't be used with 'super'.
invalid_operator_questionmark_period_for_super
The operator '?.' cannot be used with 'super' because 'super' cannot be null.
Invalid option specified for '{0}': {1}
Learn more
'{0}.{1}' ('{2}') isn't a valid override of '{3}.{1}' ('{4}'). The setter '{0}.{1}' ('{2}') isn't a valid override of '{3}.{1}' ('{4}').
Learn more
The member '{0}' is declared non-virtual in '{1}' and can't be overridden in subclasses.
Learn more
invalid_parameter_style
The parameter style must be one of the following: {0}.
The variable '{0}' doesn't have the same type and/or finality in all cases that share this body. The variable '{0}' is available in some, but not all cases that share this body. The variable '{0}' is not available because there is a label or 'default' case.
Learn more
The 'platforms' field must be a map with platforms as keys.
Learn more
Generative enum constructors can only be used to create an enum constant. Generative enum constructors can't be torn off.
Learn more
Invalid reference to 'this' expression.
Learn more
The annotation '@reopen' can only be applied to a class that opens capabilities that the supertype intentionally disallows.
Learn more
invalid_required_if
The key 'requiredIf' can only be used with optional named parameters.
A value of type '{0}' can't be returned by the 'onError' handler because it must be assignable to '{1}'. The return type '{0}' isn't assignable to '{1}', as required by 'Future.catchError'.
Learn more
A value of type '{0}' can't be returned by the 'onError' handler because it must be assignable to '{1}', as required by 'Future.then'. The return type '{0}' isn't assignable to '{1}', as required by 'Future.then'.
Learn more
Cast from '{0}' to '{1}' casts a Dart value to a JS interop type, which might not be platform-consistent. Cast from '{0}' to '{1}' casts a JS interop value to a Dart type, which might not be platform-consistent. Cast from '{0}' to '{1}' casts a JS interop value to an incompatible JS interop type, which might not be platform-consistent. Catch clause with type '{0}' checks whether the caught value is a JS interop type, which might not be platform-consistent. Runtime check between '{0}' and '{1}' checks whether a Dart value is a JS interop type, which might not be platform-consistent. Runtime check between '{0}' and '{1}' checks whether a JS interop value is a Dart type, which might not be platform-consistent. Runtime check between '{0}' and '{1}' involves a non-trivial runtime check between two JS interop types that might not be platform-consistent. Runtime check between '{0}' and '{1}' involves a runtime check between a JS interop value and an unrelated JS interop type that will always be true and won't check the underlying type. Runtime check or cast between '{0}' and '{1}' involves both a 'dart:js_interop' type and a 'dart:js' type, which are unrelated. 'dart:js' types are Dart wrappers around JS values and aren't JS values themselves.
toggle_on
Learn more
The annotation '@sealed' can only be applied to classes.
Learn more
Invalid format for the '{0}' section.
Learn more
invalid_star_after_async
The modifier 'async*' isn't allowed for an expression function body.
Super parameters can only be used in non-redirecting generative constructors.
Learn more
invalid_super_in_initializer
Can only use 'super' in an initializer for calling the superclass constructor (e.g. 'super()' or 'super.namedConstructor()')
invalid_sync
The modifier 'sync' isn't allowed for an expression function body.
invalid_this_in_initializer
Can only use 'this' in an initializer for field initialization (e.g. 'this.x = something') and constructor redirection (e.g. 'this()' or 'this.namedConstructor())
Constant list literals can't use a type parameter in a type argument, such as '{0}'. Constant map literals can't use a type parameter in a type argument, such as '{0}'. Constant set literals can't use a type parameter in a type argument, such as '{0}'.
Learn more
invalid_unicode_escape_started
The string '' can't stand alone.
invalid_unicode_escape_u_bracket
An escape sequence starting with '\u{' must be followed by 1 to 6 hexadecimal digits followed by a '}'.
invalid_unicode_escape_u_no_bracket
An escape sequence starting with '\u' must be followed by 4 hexadecimal digits.
invalid_unicode_escape_u_started
An escape sequence starting with '\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.
Invalid URI syntax: '{0}'.
Learn more
invalid_use_of_covariant
The 'covariant' keyword can only be used for parameters in instance methods or before non-final instance fields.
Can't have modifier '{0}' in an extension.
Learn more
Uses of '{0}' should not be submitted to source control.
Learn more
invalid_use_of_identifier_augmented
The identifier 'augmented' can only be used to reference the augmented declaration inside an augmentation.
The member '{0}' can only be used within its package.
Learn more
An expression whose value is always 'null' can't be dereferenced.
Learn more
The member '{0}' can only be used within instance members of subclasses of '{1}'.
Learn more
The class '{0}' can't be extended outside of its library because it's a final class. The class '{0}' can't be extended outside of its library because it's an interface class. The class '{0}' can't be extended, implemented, or mixed in outside of its library because it's a sealed class. The class '{0}' can't be implemented outside of its library because it's a base class. The class '{0}' can't be implemented outside of its library because it's a final class. The class '{0}' can't be used as a mixin superclass constraint outside of its library because it's a final class. The mixin '{0}' can't be implemented outside of its library because it's a base mixin.
Learn more
The member '{0}' can only be used for overriding.
Learn more
invalid_use_of_visible_for_template_member
The member '{0}' can only be used within '{1}' or a template library.
The member '{0}' can only be used within '{1}' or a test.
Learn more
invalid_value
The value of '{0}' should be of type '{1}' but is of type '{2}'.
invalid_value_one_of
The value of '{0}' must be one of the following: '{1}'.
The member '{0}' is annotated with '{1}', but this annotation is only meaningful on declarations of public members.
Learn more
The annotation 'visibleForOverriding' can only be applied to a public instance member that can be overridden.
Learn more
The annotation 'visibleOutsideTemplate' can only be applied to a member of a class, enum, or mixin that is annotated with 'visibleForTemplate'.
Learn more
The '@Preview(...)' annotation can only be applied to public, statically accessible constructors and functions.
Learn more
'@Preview(...)' can only accept arguments that consist of literals and public symbols.
Learn more
invariant_booleans
toggle_on
The extension '{0}' doesn't define a 'call' method so the override can't be used in an invocation.
Learn more
'{0}' isn't a function.
Learn more
The expression doesn't evaluate to a function, so it can't be invoked.
Learn more
iterable_contains_unrelated_type
toggle_on
join_return_with_assignment
Assignment could be inlined in 'return' statement.
toggle_on
js_interop_extension_constructor_js_annotation_has_no_effect
The '@JS' annotation on an extension type constructor has no effect and is disallowed.
Can't reference label '{0}' declared in an outer method.
Learn more
Can't reference an undefined label '{0}'.
Learn more
Can't have a late final field in a class with a generative const constructor.
Learn more
The late final local variable is already assigned.
Learn more
late_pattern_variable_declaration
A pattern variable declaration may not use the late keyword.
leading_newlines_in_multiline_strings
Missing a newline at the beginning of a multiline string.
toggle_on
FFI leaf call can't return a 'Handle'.
Learn more
FFI leaf call can't take arguments of type 'Handle'.
Learn more
This annotation should be attached to a library directive.
toggle_on
Learn more
library_directive_not_first
The library directive must appear before all other directives.
The library name '{0}' isn't a lower_case_with_underscores identifier.
toggle_on
Learn more
The prefix '{0}' isn't a lower_case_with_underscores identifier.
toggle_on
Learn more
Invalid use of a private type in a public API.
toggle_on
Learn more
lines_longer_than80_chars
The line length exceeds the 80-character limit.
The element type '{0}' can't be assigned to the list type '{1}'.
Learn more
list_remove_unrelated_type
toggle_on
The Boolean expression has a constant value.
toggle_on
Learn more
literal_with_class
A {0} literal can't be prefixed by '{1}'.
literal_with_class_and_new
A {0} literal can't be prefixed by 'new {1}'.
literal_with_new
A literal can't be prefixed by 'new'.
local_function_declaration_modifier
Local function declarations can't specify any modifiers.
The type of the first positional parameter of the 'main' function must be a supertype of 'List'.
Learn more
The function 'main' can't have any required named parameters.
Learn more
The function 'main' can't have more than two required positional parameters.
Learn more
The declaration named 'main' must be a function.
Learn more
Map entries can only be used in a map literal.
Learn more
The element type '{0}' can't be assigned to the map key type '{1}'.
Learn more
The element type '{0}' can't be assigned to the map value type '{1}'.
Learn more
matching_super_parameters
The super parameter named '{0}' does not share the same name as the corresponding parameter in the super constructor, '{1}'.
toggle_on
member_with_class_name
A class member can't have the same name as the enclosing class.
migrate_design_widgets
The '{0}' library is deprecated.
toggle_on
The annotation doesn't match the declared type of the field.
Learn more
Fields of type '{0}' in a subclass of '{1}' must have an annotation indicating the native type.
Learn more
missing_assignable_selector
Missing selector such as '.identifier' or '[0]'.
missing_assignment_in_initializer
Expected an assignment after the field name.
missing_catch_or_finally
A try block must be followed by an 'on', 'catch', or 'finally' clause.
missing_closing_parenthesis
The closing parenthesis is missing.
missing_code_block_language_in_doc_comment
The code block is missing a specified language.
toggle_on
missing_const_final_var_or_type
Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
missing_const_in_list_literal
Seeing this message constitutes a bug. Please report it.
missing_const_in_map_literal
Seeing this message constitutes a bug. Please report it.
missing_const_in_set_literal
Seeing this message constitutes a bug. Please report it.
Required library '{0}' is missing.
Learn more
The parameter '{0}' can't have a value of 'null' because of its type, but the implicit default value is 'null'. With null safety, use the 'required' keyword, not the '@required' annotation.
Learn more
Missing a dependency on imported {0}.
Learn more
missing_digit
Decimal digit expected.
missing_enum_body
An enum definition must have a body with at least one constant name.
Missing case clause for '{0}'.
Learn more
The method {0} must have an exceptional return value (the second argument) when the return type of the function is neither 'void', 'Handle', nor 'Pointer'.
Learn more
missing_expression_in_initializer
Expected an expression after the assignment operator.
missing_expression_in_throw
Missing expression after 'throw'.
Fields in struct classes must have an explicitly declared type of 'int', 'double' or 'Pointer'.
Learn more
missing_function_body
A function body must be provided.
missing_function_keyword
Function types must have the keyword 'Function' before the parameter list.
missing_function_parameters
Functions must have an explicit list of parameters.
missing_get
Getters must have the keyword 'get' before the getter name.
missing_hex_digit
Hexadecimal digit expected.
missing_identifier
Expected an identifier.
missing_initializer
Expected an initializer.
missing_key
Missing the required key '{0}'.
missing_keyword_operator
Operator declarations must be preceded by the keyword 'operator'.
missing_method_parameters
Methods must have an explicit list of parameters.
The 'name' field is required but missing.
Learn more
missing_name_for_named_parameter
Named parameters in a function type must have a name
missing_name_in_library_directive
Library directives must include a library name.
missing_name_in_part_of_directive
Part-of directives must include a library name.
The getter name is not specified explicitly, and the pattern is not a variable.
Learn more
missing_one_of_multiple_keys
Exactly one of the following keys must be provided: {0}.
Missing a required override of '{0}' and '{1}'. Missing a required override of '{0}', '{1}', and {2} more. Missing a required override of '{0}'.
Learn more
missing_prefix_in_deferred_import
Deferred imports should have a prefix.
missing_primary_constructor
An extension type declaration must have a primary constructor declaration.
missing_primary_constructor_parameters
A primary constructor declaration must have formal parameters.
missing_quote
Expected quote (' or ").
The named parameter '{0}' is required, but there's no corresponding argument.
Learn more
The parameter '{0}' is required. The parameter '{0}' is required. {1}.
Learn more
This function has a return type of '{0}', but doesn't end with a return statement.
Learn more
Fields of type 'Array' must have exactly one 'Array' annotation.
Learn more
missing_star_after_sync
The modifier 'sync' must be followed by a star ('*').
missing_statement
Expected a statement.
missing_template_end
Missing the end brace for the template.
missing_terminator_for_parameter_group
There is no '{0}' to close the parameter group.
missing_token
Expected to find {0}.
missing_typedef_parameters
Typedefs must have an explicit list of parameters.
missing_uri
At least one URI must be provided.
missing_variable_in_for_each
A loop variable must be declared in a for-each loop before the 'in', but none was found.
Variable pattern '{0}' is missing in this branch of the logical-or pattern.
Learn more
Missing whitespace between adjacent strings.
toggle_on
Learn more
mixed_parameter_groups
Can't have both positional and named parameters in a single parameter list.
mixin_application_class_augmentation
A mixin application class can't be augmented.
The super-invoked member '{0}' has the type '{1}', and the concrete member in the class has the type '{2}'.
Learn more
The class doesn't have a concrete implementation of the super-invoked member '{0}'. The class doesn't have a concrete implementation of the super-invoked setter '{0}'.
Learn more
'{0}' can't be mixed onto '{1}' because '{1}' doesn't implement '{2}'.
Learn more
mixin_augmentation_has_on_clause
Mixin augmentations can't have 'on' clauses.
The class '{0}' can't be declared a mixin because it extends a class other than 'Object'.
Learn more
The class '{0}' can't be declared a mixin because it has a 'with' clause.
Learn more
The class '{0}' can't be used as a mixin because it declares a constructor.
Learn more
The mixin class '{0}' can't declare a non-trivial generative constructor.
Learn more
mixin_declares_constructor
Mixins can't declare constructors.
The class '{0}' can't be used as a mixin because it extends a class other than 'Object'.
Learn more
Mixins can't be instantiated.
Learn more
The mixin application class '{0}' can only have a single mixin.
Learn more
Classes can only mix in mixins and classes.
Learn more
The class '{0}' shouldn't be used as a mixin constraint because it is sealed, and any class mixing in this mixin must have '{0}' as a superclass.
Learn more
mixin_primary_constructor
Mixins can't have primary constructors.
Deferred classes can't be used as superclass constraints.
Learn more
Only classes and mixins can be used as superclass constraints.
Learn more
mixin_with_clause
A mixin can't have a with clause.
mixin_with_non_class_superclass
Mixin can only be applied to class.
modifier_out_of_order
The modifier '{0}' should be before the modifier '{1}'.
multiple_clauses
Each '{0}' definition can have at most one '{1}' clause.
At most one 'show' or 'hide' combinator can be used on an import or export directive. Using multiple 'hide' or 'show' combinators is never necessary and often produces surprising results.
Learn more
multiple_extends_clauses
Each class definition can have at most one extends clause.
multiple_implements_clauses
Each class or mixin definition can have at most one implements clause.
multiple_library_directives
Only one library directive may be declared in a file.
multiple_named_parameter_groups
Can't have multiple groups of named parameters in a single parameter list.
multiple_on_clauses
Each mixin definition can have at most one on clause.
multiple_part_of_directives
Only one part-of directive may be declared in a file.
multiple_plugins
Multiple plugins can't be enabled.
multiple_positional_parameter_groups
Can't have multiple groups of positional parameters in a single parameter list.
Only one primary constructor body declaration is allowed.
Learn more
Constructors can have only one 'this' redirection, at most.
Learn more
multiple_representation_fields
Each extension type should have exactly one representation field.
A constructor can have at most one 'super' initializer.
Learn more
multiple_variables_in_for_each
A single loop variable must be declared in a for-each loop before the 'in', but {0} were found.
multiple_variance_modifiers
Each type parameter can have at most one variance modifier.
multiple_with_clauses
Each class definition can have at most one with clause.
The type '{0}' given to '{1}' must be a valid 'dart:ffi' native function type.
Learn more
The type '{0}' must be a subtype of '{1}' for '{2}'.
Learn more
This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: {0}
Learn more
This method overrides a method annotated as '@mustCallSuper' in '{0}', but doesn't invoke the overridden method.
Learn more
The return type of the function passed to 'NativeCallable.listener' must be 'void' rather than '{0}'.
Learn more
The value of the 'name' field is required to be a string.
Learn more
named_function_expression
Function expressions can't be named.
named_function_type
Function types can't be named.
named_parameter_outside_group
Named parameters must be enclosed in curly braces ('{' and '}').
native_clause_in_non_sdk_code
Native clause can only be used in the SDK and code that is loaded through native extensions.
native_clause_should_be_annotation
Native clause in this form is deprecated.
'{0}' is an unsupported type for native fields. Native fields only support pointers, arrays or numeric and compound types.
Learn more
The native type of this field could not be inferred and must be specified in the annotation.
Learn more
Native fields must be static.
Learn more
native_function_body_in_non_sdk_code
Native functions can only be declared in the SDK and code that is loaded through native extensions.
The native type of this function couldn't be inferred so it must be specified in the annotation.
Learn more
The variable dimension of a variable-length array must be non-negative.
Learn more
new_constructor_dot_name
Constructors declared with the 'new' keyword can't use '.' before the constructor name.
new_constructor_new_name
Constructors declared with the 'new' keyword can't be named 'new'.
new_constructor_qualified_name
Constructors declared with the 'new' keyword can't have qualified names.
new_with_undefined_constructor
The class '{0}' doesn't have a constructor named '{1}'.
The class '{0}' doesn't have an unnamed constructor.
Learn more
Don't use adjacent strings in a list literal.
toggle_on
Learn more
Annotation creation must have arguments.
Learn more
Can't infer missing types in '{0}' from overridden methods: {1}.
Learn more
Invalid use of 'default' member in a switch.
toggle_on
Learn more
no_default_super_constructor
The superclass '{0}' doesn't have a zero argument constructor.
The value of the case clause ('{0}') is equal to the value of an earlier case clause ('{1}').
toggle_on
Learn more
no_dynamic_casts
Implicit cast from 'dynamic'.
toggle_on
The class '{0}' can't extend '{1}' because '{1}' only has factory constructors (no generative constructors), and '{0}' has at least one generative constructor.
Learn more
The library prefix '{0}' starts with an underscore.
toggle_on
Learn more
The local variable '{0}' starts with an underscore.
toggle_on
Learn more
no_literal_bool_comparisons
Unnecessary comparison to a boolean literal.
toggle_on
Don't put any logic in 'createState'.
toggle_on
Learn more
The generic type '{0}' should have explicit type arguments but doesn't.
toggle_on
Learn more
no_runtimetype_tostring
Using 'toString' on a 'Type' is not safe in production code.
toggle_on
no_self_assignments
The variable or property is being assigned to itself.
toggle_on
no_solo_tests
Don't commit soloed tests.
no_touchscreen_feature
The default "android.hardware.touchscreen" needs to be optional for Chrome OS.
no_trailing_spaces
Don't create string literals with trailing spaces in tests.
The referenced identifier is a wildcard.
toggle_on
Learn more
Missing concrete implementation of '{0}'. Missing concrete implementations of '{0}' and '{1}'. Missing concrete implementations of '{0}', '{1}', '{2}', '{3}', and {4} more. Missing concrete implementations of '{0}', '{1}', '{2}', and '{3}'. Missing concrete implementations of '{0}', '{1}', and '{2}'.
Learn more
Conditions must have a static type of 'bool'.
Learn more
The expression in an assert must be of type 'bool'.
Learn more
A negation operand must have a static type of 'bool'.
Learn more
The operands of the operator '{0}' must be assignable to 'bool'.
Learn more
Argument '{0}' must be a constant.
Learn more
This instance creation must be 'const', because '{0}' is marked as '@literal'.
Learn more
Generative enum constructors must be 'const'.
Learn more
non_const_map_as_expression_statement
A non-constant map or set literal without type arguments can't be used as an expression statement.
Annotation creation can only call a const constructor.
Learn more
Case expressions must be constant.
Learn more
Constant values from a deferred library can't be used as a case expression.
Learn more
The default value of an optional parameter must be constant.
Learn more
Constant values from a deferred library can't be used as a default parameter value.
Learn more
The variable name '{0}' isn't a lowerCamelCase identifier.
toggle_on
Learn more
The values in a const list literal must be constants.
Learn more
The elements in a const map literal must be constant.
Learn more
The keys in a const map literal must be constant.
Learn more
Key expressions in map patterns must be constants.
Learn more
The values in a const map literal must be constant.
Learn more
non_constant_record_field
The fields in a const record literal must be constants.
non_constant_record_field_from_deferred_library
Constant values from a deferred library can't be used as fields in a 'const' record literal.
The relational pattern expression must be a constant.
Learn more
The values in a const set literal must be constants.
Learn more
The type arguments to '{0}' must be known at compile time, so they can't be type parameters.
Learn more
non_constructor_factory
Only a constructor can be declared to be a factory.
An extension type parameter can't be used in a non-covariant position of its representation type.
Learn more
The enum '{0}' isn't exhaustively matched by the switch cases because some of the enum constants are private. The type '{0}' isn't exhaustively matched by the switch cases since it doesn't match the pattern '{1}'.
Learn more
The enum '{0}' isn't exhaustively matched by the switch cases because some of the enum constants are private. The type '{0}' isn't exhaustively matched by the switch cases since it doesn't match the pattern '{1}'.
Learn more
Enums can only declare final fields.
Learn more
The generative constructor '{0}' is expected, but a factory was found.
Learn more
The unnamed constructor of superclass '{0}' (called by the default constructor of '{1}') must be a generative constructor, but factory found.
Learn more
non_identifier_library_name
The name of a library must be an identifier.
Can't invoke 'asFunction' because the function signature '{0}' for the pointer isn't a valid C function signature.
Learn more
The parameter type of '==' operators should be non-nullable.
Learn more
non_part_of_directive_in_part
The part-of directive must be the only directive in a part.
Array dimensions must be positive numbers.
Learn more
Classes with primary constructors can't have non-redirecting generative constructors.
Learn more
non_resizable_activity
The <activity> element should be allowed to be resized to allow users to take advantage of the multi-window environment on Chrome OS
The type '{0}' isn't a valid type argument for '{1}'. The type argument must be a native integer, 'Float', 'Double', 'Pointer', or subtype of 'Struct', 'Union', or 'AbiSpecificInteger'.
Learn more
non_string_literal_as_uri
The URI must be a string literal.
Factory bodies can't use 'async', 'async*', or 'sync*'.
Learn more
The name '{0}' isn't a type, so it can't be used as a type argument.
Learn more
The name '{0}' isn't a type and can't be used in an on-catch clause.
Learn more
non_user_definable_operator
The operator '{0}' isn't user definable.
The return type of the operator []= must be 'void'.
Learn more
The return type of the setter must be 'void' or absent.
Learn more
noop_primitive_operations
The expression has no effect and can be removed.
toggle_on
normal_before_optional_parameters
Normal parameters must occur before optional parameters.
{0} isn't a type.
Learn more
The non-nullable local variable '{0}' must be assigned before it can be used.
Learn more
'{0}' isn't a binary operator.
Learn more
1 positional argument expected by '{0}', but 0 found. 1 positional argument expected, but 0 found. {0} positional arguments expected by '{1}', but {2} found. {0} positional arguments expected, but {1} found.
Learn more
Non-nullable instance field '{0}' must be initialized.
Learn more
The non-nullable variable '{0}' must be initialized.
Learn more
not_instantiated_bound
Type parameter bound types must be instantiated.
Spread elements in list or set literals must implement 'Iterable'.
Learn more
Spread elements in map literals must implement 'Map'.
Learn more
not_null_aware_null_spread
The Null-typed expression can't be used with a non-null-aware spread.
'{0}' shouldn't be called with a 'null' argument for the non-nullable type argument '{1}'.
Learn more
null_aware_cascade_out_of_order
The '?..' cascade operator must be first in the cascade sequence.
This null-check will always throw an exception because the expression will always evaluate to 'null'.
Learn more
The null check operator shouldn't be used on a variable whose type is a potentially nullable type parameter.
toggle_on
Learn more
null_closures
Closure can't be 'null' because it might be invoked.
toggle_on
A potentially nullable type can't be used in an 'on' clause because it isn't valid to throw a nullable expression.
Learn more
Nullable types can't be extended.
Learn more
Nullable types can't be implemented.
Learn more
Nullable types can't be used as a superclass constraint.
Learn more
Nullable types can't be mixed in.
Learn more
object_cannot_extend_another_class
The class 'Object' can't extend any other class.
Using a colon as the separator before a default value is no longer supported.
Learn more
omit_local_variable_types
Unnecessary type annotation on a local variable.
toggle_on
omit_obvious_local_variable_types
Omit the type annotation on a local variable when the type is obvious.
toggle_on
omit_obvious_property_types
The type annotation isn't needed because it is obvious.
toggle_on
The type '{0}' can be included in the superclass constraints only once.
Learn more
one_member_abstracts
Unnecessary use of an abstract class.
toggle_on
Don't throw instances of classes that don't extend either 'Exception' or 'Error'.
toggle_on
Learn more
Optional parameters aren't allowed when defining an operator.
Learn more
out_of_order_clauses
The '{0}' clause must come before the '{1}' clause.
Field overrides a field inherited from '{0}'.
toggle_on
Learn more
The field doesn't override an inherited getter or setter. The getter doesn't override an inherited getter. The method doesn't override an inherited method. The setter doesn't override an inherited setter.
Learn more
package_api_docs
Missing documentation for public API.
toggle_on
The package name '{0}' isn't a lower_case_with_underscores identifier.
toggle_on
Learn more
The library name is not a dot-separated path prefixed by the package name.
toggle_on
Learn more
Structs must have at most one 'Packed' annotation.
Learn more
Only packing to 1, 2, 4, 8, and 16 bytes is supported.
Learn more
Invalid assignment to the parameter '{0}'.
toggle_on
Learn more
Expected this library to be part of '{0}', not '{1}'.
Learn more
part_of_name
The 'part of' directive can't use a name with the enhanced-parts feature.
The included part '{0}' must have a part-of directive.
Learn more
The library is unnamed. A URI is expected, not a library name '{0}', in the part-of directive.
Learn more
The path '{0}' doesn't exist.
Learn more
The path '{0}' isn't a POSIX-style path.
Learn more
The directory '{0}' doesn't contain a pubspec.
Learn more
pattern_assignment_declares_variable
Variable '{0}' can't be declared in a pattern assignment.
Only local variables can be assigned in pattern assignments.
Learn more
Constant values from a deferred library can't be used in patterns.
Learn more
The matched value type '{0}' can never match the required type '{1}'.
Learn more
The matched value of type '{0}' isn't assignable to the required type '{1}'.
Learn more
Pattern variables can't be assigned inside the guard of the enclosing guarded pattern.
Learn more
pattern_variable_declaration_outside_function_or_method
A pattern variable declaration may not appear outside a function or method.
permission_implies_unsupported_hardware
Permission makes app incompatible for Chrome OS, consider adding optional {0} feature tag,
Keys in the platforms field can't have values.
Learn more
Plugins can only be specified in the root of a pub workspace or the root of a package that isn't in a workspace.
Learn more
positional_after_named_argument
Positional arguments must occur before named arguments.
Object patterns can only use named fields.
Learn more
positional_parameter_outside_group
Positional parameters must be enclosed in square brackets ('[' and ']').
Positional super parameters can't be used when the super constructor invocation has a positional argument.
Learn more
String literals shouldn't be concatenated by the '+' operator.
toggle_on
Learn more
Assert should be in the initializer list.
toggle_on
Learn more
Missing a message in an assert.
toggle_on
Learn more
prefer_bool_in_asserts
toggle_on
Unnecessary constructor invocation.
toggle_on
Learn more
The 'if' statement could be replaced by a null-aware assignment.
toggle_on
Learn more
Use 'const' with the constructor to improve performance.
toggle_on
Learn more
Constructors in '@immutable' classes should be declared as 'const'.
toggle_on
Learn more
Use 'const' for final variables initialized to a constant value.
toggle_on
Learn more
Use 'const' literals as arguments to constructors of '@immutable' classes.
toggle_on
Learn more
Static method should be a constructor.
toggle_on
Learn more
Always 'false' because 'indexOf' is always greater than or equal to -1. Always 'true' because 'indexOf' is always greater than or equal to -1. Unnecessary use of 'indexOf' to test for containment.
toggle_on
Learn more
Unnecessary use of single quotes.
toggle_on
Learn more
prefer_equal_for_default_values
toggle_on
Unnecessary use of a block function body.
toggle_on
Learn more
The private field {0} could be 'final'.
toggle_on
Learn more
The pattern should be final. The variable '{0}' should be final.
toggle_on
Learn more
Local variables should be final.
toggle_on
Learn more
The parameter '{0}' should be final.
toggle_on
Learn more
Use 'for' elements when building maps from iterables.
toggle_on
Learn more
Use 'forEach' and a tear-off rather than a 'for' loop to apply a function to every element.
toggle_on
Learn more
Use a function declaration rather than a variable assignment to bind a function to a name.
toggle_on
Learn more
Use the generic function type syntax in 'typedef's.
toggle_on
Learn more
Use an 'if' element to conditionally add elements.
toggle_on
Learn more
Use the '??' operator rather than '?:' when testing for 'null'.
toggle_on
Learn more
Use an initializing formal to assign a parameter to a field.
toggle_on
Learn more
The addition of a list item could be inlined. The addition of multiple list items could be inlined.
toggle_on
Learn more
Unnecessary use of a 'double' literal.
toggle_on
Learn more
Use interpolation to compose strings and values.
toggle_on
Learn more
The comparison is always 'false' because the length is always greater than or equal to 0. The comparison is always 'true' because the length is always greater than or equal to 0. Use 'isEmpty' instead of 'length' to test whether the collection is empty. Use 'isNotEmpty' instead of 'length' to test whether the collection is empty.
toggle_on
Learn more
Use 'isNotEmpty' rather than negating the result of 'isEmpty'.
toggle_on
Learn more
Use the 'is!' operator rather than negating the value of the 'is' operator.
toggle_on
Learn more
Use 'whereType' to select elements of a given type.
toggle_on
Learn more
prefer_mixin
Only mixins should be mixed in.
toggle_on
prefer_null_aware_method_calls
Use a null-aware invocation of the 'call' method rather than explicitly testing for 'null'.
toggle_on
Use the null-aware operator '?.' rather than an explicit 'null' comparison.
toggle_on
Learn more
Use relative imports for files in the 'lib' directory.
toggle_on
Learn more
Unnecessary use of double quotes.
toggle_on
Learn more
The addition of multiple elements could be inlined.
toggle_on
Learn more
An uninitialized field should have an explicit type annotation. An uninitialized variable should have an explicit type annotation.
toggle_on
Learn more
Unnecessary use of the type 'Null'.
toggle_on
Learn more
prefix_after_combinator
The prefix ('as' clause) should come before any show/hide combinators.
The name '{0}' is already used as an import prefix and can't be used to name a top-level element.
Learn more
The name '{0}' refers to an import prefix, so it must be followed by '.'.
Learn more
The prefix '{0}' can't be used here because it's shadowed by a local declaration.
Learn more
primary_constructor_body_with_expression_body
A primary constructor body can't use '=>'.
primary_constructor_body_with_modifier
A primary constructor body can't have the modifier '{0}'.
A primary constructor body requires a primary constructor declaration.
Learn more
A primary constructor can't be a redirecting constructor.
Learn more
The private name '{0}', defined by '{1}', conflicts with the same name defined by '{2}'.
Learn more
Named parameters that don't refer to instance variables can't start with underscore.
Learn more
The corresponding public name '{0}' is already the name of another parameter.
Learn more
A private named parameter must be a public identifier after removing the leading underscore.
Learn more
Named parameters can't start with an underscore.
Learn more
The setter '{0}' is private and can't be accessed outside the library that declares it.
Learn more
Missing a deprecation message.
toggle_on
Learn more
Missing documentation for a public member.
toggle_on
Learn more
The final variable '{0}' can't be read because it's potentially unassigned at this point.
Learn more
receiver_of_type_never
The receiver is of type 'Never', and will never complete with a value.
A record literal with exactly one positional field requires a trailing comma.
Learn more
A record type with exactly one positional field requires a trailing comma.
Learn more
The compile-time constant expression depends on itself.
Learn more
recursive_constant_constructor
The constant constructor depends on itself.
Constructors can't redirect to themselves either directly or indirectly.
Learn more
The getter '{0}' recursively returns itself.
toggle_on
Learn more
The URI '{0}' included in '{1}' includes '{1}', creating a circular reference.
Learn more
'{0}' can't be a superinterface of itself: {1}. '{0}' can't extend itself. '{0}' can't implement itself. '{0}' can't use itself as a mixin. '{0}' can't use itself as a superclass constraint.
Learn more
The {0} doesn't redeclare a {0} declared in a superinterface.
Learn more
The constructor '{0}' couldn't be found in '{1}'.
Learn more
Generative constructors can't redirect to a factory constructor.
Learn more
The redirecting constructor '{0}' can't redirect to a constructor of the abstract class '{1}'.
Learn more
The redirected constructor '{0}' has incompatible parameters with '{1}'.
Learn more
The return type '{0}' of the redirected constructor isn't a subtype of '{1}'.
Learn more
The constructor '{0}' couldn't be found in '{1}'.
Learn more
The name '{0}' isn't a type and can't be used in a redirected constructor.
Learn more
A constant redirecting constructor can't redirect to a non-constant constructor.
Learn more
A redirecting constructor can't redirect to a type alias that expands to a type parameter.
Learn more
redirecting_constructor_with_body
Redirecting constructors can't have a body.
redirection_in_non_factory_constructor
Only factory constructor can specify '=' redirection.
Local variable '{0}' can't be referenced before it is declared.
Learn more
Refutable patterns can't be used in an irrefutable context.
Learn more
The constant expression type '{0}' is not assignable to the parameter type '{1}' of the '{2}' operator.
Learn more
The return type of operators used in relational patterns must be assignable to 'bool'.
Learn more
Remove deprecated elements in breaking versions.
toggle_on
Learn more
'{0}' was removed in Dart '{1}'
Learn more
'{0}' was removed in Dart '{1}'
Learn more
replaced_lint
'{0}' was replaced by '{1}' in Dart '{2}'.
replaced_lint_use
'{0}' was replaced by '{1}' in Dart '{2}'.
representation_field_modifier
Representation fields can't have the modifier 'var'.
representation_field_trailing_comma
The representation field can't have a trailing comma.
require_trailing_commas
Missing a required trailing comma.
toggle_on
A map pattern can't contain a rest pattern.
Learn more
A rethrow must be inside of a catch clause.
Learn more
Constructors can't return values.
Learn more
Can't return a value from a generator function that uses the 'async*' or 'sync*' modifier.
Learn more
'{0}' is annotated with 'doNotStore' and shouldn't be returned unless '{1}' is also annotated.
Learn more
A value of type '{0}' can't be returned from the constructor '{1}' because it has a return type of '{2}'. A value of type '{0}' can't be returned from the function '{1}' because it has a return type of '{2}'. A value of type '{0}' can't be returned from the method '{1}' because it has a return type of '{2}'.
Learn more
The returned type '{0}' isn't returnable from a '{1}' function, as required by the closure's context.
Learn more
The return value is missing after 'return'.
Learn more
The use of an as expression in a constant expression wasn't supported until version 2.3.2, but this code is required to be able to run on earlier versions.
Learn more
The class '{0}' wasn't exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.
Learn more
The use of the operator '{0}' for 'bool' operands in a constant context wasn't supported until version 2.3.2, but this code is required to be able to run on earlier versions.
Learn more
Tearing off a constructor requires the 'constructor-tearoffs' language feature.
Learn more
Using the operator '==' for non-primitive types wasn't supported until version 2.3.2, but this code is required to be able to run on earlier versions.
Learn more
Extension methods weren't supported until version 2.6.0, but this code is required to be able to run on earlier versions.
Learn more
The operator '>>>' wasn't supported until version 2.14.0, but this code is required to be able to run on earlier versions.
Learn more
The use of an is expression in a constant context wasn't supported until version 2.3.2, but this code is required to be able to run on earlier versions.
Learn more
The type 'Never' wasn't supported until version 2.12.0, but this code is required to be able to run on earlier versions.
Learn more
Set literals weren't supported until version 2.2, but this code is required to be able to run on earlier versions.
Learn more
sdk_version_since
This API is available since SDK {0}, but constraints '{1}' don't guarantee it.
The for, if, and spread elements weren't supported until version 2.3.0, but this code is required to be able to run on earlier versions.
Learn more
The if and spread elements weren't supported in constant expressions until version 2.5.0, but this code is required to be able to run on earlier versions.
Learn more
sealed_enum
Enums can't be declared to be 'sealed'.
sealed_mixin
A mixin can't be declared 'sealed'.
sealed_mixin_class
A mixin class can't be declared 'sealed'.
The '{0}' protocol shouldn't be used because it isn't secure.
toggle_on
Learn more
The element type '{0}' can't be assigned to the set type '{1}'.
Learn more
setter_constructor
Constructors can't be a setter.
setter_in_function
Setters can't be defined within methods or functions.
setting_orientation_on_activity
The <activity> element should not be locked to any orientation so that users can take advantage of the multi-window environments and larger screens on Chrome OS
The prefix of a deferred import can't be used in other import directives.
Learn more
Use simple directive paths.
toggle_on
Learn more
The {0} identification '{1}:' is redundant and can be removed.
toggle_on
Learn more
'Array's must have an 'Array' annotation that matches the dimensions.
Learn more
Use a 'SizedBox' to add whitespace to a layout.
toggle_on
Learn more
Use 'SizedBox.{0}' to avoid needing to specify the 'height' and 'width'.
toggle_on
Learn more
Use the end-of-line form ('///') for doc comments.
toggle_on
Learn more
The '{0}' argument should be last in widget constructor invocations.
toggle_on
Learn more
Constructor declarations should be before non-constructor declarations.
toggle_on
Learn more
Dependencies not sorted alphabetically.
toggle_on
Learn more
Invalid location for the unnamed constructor.
toggle_on
Learn more
specify_nonobvious_local_variable_types
Specify the type of a local variable when the type is non-obvious.
toggle_on
specify_nonobvious_property_types
A type annotation is needed because it isn't obvious.
toggle_on
spread_expression_from_deferred_library
Constant values from a deferred library can't be spread into a const literal.
stack_overflow
The file has too many nested expressions or statements.
Instance member '{0}' can't be accessed using static access.
Learn more
static_constructor
Constructors can't be static.
static_getter_without_body
A 'static' getter must have a body.
static_operator
Operators can't be static.
static_setter_without_body
A 'static' setter must have a body.
strict_raw_type
The generic type '{0}' should have explicit type arguments but doesn't.
strict_top_level_inference
Missing type annotation.
toggle_on
The mixin '{0}' must be 'base' because the supertype '{1}' is 'base'. The mixin '{0}' must be 'base' because the supertype '{1}' is 'final'. The type '{0}' must be 'base', 'final' or 'sealed' because the supertype '{1}' is 'base'. The type '{0}' must be 'base', 'final' or 'sealed' because the supertype '{1}' is 'final'.
Learn more
Classes and mixins can't implement deferred classes. Classes can't extend deferred classes. Classes can't mixin deferred classes.
Learn more
'{0}' can't be used as a superclass constraint. Classes and mixins can't implement '{0}'. Classes can't extend '{0}'. Classes can't mixin '{0}'.
Learn more
The class '{0}' can't extend '{1}'. The class '{0}' can't implement '{1}'. The class '{0}' can't mix in '{1}'.
Learn more
The class '{0}' shouldn't be extended, mixed in, or implemented because it's sealed.
Learn more
The class '{0}' can't extend '{1}' because '{1}' is a subtype of 'Struct', 'Union', or 'AbiSpecificInteger'. The class '{0}' can't implement '{1}' because '{1}' is a subtype of 'Struct', 'Union', or 'AbiSpecificInteger'. The class '{0}' can't mix in '{1}' because '{1}' is a subtype of 'Struct', 'Union', or 'AbiSpecificInteger'.
Learn more
The type '{0}' of this parameter isn't a subtype of the type '{1}' of the associated super constructor parameter.
Learn more
No associated named super constructor parameter.
Learn more
No associated positional super constructor parameter.
Learn more
super_goes_last
toggle_on
The enum constructor can't have a 'super' initializer.
Learn more
The 'super' keyword can't be used in an extension because an extension doesn't have a superclass.
Learn more
The 'super' keyword can't be used in an extension type because an extension type doesn't have a superclass.
Learn more
Invalid context for 'super' invocation.
Learn more
The redirecting constructor can't have a 'super' initializer.
Learn more
super_initializer_in_object
The class 'Object' can't invoke a constructor from a superclass.
super_initializing_declaring_parameter
Declaring parameters can't be super parameters.
The superconstructor call must be last in an initializer list.
Learn more
A type alias that expands to a type parameter can't be implemented. A type alias that expands to a type parameter can't be mixed in. A type alias that expands to a type parameter can't be used as a superclass constraint. A type alias that expands to a type parameter can't be used as a superclass.
Learn more
The 'case' shouldn't complete normally.
Learn more
Type '{0}' of the switch expression isn't assignable to the type '{1}' of case expressions.
Learn more
switch_has_case_after_default_case
The default case should be the last case in a switch statement.
switch_has_multiple_default_cases
The 'default' case can only be declared once.
Avoid switch statements on a 'Type'.
toggle_on
Learn more
A generative constructor of an abstract class can't be torn off.
Learn more
tearoff_with_must_be_const_parameter
The function '{0}' has a parameter marked as '@mustBeConst' and can't be torn off.
Missing type test for '{0}' in '=='.
toggle_on
Learn more
The Unicode code point 'U+{0}' changes the appearance of text from how it's interpreted by the compiler.
Learn more
The Unicode code point 'U+{0}' changes the appearance of text from how it's interpreted by the compiler.
Learn more
Use of '{0}' in a 'finally' block.
toggle_on
Learn more
The type '{0}' of the thrown expression must be assignable to 'Object'.
Learn more
Use a type annotation rather than 'assert' to enforce non-nullability.
toggle_on
Learn more
todo
{0}
The type of '{0}' can't be inferred because it depends on itself through the cycle: {1}.
Learn more
top_level_operator
Operators must be declared within a class.
Typedefs can't reference themselves directly or recursively via another typedef.
Learn more
Missing type annotation on a public API.
toggle_on
Learn more
The deferred type '{0}' can't be used in a declaration, cast, or type test.
Learn more
'{0}' doesn't conform to the bound '{1}' of the type parameter '{2}'.
Learn more
type_arguments_on_type_variable
Can't use type arguments with type variable '{0}'.
type_before_factory
Factory constructors cannot have a return type.
Tests for non-null should be done with '!= null'. Tests for null should be done with '== null'.
Learn more
Don't needlessly type annotate initializing formals.
toggle_on
Learn more
Use 'TypeName _' instead of a type literal.
toggle_on
Learn more
type_parameter_on_constructor
Constructors can't have type parameters.
type_parameter_on_operator
Types parameters aren't allowed when defining an operator.
Static members can't reference type parameters of the class.
Learn more
'{0}' can't be a supertype of its upper bound.
Learn more
The name '{0}' isn't a type and can't be used in an 'is' expression.
Learn more
The name '{0}' isn't defined, so it can't be used in an 'is' expression.
Learn more
typedef_augmentation
Type aliases can't be augmented.
typedef_in_class
Typedefs can't be declared inside classes.
unable_get_content
Unable to get content of '{0}'.
Missing an 'await' for the 'Future' computed by this expression. Missing an 'await' for the 'FutureOr' computed by this expression.
toggle_on
Learn more
Returning a 'Future' without 'await' inside a try block.
Learn more
A nullable expression can't be used as a condition. A nullable expression can't be used as an iterator in a for-in loop. A nullable expression can't be used in a spread. A nullable expression can't be used in a yield-each statement. The function can't be unconditionally instantiated because it can be 'null'. The function can't be unconditionally invoked because it can be 'null'. The method '{0}' can't be unconditionally invoked because the receiver can be 'null'. The operator '{0}' can't be unconditionally invoked because the receiver can be 'null'. The property '{0}' can't be unconditionally accessed because the receiver can be 'null'.
Learn more
Undefined name '{0}' used as an annotation.
Learn more
Undefined class '{0}'.
Learn more
The class '{0}' doesn't have a constructor named '{1}'. The class '{0}' doesn't have an unnamed constructor.
Learn more
There's no constant named '{0}' in '{1}'.
Learn more
The enum doesn't have a constructor named '{0}'. The enum doesn't have an unnamed constructor.
Learn more
The getter '{0}' isn't defined for the extension '{1}'.
Learn more
The extension '{0}' doesn't have an instance member named '{1}'. The member '{0}' is declared in '{1}', but private names are visible only in their own library. There's a setter '{0}' in the extension '{1}', but no getter.
Learn more
The extension '{0}' doesn't have an instance setter named '{1}'. The member '{0}' is declared in '{1}', but private names are visible only in their own library. The {0} '{1}' in the extension '{2}' can't be assigned to. There's a getter '{0}' in the extension '{1}', but no setter.
Learn more
The method '{0}' isn't defined for the extension '{1}'.
Learn more
The operator '{0}' isn't defined for the extension '{1}'.
Learn more
The setter '{0}' isn't defined for the extension '{1}'.
Learn more
The function '{0}' isn't defined.
Learn more
The getter '{0}' isn't defined for the '{1}' function type. The getter '{0}' isn't defined for the type '{1}'.
Learn more
The library '{0}' doesn't export a member with the hidden name '{1}'.
Learn more
Undefined name '{0}'.
Learn more
Undefined name 'await' in function body not marked with 'async'.
Learn more
The member '{0}' is declared in '{1}', but private names are visible only in their own library. The member '{0}' isn't defined for the type '{1}'. There's a setter '{0}' for the type '{1}', but no getter.
Learn more
The field '{0}' of the type '{1}' is final, so it can't be assigned to. The member '{0}' is declared in '{1}', but private names are visible only in their own library. The setter '{0}' isn't defined for the type '{1}'. The {0} '{1}' of the type '{2}' can't be assigned to. There's a getter '{0}' for the type '{1}', but no setter.
Learn more
'{0}' isn't a recognized lint rule.
Learn more
The method '{0}' isn't defined for the '{1}' function type. The method '{0}' isn't defined for the type '{1}'.
Learn more
The named parameter '_{0}' should use the corresponding public name '{0}' at the callsite. The named parameter '{0}' isn't defined.
Learn more
The operator '{0}' isn't defined for the type '{1}'.
Learn more
The name '{0}' is being referenced through the prefix '{1}', but it isn't defined in any of the libraries imported using that prefix.
Learn more
The name '{0}' is declared in '{1}', but private names are visible only in their own library. The name '{0}' isn't defined in the libraries imported with the prefix '{1}'. There's a setter '{0}' in the libraries imported with the prefix '{1}', but no getter.
Learn more
The constant '{0}' imported with the prefix '{1}' can't be assigned to. The name '{0}' is declared in '{1}', but private names are visible only in their own library. The setter '{0}' isn't defined in the libraries imported with the prefix '{1}'. The variable '{0}' imported with the prefix '{1}' is final, so it can't be assigned to. The {0} '{1}' imported with the prefix '{2}' can't be assigned to. There's a getter '{0}' in the libraries imported with the prefix '{1}', but no setter.
Learn more
The parameter '{0}' isn't defined by '{1}'.
Learn more
The setter '{0}' isn't defined for the '{1}' function type. The setter '{0}' isn't defined for the type '{1}'.
Learn more
The library '{0}' doesn't export a member with the shown name '{1}'.
Learn more
The context type '{0}' doesn't have a {1} named '{2}'. The context type '{0}' doesn't have static members or constructors. The context type '{0}' is declared in '{1}', but private names are visible only in their own library. The function type '{0}' doesn't have a static member named '{1}'. The member '{0}' is declared in '{1}', but private names are visible only in their own library. The {0} '{1}' doesn't have a {2} named '{3}'. There's a static setter '{0}' in the {1} '{2}', but no getter.
Learn more
The constant '{0}' in the {1} '{2}' can't be assigned to. The function type '{0}' doesn't have a static setter named '{1}'. The member '{0}' is declared in '{1}', but private names are visible only in their own library. The static field '{0}' in the {1} '{2}' is final, so it can't be assigned to. The {0} '{1}' doesn't have a static setter named '{2}'. The {0} '{1}' in the {2} '{3}' can't be assigned to. There's a static getter '{0}' in the {1} '{2}', but no setter.
Learn more
The getter '{0}' isn't defined in a superclass of '{1}'. The method '{0}' isn't defined in a superclass of '{1}'. The setter '{0}' isn't defined in a superclass of '{1}'.
Learn more
The member '{0}' is declared in '{1}', but private names are visible only in their own library. The member '{0}' isn't defined in a superclass of '{1}'. There's a setter '{0}' in a superclass of '{1}', but no getter.
Learn more
The field '{0}' in a superclass of '{1}' is final, so it can't be assigned to. The member '{0}' is declared in '{1}', but private names are visible only in their own library. The setter '{0}' isn't defined in a superclass of '{1}'. The {0} '{1}' in a superclass of '{2}' can't be assigned to. There's a getter '{0}' in a superclass of '{1}', but no setter.
Learn more
The operator '{0}' isn't defined in a superclass of '{1}'.
Learn more
There's a setter '{0}', but no getter. Undefined name '{0}' used as an annotation. Undefined name '{0}'.
Learn more
'{0}' is final, so it can't be assigned to. The constant '{0}' can't be assigned to. The {0} '{1}' can't be assigned to. There's a getter '{0}', but no setter. Undefined name '{0}'.
Learn more
undefined_variable
The variable '{0}' isn't defined.
undone
{0}
unexpected_dollar_in_string
A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}).
unexpected_separator_in_number
Digit separators ('_') in a number literal can only be placed between two digits.
unexpected_terminator_for_parameter_group
There is no '{0}' to open a parameter group.
unexpected_token
Unexpected text '{0}'.
unexpected_tokens
Unexpected tokens.
unexpected_transform_set_token
Didn't expect to find {0}.
unignorable_ignore
The diagnostic '{0}' can't be ignored.
Angle brackets will be interpreted as HTML.
toggle_on
Learn more
unknown_accessor
The accessor '{0}' is invalid.
The platform '{0}' is not a recognized platform.
Learn more
Don't make a function 'async' if it doesn't use 'await'.
toggle_on
Learn more
Unnecessary 'await'.
toggle_on
Learn more
Unnecessary braces in a string interpolation.
toggle_on
Learn more
Unnecessary 'break' statement.
toggle_on
Learn more
Unnecessary cast.
Learn more
Unnecessary cast pattern.
Learn more
Unnecessary 'const' keyword.
toggle_on
Learn more
Unnecessary 'const' keyword in an enum constructor.
toggle_on
Learn more
Unnecessary '.new' constructor name.
toggle_on
Learn more
The dev dependency on {0} is unnecessary because there is also a normal dependency on that package.
Learn more
Local variables should not be marked as 'final'. The keyword 'final' isn't necessary because the parameter is implicitly 'final'.
toggle_on
Learn more
Unnecessary use of getter and setter to wrap a field.
toggle_on
Learn more
The diagnostic '{0}' isn't produced at this location so it doesn't need to be ignored. The diagnostic '{0}' isn't produced in this file so it doesn't need to be ignored.
toggle_on
Learn more
The import of '{0}' is unnecessary because all of the used elements are also provided by the import of '{1}'.
Learn more
Closure should be a tearoff.
toggle_on
Learn more
Unnecessary 'late' modifier.
toggle_on
Learn more
Library directives without comments or annotations should be avoided.
toggle_on
Learn more
Library names are not necessary.
toggle_on
Learn more
A double can't equal 'double.nan', so the condition is always 'false'. A double can't equal 'double.nan', so the condition is always 'true'.
Learn more
Unnecessary 'new' keyword.
toggle_on
Learn more
Unnecessary 'noSuchMethod' declaration.
Learn more
The '!' will have no effect because the receiver can't be null.
Learn more
The null-assert pattern will have no effect because the matched type isn't nullable.
Learn more
Unnecessary assignment of 'null'.
toggle_on
Learn more
Unnecessary use of a null-aware operator to invoke an extension method on a nullable type.
toggle_on
Learn more
The null-check pattern will have no effect because the matched type isn't nullable.
Learn more
Unnecessary use of a null check ('!').
toggle_on
Learn more
The operand can't be 'null', so the condition is always 'false'. The operand can't be 'null', so the condition is always 'true'. The operand must be 'null', so the condition is always 'false'. The operand must be 'null', so the condition is always 'true'.
Learn more
Unnecessary use of '??' with 'null'.
toggle_on
Learn more
Type could be non-nullable.
toggle_on
Learn more
Unnecessary override.
toggle_on
Learn more
Unnecessary use of parentheses.
toggle_on
Learn more
Unnecessary primary constructor body.
toggle_on
Learn more
The '?' is unnecessary because '{0}' is nullable without it.
Learn more
Unnecessary use of a raw string.
toggle_on
Learn more
Braces unnecessarily wrap this expression in a set literal.
Learn more
Unnecessary statement.
toggle_on
Learn more
Unnecessary escape in string literal.
toggle_on
Learn more
Unnecessary use of string interpolation.
toggle_on
Learn more
Unnecessary 'this.' qualifier.
toggle_on
Learn more
Unnecessary 'this' alias.
toggle_on
Learn more
Unnecessary use of 'toList' in a spread.
toggle_on
Learn more
Unnecessary type check; the result is always 'false'. Unnecessary type check; the result is always 'true'.
Learn more
Unnecessary type name in a constructor.
toggle_on
Learn more
Unnecessary use of 'unawaited'.
toggle_on
Learn more
Unnecessary use of multiple underscores.
toggle_on
Learn more
Unnecessary wildcard pattern.
Learn more
Static members from supertypes must be qualified by the name of the defining type.
Learn more
Static members from the extended type or one of its superclasses must be qualified by the name of the defining type.
Learn more
Unreachable member '{0}' in an executable library.
toggle_on
Learn more
This case is covered by the previous cases.
Learn more
This default clause is covered by the previous cases.
Learn more
'{0}' isn't a recognized diagnostic code.
Learn more
The type of the operand ('{0}') isn't a subtype or a supertype of the value being matched ('{1}'). The type of the right operand ('{0}') isn't a subtype or a supertype of the left operand ('{1}').
toggle_on
Learn more
unsafe_html
Assigning to the attribute '{0}' is unsafe. Invoking the constructor '{0}' is unsafe. Invoking the method '{0}' is unsafe.
toggle_on
This type is unsafe: a type parameter occurs in a non-covariant position.
toggle_on
Learn more
unsupported_chrome_os_feature
The feature {0} isn't supported on Chrome OS, consider making it optional.
unsupported_chrome_os_hardware
The feature {0} isn't supported on Chrome OS, consider making it optional.
unsupported_key
The key '{0}' isn't supported.
unsupported_operator
The '{0}' operator is not supported.
The option '{0}' isn't supported by '{1}'.
Learn more
unsupported_static
The key 'static' is only supported for elements in a class, enum, extension, or mixin.
The value '{0}' isn't supported by '{1}'.
Learn more
unsupported_version
Only version '1' is supported at this time.
unterminated_multi_line_comment
Unterminated multi-line comment.
unterminated_string_literal
Unterminated string literal.
The exception variable '{0}' isn't used, so the 'catch' clause can be removed.
Learn more
The stack trace variable '{0}' isn't used and can be removed.
Learn more
The declaration '{0}' isn't referenced.
Learn more
A value for optional parameter '{0}' isn't ever given.
Learn more
The value of the field '{0}' isn't used.
Learn more
The value of the field '{0}' isn't used.
Learn more
Unused import: '{0}'.
Learn more
The label '{0}' isn't used.
Learn more
The value of the local variable '{0}' isn't used.
Learn more
'{0}' should be used. {1}. The value of '{0}' should be used.
Learn more
The name {0} is shown, but isn't used.
Learn more
Target of URI doesn't exist: '{0}'.
Learn more
Target of URI doesn't exist: '{0}'.
Learn more
Target of URI hasn't been generated: '{0}'.
Learn more
URIs can't use string interpolation.
Learn more
Don't use 'BuildContext's across async gaps, guarded by an unrelated 'mounted' check. Don't use 'BuildContext's across async gaps.
toggle_on
Learn more
Use a 'ColoredBox' rather than a 'Container' with only a 'Color'.
toggle_on
Learn more
Use a declaring parameter.
toggle_on
Learn more
Use 'DecoratedBox' rather than a 'Container' with only a 'Decoration'.
toggle_on
Learn more
use_enums
Class should be an enum.
toggle_on
Instances of 'Color' should be created using an 8-digit hexadecimal integer (such as '0xFFFFFFFF').
toggle_on
Learn more
Use the generic function type syntax to declare the parameter '{0}'.
toggle_on
Learn more
Use an if-null operator to convert a 'null' to a 'bool'.
toggle_on
Learn more
Use '{0}' rather than '% 2'.
toggle_on
Learn more
Constructors for public widgets should have a named 'key' parameter.
toggle_on
Learn more
Use 'late' for private members with a non-nullable type.
toggle_on
Learn more
Use the constant '{0}' rather than a constructor returning the same object.
toggle_on
Learn more
Use the null-aware marker '?' rather than a null check via an 'if'.
toggle_on
Learn more
Dart native extensions are deprecated and aren't available in Dart 2.15.
Learn more
This expression has a type of 'void' so its value can't be used.
Learn more
use_primary_constructors
Use a primary constructor.
Use a raw string to avoid using escapes.
toggle_on
Learn more
Use 'rethrow' to rethrow a caught exception.
toggle_on
Learn more
The method is used to change a property.
toggle_on
Learn more
Use a string buffer rather than '+' to compose strings.
toggle_on
Learn more
The part-of directive uses a library name.
toggle_on
Learn more
Parameter '{0}' could be a super parameter. Parameters '{0}' could be super parameters.
toggle_on
Learn more
use_test_throws_matchers
Use the 'throwsA' matcher instead of using 'fail' when there is no exception thrown.
toggle_on
use_to_and_as_if_applicable
Start the name of the method with 'to' or 'as'.
toggle_on
Use truncating division.
toggle_on
Learn more
Invalid regular expression syntax.
toggle_on
Learn more
A member named 'values' can't be declared in an enum.
Learn more
var_and_type
Variables can't be declared using both 'var' and a type name.
var_as_type_name
The keyword 'var' can't be used as a type name.
var_class
Classes can't be declared to be 'var'.
var_enum
Enums can't be declared to be 'var'.
var_return_type
The return type can't be 'var'.
var_typedef
Typedefs can't be declared to be 'var'.
Avoid declaring parameters with var and no type annotation.
toggle_on
Learn more
Variable length 'Array's must only occur as the last field of Structs.
Learn more
Variable patterns in declaration context can't specify 'var' or 'final' keyword.
Learn more
A value of type '{0}' can't be assigned to a const variable of type '{1}'.
Learn more
visit_registered_nodes
Declare 'visit' methods for all registered node types.
Assignment to a variable of type 'void'.
toggle_on
Learn more
void_with_type_arguments
Type 'void' can't have type arguments.
with_before_extends
The extends clause must be before the with clause.
The value of the 'workspace' field is required to be a list of relative file paths.
Learn more
Workspace entries are required to be directory paths (strings).
Learn more
Workspace values must be a relative path of a subdirectory of '{0}'.
Learn more
wrong_explicit_type_parameter_variance_in_superinterface
'{0}' is an '{1}' type parameter and can't be used in an '{2}' position in '{3}'.
Operator '-' should declare 0 or 1 parameter, but {0} found. Operator '{0}' should declare exactly {1} parameters, but {2} found.
Learn more
Setters must declare exactly one required positional parameter.
Learn more
The type '{0}' is declared with {1} type parameters, but {2} type arguments were given.
Learn more
The constructor '{0}.{1}' doesn't have type parameters. The dot shorthand resolves to the constructor '{0}.{1}', and type parameters can't be applied to dot shorthand constructor invocations.
Learn more
The {0} '{1}' is declared with {2} type parameters, but {3} type arguments are given.
Learn more
The enum is declared with {0} type parameters, but {1} type arguments were given.
Learn more
The extension '{0}' is declared with {1} type parameters, but {2} type arguments were given.
Learn more
wrong_number_of_type_arguments_function
The type of this function is '{0}', which has {1} type parameters, but {2} type arguments were given.
wrong_separator_for_positional_parameter
The default value of a positional parameter should be preceded by '='.
wrong_terminator_for_parameter_group
Expected '{0}' to close parameter group.
wrong_token
Expected to find {0}, but found {1}.
wrong_type_parameter_variance_in_superinterface
'{0}' can't be used contravariantly or invariantly in '{1}'.
wrong_type_parameter_variance_position
The '{0}' type parameter '{1}' can't be used in an '{2}' position.
yaml_syntax_error
Parse error: {0}
Yield statements must be in a generator function (one marked with either 'async*' or 'sync*'). Yield-each statements must be in a generator function (one marked with either 'async*' or 'sync*').
Learn more
A yielded value of type '{0}' must be assignable to '{1}'. The type '{0}' implied by the 'yield*' expression must be assignable to '{1}'.
Learn more