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.

abi_specific_integer_invalid
Classes extending 'AbiSpecificInteger' must have exactly one const constructor, no other members, and no type parameters.
Learn more
abi_specific_integer_mapping_extra
Classes extending 'AbiSpecificInteger' must have exactly one 'AbiSpecificIntegerMapping' annotation specifying the mapping from ABI to a 'NativeType' integer with a fixed size.
Learn more
abi_specific_integer_mapping_missing
Classes extending 'AbiSpecificInteger' must have exactly one 'AbiSpecificIntegerMapping' annotation specifying the mapping from ABI to a 'NativeType' integer with a fixed size.
Learn more
abi_specific_integer_mapping_unsupported
Invalid mapping to '{0}'; only mappings to 'Int8', 'Int16', 'Int32', 'Int64', 'Uint8', 'Uint16', 'UInt32', and 'Uint64' are supported.
Learn more
abstract_class_constructor_tear_off
Constructors on abstract classes can't be torn off.
abstract_class_instantiation
The class '{0}' is abstract and can't be instantiated.
abstract_class_member
Members of classes can't be declared to be 'abstract'.
abstract_extension_field
Extension fields can't be declared 'abstract'.
abstract_external_field
Fields can't be declared both 'abstract' and 'external'.
abstract_field_constructor_initializer
Abstract fields cannot have initializers.
abstract_field_initializer
Abstract fields can't have initializers. Abstract fields cannot 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.
abstract_not_sync
Abstract methods can't use 'async', 'async*', or 'sync*'.
abstract_redirected_class_instantiation
Factory redirects to class '{0}', which is abstract and can't be instantiated.
abstract_sealed_class
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'.
abstract_super_member_reference
The {0} '{1}' is always abstract in the supertype.
Learn more
address_position
The '.address' expression can only be used as argument to a leaf native external call.
Learn more
address_receiver
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
always_declare_return_types
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
always_put_control_body_on_new_line
Statement should be on a separate line.
toggle_on
Learn more
always_put_required_named_parameters_first
Required named parameters should be before optional named parameters.
toggle_on
Learn more
always_require_non_null_named_parameters
toggle_on
always_specify_types
Missing type annotation.
toggle_on
always_use_package_imports
Use 'package:' imports for files in the 'lib' directory.
toggle_on
Learn more
ambiguous_export
The name '{0}' is defined in the libraries '{1}' and '{2}'.
Learn more
ambiguous_extension_cause
This is one of the extension members.
ambiguous_extension_member_access
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
ambiguous_extension_method
The method '{0}' is defined in multiple extensions for '{1}' and neither is more specific.
ambiguous_extension_operator
The operator '{0}' is defined in multiple extensions for '{1}' and neither is more specific.
ambiguous_extension_property
The property '{0}' is defined in multiple extensions for '{1}' and neither is more specific.
ambiguous_import
The name '{0}' is defined in the libraries {1}.
Learn more
ambiguous_set_or_map_literal_both
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
ambiguous_set_or_map_literal_either
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
ambiguous_supertypes
'{0}' can't implement both '{1}' and '{2}'
analysis_option_deprecated
The option '{0}' is no longer supported.
Learn more
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".
annotate_overrides
The member '{0}' overrides an inherited member but isn't annotated with '@override'.
toggle_on
Learn more
annotate_redeclares
The member '{0}' is redeclaring but isn't annotated with '@redeclare'.
toggle_on
annotation_on_function_type_type_parameter
A type variable on a function type can't have annotations.
annotation_on_pointer_field
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.
anonymous_break_target_outside_function
Can't break to a target in a different function.
anonymous_continue_target_outside_function
Can't continue at a target in a different function.
anonymous_method_wrong_parameter_list
An anonymous method with a parameter list must have exactly one required, positional parameter.
argument_must_be_a_constant
Argument '{0}' must be a constant.
Learn more
argument_must_be_native
Argument to 'Native.addressOf' must be annotated with @Native
Learn more
argument_type_not_assignable
The argument type '{0}' can't be assigned to the parameter type '{1}'. The argument type '{0}' can't be assigned to the parameter type '{1}'. {2}
Learn more
argument_type_not_assignable_to_error_handler
The argument type '{0}' can't be assigned to the parameter type '{1} Function(Object)' or '{1} Function(Object, StackTrace)'.
Learn more
ascii_control_character
The control character {0} can only be used in strings and comments.
assert_as_expression
assert can't be used as an expression.
assert_in_redirecting_constructor
A redirecting constructor can't have an 'assert' initializer.
Learn more
asset_directory_does_not_exist
The asset directory '{0}' doesn't exist.
Learn more
asset_does_not_exist
The asset file '{0}' doesn't exist.
Learn more
asset_field_not_list
The value of the 'assets' field is expected to be a list of relative file paths.
Learn more
asset_missing_path
Asset map entry must contain a 'path' field.
Learn more
asset_not_string
Assets are required to be file paths (strings).
Learn more
asset_not_string_or_map
An asset value is required to be a file path (string) or map.
Learn more
asset_path_not_string
Asset paths are required to be file paths (strings).
Learn more
assignment_of_do_not_store
'{0}' is marked 'doNotStore' and shouldn't be assigned to a field or top-level variable.
Learn more
assignment_to_const
Constant variables can't be assigned a value after initialization.
Learn more
assignment_to_final
'{0}' can't be used as a setter because it's final.
Learn more
assignment_to_final_local
The final variable '{0}' can only be set once.
Learn more
assignment_to_final_no_setter
There isn't a setter named '{0}' in class '{1}'.
Learn more
assignment_to_function
Functions can't be assigned a value.
Learn more
assignment_to_method
Methods can't be assigned a value.
Learn more
assignment_to_type
Types can't be assigned a value.
Learn more
async_for_in_wrong_context
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.
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_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_of_different_declaration_kind
Can't augment a {0} with a {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_without_declaration
The declaration being augmented doesn't exist.
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}'.
avoid_annotating_with_dynamic
Unnecessary 'dynamic' type annotation.
toggle_on
avoid_as
toggle_on
avoid_bool_literals_in_conditional_expressions
Conditional expressions with a 'bool' literal can be simplified.
toggle_on
avoid_catches_without_on_clauses
Catch clause should use 'on' to specify the type of exception being caught.
toggle_on
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
avoid_double_and_int_checks
Explicit check for double or int.
toggle_on
avoid_dynamic_calls
Method invocation or property access on a 'dynamic' target.
toggle_on
Learn more
avoid_empty_else
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
avoid_escaping_inner_quotes
Unnecessary escape of '{0}'.
toggle_on
avoid_field_initializers_in_const_classes
Fields in 'const' classes should not have initializers.
toggle_on
avoid_final_parameters
Parameters should not be marked as 'final'.
toggle_on
avoid_function_literals_in_foreach_calls
Function literals shouldn't be passed to 'forEach'.
toggle_on
Learn more
avoid_futureor_void
Don't use the type 'FutureOr'.
toggle_on
Learn more
avoid_implementing_value_types
Classes that override '==' should not be implemented.
toggle_on
avoid_init_to_null
Redundant initialization to 'null'.
toggle_on
Learn more
avoid_js_rounded_ints
Integer literal can't be represented exactly when compiled to JavaScript.
toggle_on
avoid_multiple_declarations_per_line
Multiple variables declared on a single line.
toggle_on
avoid_null_checks_in_equality_operators
Unnecessary null comparison in implementation of '=='.
toggle_on
avoid_positional_boolean_parameters
'bool' parameters should be named parameters.
toggle_on
avoid_print
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
avoid_redundant_argument_values
The value of the argument is redundant because it matches the default value.
toggle_on
avoid_relative_lib_imports
Can't use a relative path to import a library in 'lib'.
toggle_on
Learn more
avoid_renaming_method_parameters
The parameter name '{0}' doesn't match the name '{1}' in the overridden method.
toggle_on
Learn more
avoid_return_types_on_setters
Unnecessary return type on a setter.
toggle_on
Learn more
avoid_returning_null
toggle_on
avoid_returning_null_for_future
toggle_on
avoid_returning_null_for_void
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
avoid_shadowing_type_parameters
The type parameter '{0}' shadows a type parameter from the enclosing {1}.
toggle_on
Learn more
avoid_single_cascade_in_expression_statements
Unnecessary cascade expression.
toggle_on
Learn more
avoid_slow_async_io
Use of an async 'dart:io' method.
toggle_on
Learn more
avoid_type_to_string
Using 'toString' on a 'Type' is not safe in production code.
toggle_on
Learn more
avoid_types_as_parameter_names
The parameter name '{0}' matches a visible type name. The type parameter name '{0}' matches a visible type name.
toggle_on
Learn more
avoid_types_on_closure_parameters
Unnecessary type annotation on a function expression parameter.
toggle_on
avoid_unnecessary_containers
Unnecessary instance of 'Container'.
toggle_on
Learn more
avoid_unstable_final_fields
toggle_on
avoid_unused_constructor_parameters
The parameter '{0}' is not used in the constructor.
toggle_on
avoid_void_async
An 'async' function should have a 'Future' return type when it doesn't return a value.
toggle_on
avoid_web_libraries_in_flutter
Don't use web-only libraries outside Flutter web plugins.
toggle_on
Learn more
await_as_identifier
'await' can't be used as an identifier in 'async', 'async*', or 'sync*' methods.
await_for_not_async
The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
await_in_late_local_initializer
await expressions are not supported in late local initializers.
await_in_late_local_variable_initializer
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.
await_not_async
'await' can only be used in 'async' or 'async*' methods.
await_of_extension_type_not_future
The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'.
await_of_incompatible_type
The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'.
Learn more
await_only_futures
Uses 'await' on an instance of '{0}', which is not a subtype of 'Future'.
toggle_on
Learn more
base_class_implemented_outside_of_library
The class '{0}' can't be implemented outside of its library because it's a base class.
base_enum
Enums can't be declared to be 'base'.
base_mixin_implemented_outside_of_library
The mixin '{0}' can't be implemented outside of its library because it's a base mixin.
base_or_final_class_implemented_outside_of_library_cause
The type '{0}' is a subtype of '{1}', and '{1}' is defined here.
binary_operator_written_out
Binary operator '{0}' is written as '{1}' instead of the written out word.
body_might_complete_normally
The body might complete normally, causing 'null' to be returned, but the return type, '{0}', is a potentially non-nullable type.
Learn more
body_might_complete_normally_catch_error
This 'onError' handler must return a value assignable to '{0}', but ends without returning a value.
Learn more
body_might_complete_normally_nullable
This function has a nullable return type of '{0}', but ends without returning a value.
Learn more
bound_issue_via_cycle_non_simplicity
Generic type '{0}' can't be used without type arguments in the bounds of its own type variables. It is referenced indirectly through '{1}'.
bound_issue_via_loop_non_simplicity
Generic type '{0}' can't be used without type arguments in the bounds of its own type variables.
bound_issue_via_raw_type_with_non_simple_bounds
Generic type '{0}' can't be used without type arguments in a type variable bound.
break_label_on_switch_member
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.
break_target_outside_function
Can't break to '{0}' in a different function.
built_in_identifier_as_type
The built-in identifier '{0}' can't be used as a type.
Learn more
built_in_identifier_in_declaration
Can't use '{0}' as a name here. 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
camel_case_extensions
The extension name '{0}' isn't an UpperCamelCase identifier.
toggle_on
Learn more
camel_case_types
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".
cancel_subscriptions
Uncancelled instance of 'StreamSubscription'.
toggle_on
Learn more
candidate_found
Found this candidate, but the arguments don't match.
candidate_found_is_default_constructor
The class '{0}' has a constructor that takes no arguments.
cannot_assign_to_const_variable
Can't assign to the const variable '{0}'.
cannot_assign_to_extension_this
Can't assign to 'this'.
cannot_assign_to_final_variable
Can't assign to the final variable '{0}'.
cannot_assign_to_parenthesized_expression
Can't assign to a parenthesized expression.
cannot_assign_to_super
Can't assign to super.
cannot_assign_to_type_literal
Can't assign to a type literal.
cannot_read_sdk_specification
Unable to read the 'libraries.json' specification file: {0}.
cant_disambiguate_ambiguous_information
Both Iterable and Map spread elements encountered in ambiguous literal.
cant_disambiguate_not_enough_information
Not enough type information to disambiguate between literal set and literal map.
cant_have_named_parameters
'{0}' can't be declared with named parameters.
cant_have_optional_parameters
'{0}' can't be declared with optional parameters.
cant_infer_packages_from_many_inputs
Can't infer a packages file when compiling multiple inputs.
cant_infer_packages_from_package_uri
Can't infer a packages file from an input 'package:*' URI.
cant_infer_return_type_due_to_no_combined_signature
Can't infer a return type for '{0}' as the overridden members don't have a combined signature.
cant_infer_type_due_to_circularity
Can't infer the type of '{0}': circularity found during type inference.
cant_infer_type_due_to_no_combined_signature
Can't infer a type for '{0}' as the overridden members don't have a combined signature.
cant_infer_types_due_to_no_combined_signature
Can't infer types for '{0}' as the overridden members don't have a combined signature.
cant_read_file
Error when reading '{0}': {1}
cant_use_class_as_mixin
The class '{0}' can't be used as a mixin because it isn't a mixin class nor a mixin.
cant_use_control_flow_or_spread_as_constant
'{0}' is not supported in constant expressions.
cant_use_deferred_prefix_as_constant
'{0}' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded.
cant_use_prefix_as_expression
A prefix can't be used as an expression.
cant_use_prefix_with_null_aware
A prefix can't be used with null-aware operators.
cascade_invocations
Unnecessary duplication of receiver.
toggle_on
case_block_not_terminated
The last statement of the 'case' should be 'break', 'continue', 'rethrow', 'return', or 'throw'.
Learn more
case_expression_type_implements_equals
The switch case expression type '{0}' can't override the '==' operator.
Learn more
case_expression_type_is_not_switch_expression_subtype
The switch case expression type '{0}' must be a subtype of the switch expression type '{1}'.
Learn more
cast_from_null_always_fails
This cast always throws an exception because the expression always evaluates to 'null'.
Learn more
cast_from_nullable_always_fails
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
cast_to_non_type
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_implements_deferred_class
Classes and mixins can't implement deferred classes.
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.
class_should_be_listed_as_callable_in_dynamic_interface
Cannot use class '{0}' in a dynamic module.
class_should_be_listed_as_extendable_in_dynamic_interface
Cannot extend, implement or mix-in class '{0}' in a dynamic module.
class_used_as_mixin
The class '{0}' can't be used as a mixin because it's neither a mixin class nor a mixin.
Learn more
close_sinks
Unclosed instance of 'Sink'.
toggle_on
Learn more
collection_element_from_deferred_library
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
collection_methods_unrelated_type
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
combined_member_signature_failed
Class '{0}' inherits multiple members named '{1}' with incompatible signatures.
comment_references
The referenced name isn't visible in scope.
toggle_on
compound_implements_finalizable
The class '{0}' can't implement Finalizable.
Learn more
concrete_class_has_enum_superinterface
Concrete classes can't have 'Enum' as a superinterface.
Learn more
concrete_class_with_abstract_member
'{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
conflicting_constructor_and_static_member
'{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.
conflicting_generic_interfaces
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.
conflicting_type_variable_and_container
'{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
conflicting_type_variable_and_member
'{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
conflicts_with_implicit_setter
Conflicts with the implicit setter of the field '{0}'.
conflicts_with_implicit_setter_cause
Field '{0}' with the implicit setter.
conflicts_with_type_parameter
Conflicts with type variable '{0}'.
conflicts_with_type_parameter_cause
This is the type variable.
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}'.
const_constructor_late_final_field_cause
This constructor is const.
const_constructor_late_final_field_error
Can't have a late final field in a class with a const constructor.
const_constructor_non_final_field
Constructor is marked 'const' so all fields must be final.
const_constructor_non_final_field_cause
Field isn't final, but constructor is 'const'.
const_constructor_param_type_mismatch
A value of type '{0}' can't be assigned to a parameter of type '{1}' in a const constructor.
Learn more
const_constructor_redirection_to_non_const
A constant constructor can't call a non-constant constructor.
const_constructor_throws_exception
Const constructors can't throw exceptions.
const_constructor_with_body
A const constructor can't have a body. Const constructors can't have a body.
const_constructor_with_field_initialized_by_non_const
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}.
const_constructor_with_non_const_super
A constant constructor can't call a non-constant super constructor of '{0}'. A constant constructor can't call a non-constant super constructor.
Learn more
const_constructor_with_non_final_field
Can't define a const constructor for a class with non-final fields.
Learn more
const_deferred_class
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_case_implements_equal
Case expression '{0}' does not have a primitive operator '=='.
const_eval_circularity
Constant expression depends on itself.
const_eval_context
While analyzing:
const_eval_deferred_library
'{0}' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded.
const_eval_duplicate_element
The element '{0}' conflicts with another existing element in the set.
const_eval_duplicate_key
The key '{0}' conflicts with another existing key in the map.
const_eval_element_implements_equal
The element '{0}' does not have a primitive operator '=='.
const_eval_element_not_primitive_equality
The element '{0}' does not have a primitive equality.
const_eval_equals_operand_not_primitive_equality
Binary operator '==' requires receiver constant '{0}' of a type with primitive equality or type 'double', but was of type '{1}'.
const_eval_error
Error evaluating constant expression: {0}
const_eval_extension
Extension operations can't be used in constant expressions.
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_external_constructor
External constructors can't be evaluated in constant expressions.
const_eval_external_factory
External factory constructors can't be evaluated in constant expressions.
const_eval_failed_assertion
This assertion failed.
const_eval_failed_assertion_with_message
This assertion failed with message: {0}
const_eval_failed_assertion_with_non_string_message
This assertion failed with a non-String message.
const_eval_for_element
Constant expressions don't support 'for' elements.
const_eval_getter_not_found
Variable get not found: '{0}'
const_eval_invalid_binary_operand_type
Binary operator '{0}' on '{1}' requires operand of type '{2}', but was of type '{3}'.
const_eval_invalid_equals_operand_type
Binary operator '==' requires receiver constant '{0}' of type 'Null', 'bool', 'int', 'double', or 'String', but was of type '{1}'.
const_eval_invalid_method_invocation
The method '{0}' can't be invoked on '{1}' in a constant expression.
const_eval_invalid_property_get
The property '{0}' can't be accessed on '{1}' in a constant expression.
const_eval_invalid_record_index_get
The property '{0}' can't be accessed on '{1}' in a constant expression.
const_eval_invalid_record_name_get
The property '{0}' can't be accessed on '{1}' in a constant expression.
const_eval_invalid_static_invocation
The invocation of '{0}' is not allowed in a constant expression.
const_eval_invalid_string_interpolation_operand
The constant value '{0}' can't be used as part of a string interpolation in a constant expression. Only values of type 'null', 'bool', 'int', 'double', or 'String' can be used.
const_eval_invalid_symbol_name
The symbol name must be a valid public Dart member name, public constructor name, or library name, optionally qualified, but was '{0}'.
const_eval_invalid_type
Expected constant '{0}' to be of type '{1}', but was of type '{2}'.
const_eval_key_implements_equal
The key '{0}' does not have a primitive operator '=='.
const_eval_key_not_primitive_equality
The key '{0}' does not have a primitive equality.
const_eval_method_invocation
Methods can't be invoked in constant expressions.
const_eval_negative_shift
Binary operator '{0}' on '{1}' requires non-negative operand, but was '{2}'.
const_eval_non_constant_variable_get
The variable '{0}' is not a constant, only constant expressions are allowed.
const_eval_non_null
Constant expression must be non-null.
const_eval_not_list_or_set_in_spread
Only lists and sets can be used in spreads in constant lists and sets.
const_eval_not_map_in_spread
Only maps can be used in spreads in constant maps.
const_eval_null_value
Null value during constant evaluation.
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_starting_point
Constant evaluation error:
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_truncate_error
Binary operator '{0} ~/ {1}' results is Infinity or NaN.
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_eval_unevaluated
Couldn't evaluate constant expression.
const_eval_unhandled_core_exception
Unhandled core exception: {0}
const_eval_unhandled_exception
Unhandled exception: {0}
const_eval_zero_divisor
Binary operator '{0}' on '{1}' requires non-zero divisor, but divisor was '0'.
const_factory
Only redirecting factory constructors can be declared to be 'const'.
const_factory_redirection_to_non_const
Constant factory constructor can't delegate to a non-constant constructor.
const_field_without_initializer
The const variable '{0}' must be initialized.
const_initialized_with_non_constant_value
Const variables must be initialized with a constant value.
Learn more
const_initialized_with_non_constant_value_from_deferred_library
Constant values from a deferred library can't be used to initialize a 'const' variable.
Learn more
const_instance_field
Only static fields can be declared as const.
Learn more
const_map_key_not_primitive_equality
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'.
const_not_initialized
The constant '{0}' must be initialized.
Learn more
const_set_element_not_primitive_equality
An element in a constant set can't override the '==' operator, or 'hashCode', but the type '{0}' does.
Learn more
const_spread_expected_list_or_set
A list or a set is expected in this spread.
Learn more
const_spread_expected_map
A map is expected in this spread.
Learn more
const_type_parameter
Type parameters can't be used in a constant expression.
const_with_non_const
The constructor being called isn't a const constructor.
Learn more
const_with_non_constant_argument
Arguments of a constant creation must be constant expressions.
Learn more
const_with_type_parameters
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.
constant_identifier_names
The constant name '{0}' isn't a lowerCamelCase identifier.
toggle_on
Learn more
constant_pattern_never_matches_value_type
The matched value type '{0}' can never be equal to this constant of type '{1}'.
Learn more
constant_pattern_with_non_constant_expression
The expression of a constant pattern must be a valid constant.
Learn more
constructor_conflicts_with_member
The constructor conflicts with member '{0}'.
constructor_conflicts_with_member_cause
Conflicting member '{0}'.
constructor_cyclic
Redirecting constructors can't be cyclic.
constructor_initialize_same_instance_variable_several_times
'{0}' was already initialized by this constructor.
constructor_not_found
Couldn't find constructor '{0}'.
constructor_not_sync
Constructor bodies can't use 'async', 'async*', or 'sync*'.
constructor_should_be_listed_as_callable_in_dynamic_interface
Cannot invoke constructor '{0}' from a dynamic module.
constructor_tear_off_with_type_arguments
A constructor tear-off can't have type arguments after the constructor name.
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.
constructor_with_type_parameters
Constructors can't have type parameters.
constructor_with_wrong_name
The name of a constructor must match the name of the enclosing class.
constructor_with_wrong_name_context
The name of the enclosing class is '{0}'.
continue_label_invalid
A 'continue' label must be on a loop or a switch member. 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_target_outside_function
Can't continue at '{0}' in a different function.
continue_without_label_in_case
A continue statement in a switch statement must have a label as a target.
control_flow_in_finally
Use of '{0}' in a 'finally' clause.
toggle_on
Learn more
could_not_infer
Couldn't infer type parameter '{0}'.{1}
could_not_parse_uri
Couldn't parse URI '{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'.
creation_of_struct_or_union
Subclasses of 'Struct' and 'Union' are backed by native memory, and can't be instantiated by a generative constructor.
Learn more
creation_with_non_type
The name '{0}' isn't a class.
Learn more
curly_braces_in_flow_control_structures
Statements in {0} should be enclosed in a block.
toggle_on
Learn more
cycle_in_type_parameters
Type '{0}' is a bound of itself via '{1}'.
cyclic_class_hierarchy
'{0}' is a supertype of itself.
cyclic_redirecting_factory_constructors
Cyclic definition of factory '{0}'.
cyclic_representation_dependency
An extension type can't depend on itself through its representation type.
cyclic_typedef
The typedef '{0}' has a reference to itself.
dangling_library_doc_comments
Dangling library doc comment.
toggle_on
Learn more
dart_ffi_library_in_dart2_wasm
'dart:ffi' can't be imported when compiling to Wasm.
dead_code
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_following_catch
Dead code: Catch clauses after a 'catch (e)' or an 'on Object catch (e)' are never reached.
Learn more
dead_code_on_catch_subtype
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
dead_null_aware_expression
The left operand can't be null, so the right operand is never executed.
Learn more
debug_trace
Fatal '{0}' at: {1}
declaration_conflicts_with_setter
The declaration conflicts with setter '{0}'.
declaration_conflicts_with_setter_cause
Conflicting setter '{0}'.
declared_member_conflicts_with_inherited_member
Can't declare a member that conflicts with an inherited one.
declared_member_conflicts_with_inherited_member_cause
This is the inherited member.
declared_member_conflicts_with_inherited_members_cause
This is one of the inherited members.
declared_member_conflicts_with_overridden_members_cause
This is one of the overridden members.
default_in_switch_expression
A switch expression may not use the default keyword.
default_list_constructor
The default 'List' constructor isn't available when null safety is enabled.
Learn more
default_value_in_function_type
Parameters in a function type can't have default values.
Learn more
default_value_in_redirecting_factory_constructor
Can't have a default value here because any default values of '{0}' would be used instead. Default values aren't allowed in factory constructors that redirect to another constructor.
Learn more
default_value_on_required_parameter
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_extension_import
Extension '{0}' cannot be imported through a deferred import.
deferred_import_of_extension
Imports of deferred libraries must hide all extensions.
Learn more
deferred_prefix_duplicated
Can't use the name '{0}' for a deferred library, as the name is used elsewhere.
deferred_prefix_duplicated_cause
'{0}' is used here.
deferred_type_annotation
The type '{0}' is deferred loaded via prefix '{1}' and can't be used as a type annotation.
definitely_unassigned_late_local_variable
The late local variable '{0}' is definitely unassigned at this point.
Learn more
depend_on_referenced_packages
The imported package '{0}' isn't a dependency of the importing package.
toggle_on
Learn more
dependencies_field_not_map
The value of the '{0}' field is expected to be a map.
Learn more
deprecated_colon_for_default_value
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
deprecated_export_use
The ability to import '{0}' indirectly is deprecated.
Learn more
deprecated_extend
Extending '{0}' is deprecated.
Learn more
deprecated_factory_method
Methods named 'factory' will become constructors when the primary_constructors feature is enabled.
Learn more
deprecated_field
The '{0}' field is no longer used and can be removed.
Learn more
deprecated_implement
Implementing '{0}' is deprecated.
Learn more
deprecated_instantiate
Instantiating '{0}' is deprecated.
Learn more
deprecated_lint
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}'.
deprecated_member_use
'{0}' is deprecated and shouldn't be used. '{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
deprecated_mixin
Mixing in '{0}' is deprecated.
Learn more
deprecated_new_in_comment_reference
Using the 'new' keyword in a comment reference is deprecated.
Learn more
deprecated_optional
Omitting an argument for the '{0}' parameter is deprecated.
Learn more
deprecated_subclass
Subclassing '{0}' is deprecated.
Learn more
deprecated_subtype_of_function
Extending 'Function' is deprecated. Implementing 'Function' has no effect. Mixing in 'Function' is deprecated.
Learn more
diagnostic_describe_all_properties
The public property isn't described by either 'debugFillProperties' or 'debugDescribeChildren'.
toggle_on
Learn more
dill_outline_summary
Indexed {0} libraries ({1} bytes) in {2}ms, that is, {3} bytes/ms, and {4} ms/libraries.
direct_cycle_in_type_parameters
Type '{0}' can't use itself as a bound.
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
disallowed_type_instantiation_expression
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.
toggle_on
division_optimization
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_import_cannot_be_deferred
Doc imports can't be deferred.
Learn more
doc_import_cannot_have_combinators
Doc imports can't have show or hide combinators.
Learn more
doc_import_cannot_have_configurations
Doc imports can't have configurations.
Learn more
doc_import_cannot_have_prefix
Doc imports can't have prefixes.
Learn more
document_ignores
Missing documentation explaining why the diagnostic is ignored.
toggle_on
dot_shorthand_missing_context
A dot shorthand can't be used where there is no context type.
Learn more
dot_shorthand_undefined_member
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
dot_shorthands_constructor_invocation_with_type_arguments
A dot shorthand constructor invocation can't have type arguments.
dot_shorthands_invalid_context
No type was provided to find the dot shorthand '{0}'.
dot_shorthands_undefined_getter
The static getter or field '{0}' isn't defined for the type '{1}'.
dot_shorthands_undefined_invocation
The static method or constructor '{0}' isn't defined for the type '{1}'.
duplicate_constructor
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.
duplicate_definition
The name '{0}' is already defined.
Learn more
duplicate_export
Duplicate export.
Learn more
duplicate_field_formal_parameter
The field '{0}' can't be initialized by multiple parameters in the same constructor.
Learn more
duplicate_field_name
The field name '{0}' is already used in this record.
Learn more
duplicate_hidden_name
Duplicate hidden name.
Learn more
duplicate_ignore
The diagnostic '{0}' doesn't need to be ignored here because it's already being ignored.
Learn more
duplicate_import
Duplicate import.
Learn more
duplicate_label_in_switch_statement
The label '{0}' was already used in this switch statement.
duplicate_named_argument
The argument for the named parameter '{0}' was already specified.
Learn more
duplicate_part
The library already contains a part with the URI '{0}'.
Learn more
duplicate_pattern_assignment_variable
The variable '{0}' is already assigned in this pattern.
Learn more
duplicate_pattern_assignment_variable_context
The first assigned variable pattern.
duplicate_pattern_field
The field '{0}' is already matched in this pattern.
Learn more
duplicate_prefix
An import directive can only have one prefix ('as' clause).
duplicate_record_pattern_field
The field '{0}' is already matched in this pattern.
duplicate_record_pattern_field_context
The first field.
duplicate_rest_element_in_pattern
At most one rest element is allowed in a list or map pattern.
Learn more
duplicate_rest_element_in_pattern_context
The first rest element.
duplicate_rule
The rule '{0}' is already enabled and doesn't need to be enabled again.
Learn more
duplicate_shown_name
Duplicate shown name.
Learn more
duplicate_variable_pattern
The variable '{0}' is already defined in this pattern.
Learn more
duplicated_declaration
'{0}' is already declared in this scope.
duplicated_declaration_cause
Previous declaration of '{0}'.
duplicated_declaration_use
Can't use '{0}' because it is declared more than once.
duplicated_export
'{0}' is exported from both '{1}' and '{2}'.
duplicated_import
'{0}' is imported from both '{1}' and '{2}'.
duplicated_modifier
The modifier '{0}' was already specified.
duplicated_named_argument
Duplicated named argument '{0}'.
duplicated_parameter_name
Duplicated parameter name '{0}'.
duplicated_parameter_name_cause
Other parameter named '{0}'.
duplicated_record_literal_field_name
Duplicated record literal field name '{0}'.
duplicated_record_literal_field_name_context
This is the existing record literal field named '{0}'.
duplicated_record_type_field_name
Duplicated record type field name '{0}'.
duplicated_record_type_field_name_context
This is the existing record type field named '{0}'.
dynamic_calls_are_not_allowed_in_dynamic_module
Dynamic calls are not allowed in a dynamic module.
empty_catches
Empty catch block.
toggle_on
Learn more
empty_constructor_bodies
Empty constructor bodies should be written using a ';' rather than '{}'.
toggle_on
Learn more
empty_enum_body
An enum must declare at least one constant name.
empty_map_pattern
A map pattern must have at least one entry.
Learn more
empty_named_parameter_list
Named parameter lists cannot be empty.
empty_optional_parameter_list
Optional parameter lists cannot be empty.
empty_record_type_named_fields_list
The list of named fields in a record type can't be empty.
Learn more
empty_statements
Unnecessary empty statement.
toggle_on
Learn more
empty_struct
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_abstract_member
Enums can't declare abstract members.
enum_constant_invokes_factory_constructor
An enum value can't invoke a factory constructor.
enum_constant_same_name_as_enclosing
The name of the enum value can't be the same as the enum's name.
Learn more
enum_constant_with_non_const_constructor
The invoked constructor isn't a 'const' constructor.
Learn more
enum_constructor_non_final_field
Enum constructors are constant so all fields must be final.
enum_constructor_super_initializer
Enum constructors can't contain super-initializers.
enum_constructor_tearoff
Enum constructors can't be torn off.
enum_contains_restricted_instance_declaration
An enum can't declare a non-abstract member named '{0}'.
enum_contains_values_declaration
An enum can't declare a member named 'values'.
enum_declaration_empty
An enum declaration can't be empty.
enum_factory_redirects_to_constructor
Enum factory constructors can't redirect to generative constructors.
enum_implementer_contains_restricted_instance_declaration
'{0}' has 'Enum' as a superinterface and can't contain non-static members with name '{1}'.
enum_implementer_contains_values_declaration
'{0}' has 'Enum' as a superinterface and can't contain non-static member with name 'values'.
enum_in_class
Enums can't be declared inside classes.
enum_inherits_restricted
An enum can't inherit a member named '{0}'.
enum_inherits_restricted_member
This is the inherited member
enum_instantiated_to_bounds_is_not_well_bounded
The result of instantiating the enum to bounds is not well-bounded.
enum_instantiation
Enums can't be instantiated.
enum_mixin_with_instance_variable
Mixins applied to enums can't have instance variables.
Learn more
enum_non_const_constructor
Generative enum constructors must be marked as 'const'.
enum_supertype_of_non_abstract_class
Non-abstract class '{0}' has 'Enum' as a superinterface.
enum_with_abstract_member
'{0}' must have a method body because '{1}' is an enum.
Learn more
enum_with_name_values
The name 'values' is not a valid name for an enum. The name 'values' is not a valid name for an enum. Try using a different name.
Learn more
enum_without_constants
The enum must have at least one enum constant.
eol_at_end_of_file
Missing a newline at the end of the file.
toggle_on
equal_elements_in_const_set
Two elements in a constant set literal can't be equal.
Learn more
equal_elements_in_set
Two elements in a set literal shouldn't be equal.
Learn more
equal_keys_in_const_map
Two keys in a constant map literal can't be equal.
Learn more
equal_keys_in_map
Two keys in a map literal shouldn't be equal.
Learn more
equal_keys_in_map_pattern
Two keys in a map pattern can't be equal.
Learn more
equal_keys_in_map_pattern_context
This is the previous use of the same key.
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.
exception_reading_file
Exception when reading '{0}': {1}
exhaustive_cases
Missing case clauses for some constants in '{0}'.
toggle_on
expected_after_but_got
Expected '{0}' after this.
expected_an_initializer
Expected an initializer.
expected_block_to_skip
Expected a function body or '=>'.
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 a function body or '=>'.
expected_but_got
Expected '{0}' before this.
expected_but_got2
Expected '{0}' or '{1}' before this.
expected_case_or_default
Expected 'case' or 'default'.
expected_class_member
Expected a class member, but got '{0}'. Expected a class member.
expected_declaration
Expected a declaration, but got '{0}'.
expected_else_or_comma
Expected 'else' or comma.
expected_enum_body
Expected a enum body, but got '{0}'.
expected_executable
Expected a method, getter, setter or operator declaration.
expected_function_body
Expected a function body, but got '{0}'.
expected_hex_digit
A hex digit (0-9 or A-F) must follow '0x'.
expected_identifier
Expected an identifier, but got '{0}'.
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_argument
Expected named argument.
expected_named_type
Expected a class name. Expected a mixin name. Expected the name of a class or mixin.
expected_one_expression
Expected one expression, but found additional input.
expected_one_list_pattern_type_arguments
List patterns require one type argument or none, but {0} found.
Learn more
expected_one_list_type_arguments
List literals require one type argument or none, but {0} found.
Learn more
expected_one_set_type_arguments
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_statement
Expected a statement.
expected_string
Expected a String, but got '{0}'.
expected_string_literal
Expected a string literal.
expected_token
Expected to find '{0}'.
expected_two_map_pattern_type_arguments
Map patterns require two type arguments or none, but {0} found.
Learn more
expected_two_map_type_arguments
Map literals require two type arguments or none, but {0} found.
Learn more
expected_type
Expected a type, but got '{0}'.
expected_type_name
Expected a type name.
expected_uri
Expected a URI.
experiment_disabled
This requires the '{0}' language feature to be enabled.
experiment_disabled_invalid_language_version
This requires the '{0}' language feature, which requires language version of {1} or higher.
experiment_expired_disabled
The experiment '{0}' has expired and can't be disabled.
experiment_expired_enabled
The experiment '{0}' has expired and can't be enabled.
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.
experiment_opt_out_comment
This is the annotation that opts out this library from the '{0}' language feature.
experiment_opt_out_explicit
The '{0}' language feature is disabled for this library.
experiment_opt_out_implicit
The '{0}' language feature is disabled for this library.
experimental_member_use
'{0}' is experimental and could be removed or changed at any time.
explicit_extension_argument_mismatch
Explicit extension application requires exactly 1 positional argument.
explicit_extension_as_expression
Explicit extension application cannot be used as an expression.
explicit_extension_as_lvalue
Explicit extension application cannot be a target for assignment.
explicit_extension_type_argument_mismatch
Explicit extension application of extension '{0}' takes '{1}' type argument(s).
export_after_part
Export directives must precede part directives.
export_internal_library
The library '{0}' is internal and can't be exported.
Learn more
export_legacy_symbol
The symbol '{0}' is defined in a legacy library, and can't be re-exported from a library with null safety enabled.
Learn more
export_of_non_library
The exported library '{0}' can't have a part-of directive.
Learn more
exported_main
This is exported 'main' declaration.
expression_evaluation_known_variable_unavailable
The variable '{0}' is unavailable in this expression evaluation.
expression_in_map
Expressions can't be used in a map literal.
Learn more
expression_not_metadata
This can't be used as an annotation; an annotation should be a reference to a compile-time constant variable, or a call to a constant constructor.
extending_enum
'{0}' is an enum and can't be extended or implemented.
extending_restricted
'{0}' is restricted and can't be extended or implemented.
extends_deferred_class
Classes can't extend deferred classes.
extends_never
The type 'Never' can't be used in an 'extends' clause.
extends_non_class
Classes can only extend other classes.
Learn more
extension_as_expression
Extension '{0}' can't be used as an expression.
Learn more
extension_augmentation_has_on_clause
Extension augmentations can't have 'on' clauses.
extension_conflicting_static_and_instance
An extension can't define static member '{0}' and an instance member with the same name.
Learn more
extension_declares_abstract_member
Extensions can't declare abstract members.
Learn more
extension_declares_constructor
Extensions can't declare constructors.
Learn more
extension_declares_instance_field
Extensions can't declare instance fields Extensions can't declare instance fields.
Learn more
extension_declares_member_of_object
Extensions can't declare members with the same name as a member declared by 'Object'.
Learn more
extension_member_conflicts_with_object_member
This extension member conflicts with Object member '{0}'.
extension_override_access_to_static_member
An extension override can't be used to access a static member from an extension.
Learn more
extension_override_argument_not_assignable
The type of the argument to the extension override '{0}' isn't assignable to the extended type '{1}'.
Learn more
extension_override_with_cascade
Extension overrides have no value so they can't be used as the receiver of a cascade expression.
Learn more
extension_override_without_access
An extension override can only be used to access instance members.
Learn more
extension_type_combined_member_signature_failed
Extension type '{0}' inherits multiple members named '{1}' with incompatible signatures.
extension_type_constructor_with_super_formal_parameter
Extension type constructors can't declare super formal parameters.
Learn more
extension_type_constructor_with_super_invocation
Extension type constructors can't include super initializers.
Learn more
extension_type_declaration_cause
The issue arises via this extension type declaration.
extension_type_declares_abstract_member
Extension types can't declare abstract members.
extension_type_declares_instance_field
Extension types can't declare instance fields Extension types can't declare instance fields.
Learn more
extension_type_declares_member_of_object
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_type_implements_deferred
Extension types can't implement deferred types.
extension_type_implements_disallowed_type
Extension types can't implement '{0}'.
Learn more
extension_type_implements_itself
The extension type can't implement itself.
Learn more
extension_type_implements_not_supertype
'{0}' is not a supertype of '{1}', the representation type.
Learn more
extension_type_implements_representation_not_supertype
'{0}', the representation type of '{1}', is not a supertype of '{2}', the representation type of '{3}'.
Learn more
extension_type_inherited_member_conflict
The extension type '{0}' has more than one distinct member named '{1}' from implemented types.
Learn more
extension_type_member_context
This is the inherited extension type member.
extension_type_member_one_of_context
This is one of the inherited extension type members.
extension_type_primary_constructor_function_formal_parameter_syntax
Primary constructors in extension types can't use function formal parameter syntax.
extension_type_primary_constructor_with_initializing_formal
Primary constructors in extension types can't use initializing formals.
extension_type_representation_depends_on_itself
The extension type representation can't depend on itself.
Learn more
extension_type_representation_type_bottom
The representation type can't be a bottom type.
Learn more
extension_type_should_be_listed_as_callable_in_dynamic_interface
Cannot use extension type '{0}' in a dynamic module.
extension_type_with
An extension type declaration can't have a 'with' clause.
extension_type_with_abstract_member
'{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_field_constructor_initializer
External fields cannot have initializers.
external_field_initializer
External fields cannot have initializers.
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_with_initializer
External fields can't have initializers. External variables can't have initializers.
Learn more
extra_annotation_on_struct_field
Fields in a struct class must have exactly one annotation indicating the native type.
Learn more
extra_positional_arguments
Too many positional arguments: {0} expected, but {1} found.
Learn more
extra_positional_arguments_could_be_named
Too many positional arguments: {0} expected, but {1} found.
Learn more
extra_size_annotation_carray
'Array's must have exactly one 'Array' annotation.
Learn more
extraneous_modifier
Can't have modifier '{0}' here.
extraneous_modifier_in_extension
Can't have modifier '{0}' in an extension.
Learn more
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_conflicts_with_member
The factory conflicts with member '{0}'.
factory_conflicts_with_member_cause
Conflicting member '{0}'.
factory_constructor_new_name
Factory constructors can't be named 'new'.
factory_not_sync
Factory bodies can't use 'async', 'async*', or 'sync*'.
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.
fasta_c_l_i_argument_required
Expected value after '{0}'.
fasta_usage_long
Supported options: -o , --output= Generate the output into . -h, /h, /?, --help Display this message (add -v for information about all options). -v, --verbose Display verbose information. -Dname -Dname=value Define an environment variable in the compile-time environment. --no-defines Ignore all -D options and leave environment constants unevaluated. -- Stop option parsing, the rest of the command line is assumed to be file names or arguments to the Dart program. --packages= Use package resolution configuration , which should contain a mapping of package names to paths. --platform= Read the SDK platform from , which should be in Dill/Kernel IR format and contain the Dart SDK. --target=dart2js|dart2js_server|dart2wasm|dart2wasm_js_compatibility|dart_runner|dartdevc|flutter|flutter_runner|none|vm Specify the target configuration. --enable-asserts Check asserts in initializers during constant evaluation. --verify Check that the generated output is free of various problems. This is mostly useful for developers of this compiler or Kernel transformations. --dump-ir Print compiled libraries in Kernel source notation. --omit-platform Exclude the platform from the serialized dill file. --exclude-source Do not include source code in the dill file. --compile-sdk= Compile the SDK from scratch instead of reading it from a .dill file (see --platform). --sdk= Location of the SDK sources for use when compiling additional platform libraries. --single-root-scheme=String --single-root-base= Specify a custom URI scheme and a location on disk where such URIs are mapped to. When specified, the compiler can be invoked with inputs using the custom URI scheme. The compiler can ignore the exact location of files on disk and as a result to produce output that is independent of the absolute location of files on disk. This is mostly useful for integrating with build systems. --fatal=errors --fatal=warnings Makes messages of the given kinds fatal, that is, immediately stop the compiler with a non-zero exit-code. In --verbose mode, also display an internal stack trace from the compiler. Multiple kinds can be separated by commas, for example, --fatal=errors,warnings. --fatal-skip= --fatal-skip=trace Skip this many messages that would otherwise be fatal before aborting the compilation. Default is 0, which stops at the first message. Specify 'trace' to print a stack trace for every message without stopping. --enable-experiment= Enable or disable an experimental flag, used to guard features currently in development. Prefix an experiment name with 'no-' to disable it. Multiple experiments can be separated by commas.
fasta_usage_short
Frequently used options: -o Generate the output into . -h Display this message (add -v for information about all options).
ffi_abi_specific_integer_invalid
Classes extending 'AbiSpecificInteger' must have exactly one const constructor, no other members, and no type arguments.
ffi_abi_specific_integer_mapping_invalid
Classes extending 'AbiSpecificInteger' must have exactly one 'AbiSpecificIntegerMapping' annotation specifying the mapping from ABI to a NativeType integer with a fixed size.
ffi_address_of_must_be_native
Argument to 'Native.addressOf' must be annotated with @Native.
ffi_address_position
The '.address' expression can only be used as argument to a leaf native external call.
ffi_address_receiver
The receiver of '.address' must be a concrete 'TypedData', a concrete 'TypedData' '[]', an 'Array', an 'Array' '[]', a Struct field, or a Union field.
ffi_compound_implements_finalizable
{0} '{1}' can't implement Finalizable.
ffi_create_of_struct_or_union
Subclasses of 'Struct' and 'Union' are backed by native memory, and can't be instantiated by a generative constructor. Try allocating it via allocation, or load from a 'Pointer'.
ffi_dart_type_mismatch
Expected '{0}' to be a subtype of '{1}'.
ffi_deeply_immutable_classes_must_be_final_or_sealed
Deeply immutable classes must be final or sealed.
ffi_deeply_immutable_fields_modifiers
Deeply immutable classes must only have final non-late instance fields.
ffi_deeply_immutable_fields_must_be_deeply_immutable
Deeply immutable classes must only have deeply immutable instance fields. Deeply immutable types include 'int', 'double', 'bool', 'String', 'Pointer', 'Float32x4', 'Float64x2', 'Int32x4', function types and classes annotated with @pragma('vm:deeply-immutable').
ffi_deeply_immutable_subtypes_must_be_deeply_immutable
Subtypes of deeply immutable classes must be deeply immutable.
ffi_deeply_immutable_supertype_must_be_deeply_immutable
The super type of deeply immutable classes must be deeply immutable.
ffi_default_asset_duplicate
There may be at most one @DefaultAsset annotation on a library.
ffi_empty_struct
{0} '{1}' is empty. Empty structs and unions are undefined behavior.
ffi_exceptional_return_null
Exceptional return value must not be null.
ffi_expected_constant
Exceptional return value must be a constant.
ffi_expected_constant_arg
Argument '{0}' must be a constant.
ffi_expected_exceptional_return
Expected an exceptional return value for a native callback returning '{0}'.
ffi_expected_no_exceptional_return
Exceptional return value cannot be provided for a native callback returning '{0}'.
ffi_extends_or_implements_sealed_class
Class '{0}' cannot be extended or implemented.
ffi_field_annotation
Field '{0}' requires exactly one annotation to declare its native type, which cannot be Void. dart:ffi Structs and Unions cannot have regular Dart fields.
ffi_field_cyclic
{0} '{1}' contains itself. Cycle elements: {2}
ffi_field_initializer
Field '{0}' is a dart:ffi Pointer to a struct field and therefore cannot be initialized before constructor execution.
ffi_field_no_annotation
Field '{0}' requires no annotation to declare its native type, it is a Pointer which is represented by the same type in Dart and native code.
ffi_field_null
Field '{0}' cannot be nullable or have type 'Null', it must be int, double, Pointer, or a subtype of Struct or Union.
ffi_leaf_call_must_not_return_handle
FFI leaf call must not have Handle return type.
ffi_leaf_call_must_not_take_handle
FFI leaf call must not have Handle argument types.
ffi_native_callable_listener_return_void
The return type of the function passed to NativeCallable.listener must be void rather than '{0}'.
ffi_native_duplicate_annotations
Native functions and fields must not have more than @Native annotation.
ffi_native_field_missing_type
The native type of this field could not be inferred and must be specified in the annotation.
ffi_native_field_must_be_static
Native fields must be static.
ffi_native_field_type
Unsupported type for native fields. Native fields only support pointers, compounds and numeric types.
ffi_native_function_missing_type
The native type of this function couldn't be inferred so it must be specified in the annotation.
ffi_native_invalid_duplicate_default_asset
There may be at most one @DefaultAsset annotation on a library.
Learn more
ffi_native_invalid_multiple_annotations
Native functions and fields must have exactly one @Native annotation.
Learn more
ffi_native_must_be_external
Native functions and fields must be marked external. Native functions must be declared external.
Learn more
ffi_native_only_classes_extending_nativefieldwrapperclass1_can_be_pointer
Only classes extending NativeFieldWrapperClass1 can be passed as Pointer.
Learn more
ffi_native_only_native_field_wrapper_class_can_be_pointer
Only classes extending NativeFieldWrapperClass1 can be passed as Pointer.
ffi_native_unexpected_number_of_parameters
Unexpected number of Native annotation parameters. Expected {0} but has {1}.
Learn more
ffi_native_unexpected_number_of_parameters_with_receiver
Unexpected number of Native annotation parameters. Expected {0} but has {1}. Native instance method annotation must have receiver as first argument.
Learn more
ffi_not_static
{0} expects a static function as parameter. dart:ffi only supports calling static Dart functions from native code. Closures and tear-offs are not supported because they can capture context.
ffi_packed_annotation
Struct '{0}' must have at most one 'Packed' annotation.
ffi_packed_annotation_alignment
Only packing to 1, 2, 4, 8, and 16 bytes is supported.
ffi_size_annotation
Field '{0}' must have exactly one 'Array' annotation.
ffi_size_annotation_dimensions
Field '{0}' must have an 'Array' annotation that matches the dimensions.
ffi_struct_generic
{0} '{1}' should not be generic.
ffi_type_invalid
Expected type '{0}' to be a valid and instantiated subtype of 'NativeType'.
ffi_type_mismatch
Expected type '{0}' to be '{1}', which is the Dart type corresponding to '{2}'.
ffi_variable_length_array_not_last
Variable length 'Array's must only occur as the last field of Structs.
field_already_initialized_at_declaration
'{0}' is a final instance variable that was initialized at the declaration.
field_already_initialized_at_declaration_cause
'{0}' was initialized here.
field_in_struct_with_initializer
Fields in subclasses of 'Struct' and 'Union' can't have initializers.
Learn more
field_initialized_by_multiple_initializers
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.
field_initialized_in_initializer_and_declaration
Fields can't be initialized in the constructor if they are final and were already initialized at their declaration.
Learn more
field_initialized_in_parameter_and_initializer
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
field_initializer_factory_constructor
Initializing formal parameters can't be used in factory constructors.
Learn more
field_initializer_in_struct
Constructors in subclasses of 'Struct' and 'Union' can't have field initializers.
Learn more
field_initializer_not_assignable
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_initializer_outside_constructor
Field formal parameters can only be used in a constructor.
Learn more
field_initializer_redirecting_constructor
The redirecting constructor can't have a field initializer.
Learn more
field_initializing_formal_not_assignable
The parameter type '{0}' is incompatible with the field type '{1}'.
Learn more
field_must_be_external_in_struct
Fields of 'Struct' and 'Union' subclasses must be marked external.
Learn more
field_non_nullable_not_initialized_by_constructor_error
This constructor should initialize field '{0}' because its type '{1}' doesn't allow null.
field_non_nullable_without_initializer_error
Field '{0}' should be initialized because its type '{1}' doesn't allow null.
field_not_promoted_because_conflicting_field
'{0}' couldn't be promoted because there is a conflicting non-promotable field in class '{1}'.
field_not_promoted_because_conflicting_getter
'{0}' couldn't be promoted because there is a conflicting getter in class '{1}'.
field_not_promoted_because_conflicting_nsm_forwarder
'{0}' couldn't be promoted because there is a conflicting noSuchMethod forwarder in class '{1}'.
field_not_promoted_because_external
'{0}' refers to an external field so it couldn't be promoted.
field_not_promoted_because_not_enabled
'{0}' couldn't be promoted because field promotion is only available in Dart 3.2 and above.
field_not_promoted_because_not_field
'{0}' refers to a getter so it couldn't be promoted.
field_not_promoted_because_not_final
'{0}' refers to a non-final field so it couldn't be promoted.
field_not_promoted_because_not_private
'{0}' refers to a public property so it couldn't be promoted.
file_names
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_class_extended_outside_of_library
The class '{0}' can't be extended outside of its library because it's a final class.
final_class_implemented_outside_of_library
The class '{0}' can't be implemented outside of its library because it's a final class.
final_class_used_as_mixin_constraint_outside_of_library
The class '{0}' can't be used as a mixin superclass constraint outside of its library because it's a final class.
final_constructor
A constructor can't be declared to be 'final'.
final_enum
Enums can't be declared to be 'final'.
final_field_not_initialized
Final field '{0}' is not initialized.
final_field_not_initialized_by_constructor
Final field '{0}' is not initialized by this constructor.
final_field_without_initializer
The final variable '{0}' must be initialized.
final_initialized_in_declaration_and_constructor
'{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'.
final_not_assigned_error
Final variable '{0}' must be assigned before it can be used.
final_not_initialized
The final variable '{0}' must be initialized.
Learn more
final_not_initialized_constructor
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
final_possibly_assigned_error
Final variable '{0}' might already be assigned at this point.
fixme
{0}
flutter_field_not_map
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
for_in_loop_element_type_not_assignable
A value of type '{0}' can't be assigned to a variable of type '{1}'.
for_in_loop_exactly_one_variable
A for-in loop can't have more than one loop variable.
for_in_loop_not_assignable
Can't assign to this, so it can't be used in a for-in loop.
for_in_loop_type_not_iterable
The type '{0}' used in the 'for' loop must implement '{1}'.
for_in_loop_with_const_variable
A for-in loop-variable can't be 'const'.
for_in_of_invalid_element_type
The type '{0}' used in the 'for' loop must implement '{1}' with a type argument that can be assigned to '{2}'.
Learn more
for_in_of_invalid_type
The type '{0}' used in the 'for' loop must implement '{1}'.
Learn more
for_in_with_const_variable
A for-in loop variable can't be a 'const'.
Learn more
function_type_default_value
Can't have a default value in a function type.
function_typed_parameter_var
Function-typed parameters can't specify 'const', 'final' or 'var' in place of a return type.
generator_returns_value
'sync*' and 'async*' can't return a value.
generic_function_type_as_type_argument_through_typedef
Generic function type '{0}' used as a type argument through typedef '{1}'.
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.
generic_function_type_in_bound
Type variables can't have generic function types in their bounds.
generic_function_type_inferred_as_actual_type_argument
Generic function type '{0}' inferred as a type argument.
generic_function_type_used_as_actual_type_argument
A generic function type can't be used as a type argument.
generic_method_type_instantiation_on_dynamic
A method tear-off on a receiver whose type is 'dynamic' can't have type arguments.
Learn more
generic_struct_subclass
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}'.
getter_not_found
Getter not found: '{0}'.
getter_not_subtype_setter_types
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_formals
A getter can't have formal parameters.
getter_with_parameters
Getters must be declared without a parameter list.
hack
{0}
hash_and_equals
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.
illegal_async_generator_return_type
Functions marked 'async*' must have a return type assignable to 'Stream'. Functions marked 'async*' must have a return type that is a supertype of 'Stream' for some type 'T'.
Learn more
illegal_async_generator_void_return_type
Functions marked 'async*' can't have return type 'void'.
illegal_async_return_type
Functions marked 'async' must have a return type assignable to 'Future'. Functions marked 'async' must have a return type which is a supertype of 'Future'.
Learn more
illegal_character
Illegal character '{0}'.
illegal_concrete_enum_member
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
illegal_enum_values
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_mixin
The type '{0}' can't be mixed in.
illegal_mixin_due_to_constructors
Can't use '{0}' as a mixin because it has constructors.
illegal_mixin_due_to_constructors_cause
This constructor prevents using '{0}' as a mixin.
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}'.
illegal_sync_generator_return_type
Functions marked 'sync*' must have a return type assignable to 'Iterable'. Functions marked 'sync*' must have a return type that is a supertype of 'Iterable' for some type 'T'.
Learn more
illegal_sync_generator_void_return_type
Functions marked 'sync*' can't have return type 'void'.
implement_multiple_extension_type_members
The extension type '{0}' can't inherit the member '{1}' from more than one extension type.
implement_non_extension_type_and_extension_type_member
The extension type '{0}' can't inherit the member '{1}' as both an extension type member and a non-extension type member.
implementation_imports
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.
implements_future_or
The type 'FutureOr' can't be used in an 'implements' clause.
implements_never
The type 'Never' can't be used in an 'implements' clause.
implements_non_class
Classes and mixins can only implement other classes and mixins.
Learn more
implements_repeated
'{0}' can only be implemented once.
Learn more
implements_super_class
'{0}' can't be used in both 'extends' and 'implements' clauses. '{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
implicit_call_of_non_method
Cannot invoke an instance of '{0}' because it declares 'call' to be something other than a method.
implicit_call_tearoffs
Implicit tear-off of the 'call' method.
toggle_on
Learn more
implicit_mixin_override
Applying the mixin '{0}' to '{1}' introduces an erroneous override of '{2}'.
implicit_reopen
The {0} '{1}' reopens '{2}' because it is not marked '{3}'.
toggle_on
implicit_return_null
A non-null value must be returned since the return type '{0}' doesn't allow null.
implicit_super_call_of_non_method
Cannot invoke super because it declares 'call' to be something other than a method.
implicit_super_initializer_missing_arguments
The implicitly called unnamed constructor from '{0}' has required parameters. The implicitly invoked unnamed constructor from '{0}' has required parameters.
Learn more
implicit_this_reference_in_initializer
The instance member '{0}' can't be accessed in an initializer.
Learn more
import_after_part
Import directives must precede part directives.
import_chain_context
The unavailable library '{0}' is imported through these packages: {1} Detailed import paths for (some of) the these imports: {2}
import_chain_context_simple
The unavailable library '{0}' is imported through these paths: {1}
import_deferred_library_with_load_function
The imported library defines a top-level function named 'loadLibrary' that is hidden by deferring this library.
Learn more
import_internal_library
The library '{0}' is internal and can't be imported.
Learn more
import_of_legacy_library_into_null_safe
The library '{0}' is legacy, and shouldn't be imported into a null safe library.
Learn more
import_of_non_library
The imported library '{0}' can't have a part-of directive.
Learn more
include_file_not_found
The URI '{0}' included in '{1}' can't be found when analyzing '{2}'.
Learn more
included_file_parse_error
{0} in {1}({2}..{3})
Learn more
included_file_warning
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}'.
incompatible_lint
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_redirectee_function_type
The constructor function type '{0}' isn't a subtype of '{1}'.
inconsistent_case_expression_types
Case expressions must have the same types, '{0}' isn't a '{1}'.
inconsistent_inheritance
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}').
inconsistent_language_version_override
Parts must have exactly the same language version override as the library.
Learn more
inconsistent_pattern_variable_logical_or
The variable '{0}' has a different type and/or finality in this branch of the logical-or pattern.
Learn more
incorrect_type_argument
Type argument '{0}' doesn't conform to the bound '{1}' of the type variable '{2}' on '{3}'.
incorrect_type_argument_inferred
Inferred type argument '{0}' doesn't conform to the bound '{1}' of the type variable '{2}' on '{3}'.
incorrect_type_argument_instantiation
Type argument '{0}' doesn't conform to the bound '{1}' of the type variable '{2}' on '{3}'.
incorrect_type_argument_instantiation_inferred
Inferred type argument '{0}' doesn't conform to the bound '{1}' of the type variable '{2}' on '{3}'.
incorrect_type_argument_qualified
Type argument '{0}' doesn't conform to the bound '{1}' of the type variable '{2}' on '{3}.{4}'.
incorrect_type_argument_qualified_inferred
Inferred type argument '{0}' doesn't conform to the bound '{1}' of the type variable '{2}' on '{3}.{4}'.
incorrect_type_argument_variable
This is the type variable whose bound isn't conformed to.
incremental_compiler_illegal_parameter
Illegal parameter name '{0}' found during expression compilation.
incremental_compiler_illegal_type_parameter
Illegal type parameter name '{0}' found during expression compilation.
index_out_of_bound_in_record_index_get
Index {0} is out of range 0..{1} of positional fields of records {2}.
inference_failure_on_collection_literal
The type argument(s) of '{0}' can't be inferred.
Learn more
inference_failure_on_function_invocation
The type argument(s) of the function '{0}' can't be inferred.
Learn more
inference_failure_on_function_return_type
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.
inference_failure_on_uninitialized_variable
The type of '{0}' can't be inferred without either a type or initializer.
Learn more
inference_failure_on_untyped_parameter
The type of '{0}' can't be inferred; a type must be explicitly provided.
Learn more
inherited_members_conflict
Can't inherit members that conflict with each other.
inherited_members_conflict_cause1
This is one inherited member.
inherited_members_conflict_cause2
This is the other inherited member.
inherited_restricted_member_of_enum_implementer
A concrete instance member named '{0}' can't be inherited from '{1}' in a class that implements 'Enum'.
initialize_from_dill_not_self_contained
Tried to initialize from a previous compilation ({0}), but the file was not self-contained. This might be a bug. The Dart team would greatly appreciate it if you would take a moment to report this problem at http://dartbug.com/new. If you are comfortable with it, it would improve the chances of fixing any bug if you included the file {1} in your error report, but be aware that this file includes your source code. Either way, you should probably delete the file so it doesn't use unnecessary disk space.
initialize_from_dill_not_self_contained_no_dump
Tried to initialize from a previous compilation ({0}), but the file was not self-contained. This might be a bug. The Dart team would greatly appreciate it if you would take a moment to report this problem at http://dartbug.com/new.
initialize_from_dill_unknown_problem
Tried to initialize from a previous compilation ({0}), but couldn't. Error message was '{1}'. Stacktrace included '{2}'. This might be a bug. The Dart team would greatly appreciate it if you would take a moment to report this problem at http://dartbug.com/new. If you are comfortable with it, it would improve the chances of fixing any bug if you included the file {3} in your error report, but be aware that this file includes your source code. Either way, you should probably delete the file so it doesn't use unnecessary disk space.
initialize_from_dill_unknown_problem_no_dump
Tried to initialize from a previous compilation ({0}), but couldn't. Error message was '{1}'. Stacktrace included '{2}'. This might be a bug. The Dart team would greatly appreciate it if you would take a moment to report this problem at http://dartbug.com/new.
initialized_variable_in_for_each
The loop variable in a for-each loop can't be initialized.
initializer_for_non_existent_field
'{0}' isn't a field in the enclosing class.
Learn more
initializer_for_static_field
'{0}' is a static field in the enclosing class. Fields initialized in a constructor can't be static. '{0}' isn't an instance field of this class.
Learn more
initializing_formal_for_non_existent_field
'{0}' isn't a field in the enclosing class.
Learn more
initializing_formal_type_mismatch
The type of parameter '{0}', '{1}' is not a subtype of the corresponding field's type, '{2}'.
initializing_formal_type_mismatch_field
The field that corresponds to the parameter.
input_file_not_found
Input file not found: {0}.
instance_access_to_static_member
The static {0} '{1}' can't be accessed through an instance.
Learn more
instance_and_synthesized_static_conflict
This instance member conflicts with the synthesized static member called '{0}'.
instance_conflicts_with_static
Instance property '{0}' conflicts with static property of the same name.
instance_conflicts_with_static_cause
Conflicting static property '{0}'.
instance_member_access_from_factory
Instance members can't be accessed from a factory constructor.
Learn more
instance_member_access_from_static
Instance members can't be accessed from a static method.
Learn more
instantiate_abstract_class
Abstract classes can't be instantiated.
Learn more
instantiate_enum
Enums can't be instantiated.
Learn more
instantiate_type_alias_expands_to_type_parameter
Type aliases that expand to a type parameter can't be instantiated.
Learn more
instantiation_non_generic_function_type
The static type of the explicit instantiation operand must be a generic function type but is '{0}'.
instantiation_nullable_generic_function_type
The static type of the explicit instantiation operand must be a non-null generic function type but is '{0}'.
instantiation_too_few_arguments
Too few type arguments: {0} required, {1} given.
instantiation_too_many_arguments
Too many type arguments: {0} allowed, but {1} found.
integer_literal_imprecise_as_double
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
integer_literal_is_out_of_range
The integer literal {0} can't be represented in 64 bits.
integer_literal_out_of_range
The integer literal {0} can't be represented in 64 bits.
Learn more
interface_check
The implementation of '{0}' in the non-abstract class '{1}' does not conform to its interface.
interface_class_extended_outside_of_library
The class '{0}' can't be extended outside of its library because it's an interface class.
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'.
internal_problem_already_initialized
Attempt to set initializer on field without initializer.
internal_problem_body_on_abstract_method
Attempting to set body on abstract method.
internal_problem_constructor_not_found
No constructor named '{0}' in '{1}'.
internal_problem_context_severity
Non-context message has context severity: {0}
internal_problem_debug_abort
Compilation aborted due to fatal '{0}' at: {1}
internal_problem_extending_unmodifiable_scope
Can't extend an unmodifiable scope.
internal_problem_label_usage_in_variables_declaration
Unexpected usage of label inside declaration of variables.
internal_problem_missing_context
Compiler cannot run without a compiler context.
internal_problem_not_found
Couldn't find '{0}'.
internal_problem_not_found_in
Couldn't find '{0}' in '{1}'.
internal_problem_omitted_type_name_in_constructor_reference
Unsupported omission of the type name in a constructor reference outside of an enum element declaration.
internal_problem_previous_token_not_found
Couldn't find previous token.
internal_problem_private_constructor_access
Can't access private constructor '{0}'.
internal_problem_provided_both_compile_sdk_and_sdk_summary
The compileSdk and sdkSummary options are mutually exclusive
internal_problem_stack_not_empty
{0}.stack isn't empty: {1}
internal_problem_unexpected
Expected '{0}', but got '{1}'.
internal_problem_unhandled
Unhandled {0} in {1}.
internal_problem_unimplemented
Unimplemented {0}.
internal_problem_unsupported
Unsupported operation: '{0}'.
internal_problem_unsupported_nullability
Unsupported nullability value '{0}' on type '{1}'.
internal_problem_uri_missing_scheme
The URI '{0}' has no scheme.
internal_problem_verification_error
Verification of the generated program failed: {0}
interpolation_in_uri
Can't use string interpolation in a URI.
invalid_annotation
Annotation must be either a const variable reference or const constructor invocation.
Learn more
invalid_annotation_constant_value_from_deferred_library
Constant values from a deferred library can't be used in annotations.
Learn more
invalid_annotation_from_deferred_library
Constant values from a deferred library can't be used as annotations.
Learn more
invalid_annotation_target
The annotation '{0}' can only be used on {1}.
Learn more
invalid_assignment
A value of type '{0}' can't be assigned to a variable of type '{1}'.
Learn more
invalid_assignment_error
A value of type '{0}' can't be assigned to a variable of type '{1}'.
invalid_augment_super
'augment super' is only allowed in member augmentations.
invalid_await_for
The keyword 'await' isn't allowed for a normal 'for' statement.
invalid_await_not_required_annotation
The annotation 'awaitNotRequired' can only be applied to a Future-returning function, or a Future-typed field.
Learn more
invalid_break_target
Can't break to '{0}'.
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 expected type '{1}'. 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 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 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 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_local_function
The local function has type '{0}' that isn't of expected type '{1}'.
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_cast_static_method
The static method has type '{0}' that isn't of expected type '{1}'.
invalid_cast_top_level_function
The top level function has 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. The escape sequence starting with '\u' isn't a valid code point.
invalid_comment_reference
Comment references should contain a possibly prefixed identifier and can start with 'new', but shouldn't contain anything else.
invalid_constant
Invalid constant value.
invalid_constant_pattern_binary
The binary operator {0} is not supported as a constant pattern.
invalid_constant_pattern_const_prefix
The expression can't be prefixed by 'const' to form 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_continue_target
Can't continue at '{0}'.
invalid_covariant_modifier_in_primary_constructor
The 'covariant' modifier can only be used on non-final declaring parameters.
invalid_dependency
Publishable packages can't have '{0}' dependencies.
Learn more
invalid_deprecated_extend_annotation
The annotation '@Deprecated.extend' can only be applied to extendable classes.
Learn more
invalid_deprecated_implement_annotation
The annotation '@Deprecated.implement' can only be applied to implementable classes.
Learn more
invalid_deprecated_instantiate_annotation
The annotation '@Deprecated.instantiate' can only be applied to classes.
Learn more
invalid_deprecated_mixin_annotation
The annotation '@Deprecated.mixin' can only be applied to classes.
Learn more
invalid_deprecated_optional_annotation
The annotation '@Deprecated.optional' can only be applied to optional parameters.
Learn more
invalid_deprecated_subclass_annotation
The annotation '@Deprecated.subclass' can only be applied to subclassable classes and mixins.
Learn more
invalid_escape_started
The string '' can't stand alone.
invalid_exception_value
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
invalid_export_of_internal_element
The member '{0}' can't be exported as a part of a package's public API.
Learn more
invalid_export_of_internal_element_indirectly
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
invalid_extension_argument_count
Extension overrides must have exactly one argument: the value of 'this' in the extension method.
Learn more
invalid_extension_type_super_extension_type
The representation type '{0}' of extension type '{1}' must be either a subtype of the representation type '{2}' of the implemented extension type '{3}' or a subtype of '{3}' itself.
invalid_extension_type_super_interface
The implemented interface '{0}' must be a supertype of the representation type '{1}' of extension type '{2}'.
invalid_factory_method_decl
Factory method '{0}' must have a return type.
Learn more
invalid_factory_method_impl
Factory method '{0}' doesn't return a newly allocated object.
Learn more
invalid_factory_name_not_a_class
The name of a factory constructor must be the same as the name of the immediately enclosing class.
Learn more
invalid_field_name
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
invalid_field_type_in_struct
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_getter_setter_type
The type '{0}' of the getter '{1}' is not a subtype of the type '{2}' of the setter '{3}'.
invalid_getter_setter_type_both_inherited_field
The type '{0}' of the inherited field '{1}' is not a subtype of the type '{2}' of the inherited setter '{3}'.
invalid_getter_setter_type_both_inherited_getter
The type '{0}' of the inherited getter '{1}' is not a subtype of the type '{2}' of the inherited setter '{3}'.
invalid_getter_setter_type_field_context
This is the declaration of the field '{0}'.
invalid_getter_setter_type_field_inherited
The type '{0}' of the inherited field '{1}' is not a subtype of the type '{2}' of the setter '{3}'.
invalid_getter_setter_type_getter_context
This is the declaration of the getter '{0}'.
invalid_getter_setter_type_getter_inherited
The type '{0}' of the inherited getter '{1}' is not a subtype of the type '{2}' of the setter '{3}'.
invalid_getter_setter_type_setter_context
This is the declaration of the setter '{0}'.
invalid_getter_setter_type_setter_inherited_field
The type '{0}' of the field '{1}' is not a subtype of the type '{2}' of the inherited setter '{3}'.
invalid_getter_setter_type_setter_inherited_getter
The type '{0}' of the getter '{1}' is not a subtype of the type '{2}' of the inherited setter '{3}'.
invalid_hex_escape
An escape sequence starting with '\x' must be followed by 2 hexadecimal digits.
invalid_implementation_override
'{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.
invalid_inline_function_type
Inline function types can't be used for parameters in a generic function type. Inline function types cannot 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.
invalid_internal_annotation
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}'.
invalid_language_version_override
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
invalid_literal_annotation
Only const constructors can have the @literal annotation.
Learn more
invalid_literal_in_configuration
The literal in a configuration can't contain interpolation.
invalid_modifier_on_constructor
The modifier '{0}' can't be applied to the body of a constructor.
Learn more
invalid_modifier_on_setter
Setters can't use 'async', 'async*', or 'sync*'.
Learn more
invalid_non_virtual_annotation
The annotation '@nonVirtual' can only be applied to a concrete instance member.
Learn more
invalid_null_aware_operator
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_option
Invalid option specified for '{0}': {1}
Learn more
invalid_override
'{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
invalid_override_of_non_virtual_member
The member '{0}' is declared non-virtual in '{1}' and can't be overridden in subclasses.
Learn more
invalid_package_uri
Invalid package URI '{0}': {1}.
invalid_parameter_style
The parameter style must be one of the following: {0}.
invalid_pattern_variable_in_shared_case_scope
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
invalid_platforms_field
The 'platforms' field must be a map with platforms as keys.
Learn more
invalid_reference_to_generative_enum_constructor
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
Invalid reference to 'this' expression.
Learn more
invalid_reopen_annotation
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.
invalid_return
A value of type '{0}' can't be returned from a function with return type '{1}'.
invalid_return_async
A value of type '{0}' can't be returned from an async function with return type '{1}'.
invalid_return_type_for_catch_error
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
invalid_runtime_check_with_js_interop_types
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. 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.
toggle_on
Learn more
invalid_sealed_annotation
The annotation '@sealed' can only be applied to classes.
Learn more
invalid_section_format
Invalid format for the '{0}' section.
Learn more
invalid_star_after_async
The modifier 'async*' isn't allowed for an expression function body.
invalid_super_formal_parameter_location
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_sync_modifier
Invalid modifier 'sync'.
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())
invalid_type_argument_in_const_literal
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_type_parameter_in_supertype
Can't use implicitly 'out' variable '{0}' in an '{1}' position in supertype '{2}'.
invalid_type_parameter_in_supertype_with_variance
Can't use '{0}' type variable '{1}' in an '{2}' position in supertype '{3}'.
invalid_type_parameter_variance_position
Can't use '{0}' type variable '{1}' in an '{2}' position.
invalid_type_parameter_variance_position_in_return_type
Can't use '{0}' type variable '{1}' in an '{2}' position in the return type.
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
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.
invalid_use_of_do_not_submit_member
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.
invalid_use_of_internal_member
The member '{0}' can only be used within its package.
Learn more
invalid_use_of_null_aware_access
Cannot use '?.' here.
invalid_use_of_null_value
An expression whose value is always 'null' can't be dereferenced.
Learn more
invalid_use_of_protected_member
The member '{0}' can only be used within instance members of subclasses of '{1}'.
Learn more
invalid_use_of_type_outside_library
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
invalid_use_of_visible_for_overriding_member
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.
invalid_use_of_visible_for_testing_member
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}'.
invalid_visibility_annotation
The member '{0}' is annotated with '{1}', but this annotation is only meaningful on declarations of public members.
Learn more
invalid_visible_for_overriding_annotation
The annotation 'visibleForOverriding' can only be applied to a public instance member that can be overridden.
Learn more
invalid_visible_outside_template_annotation
The annotation 'visibleOutsideTemplate' can only be applied to a member of a class, enum, or mixin that is annotated with 'visibleForTemplate'.
Learn more
invalid_void
Type 'void' can't be used here.
invalid_widget_preview_application
The '@Preview(...)' annotation can only be applied to public, statically accessible constructors and functions.
Learn more
invalid_widget_preview_private_argument
'@Preview(...)' can only accept arguments that consist of literals and public symbols.
Learn more
invariant_booleans
toggle_on
invocation_of_extension_without_call
The extension '{0}' doesn't define a 'call' method so the override can't be used in an invocation.
Learn more
invocation_of_non_function
'{0}' isn't a function.
Learn more
invocation_of_non_function_expression
The expression doesn't evaluate to a function, so it can't be invoked.
Learn more
invoke_non_function
'{0}' isn't a function or method and can't be invoked.
iterable_contains_unrelated_type
toggle_on
join_return_with_assignment
Assignment could be inlined in 'return' statement.
toggle_on
joint_pattern_variable_not_in_all
The variable '{0}' is available in some, but not all cases that share this body.
joint_pattern_variable_with_label_default
The variable '{0}' is not available because there is a label or 'default' case.
joint_pattern_variables_mismatch
Variable pattern '{0}' doesn't have the same type or finality in all cases.
js_interop_dart_class_extends_j_s_class
Dart class '{0}' cannot extend JS interop class '{1}'.
js_interop_dart_js_interop_annotation_for_static_interop_only
The '@JS' annotation from 'dart:js_interop' can only be used for static interop, either through extension types or '@staticInterop' classes.
js_interop_enclosing_class_j_s_annotation
Member has a JS interop annotation but the enclosing class does not.
js_interop_enclosing_class_j_s_annotation_context
This is the enclosing class.
js_interop_export_class_not_marked_exportable
Class '{0}' does not have a @JSExport on it or any of its members.
js_interop_export_dart_interface_has_non_empty_j_s_export_value
The value in the @JSExport annotation on the class or mixin '{0}' will be ignored.
js_interop_export_disallowed_member
Member '{0}' is not a concrete instance member or declares type parameters, and therefore can't be exported.
js_interop_export_invalid_interop_type_argument
Type argument '{0}' needs to be a non-JS interop type.
js_interop_export_invalid_type_argument
Type argument '{0}' needs to be an interface type.
js_interop_export_member_collision
The following class members collide with the same export '{0}': {1}.
js_interop_export_no_exportable_members
Class '{0}' has no exportable members in the class or the inheritance chain.
js_interop_extension_type_member_not_interop
Extension type member is marked 'external', but the representation type of its extension type is not a valid JS interop type.
js_interop_extension_type_not_interop
Extension type '{0}' is marked with a '@JS' annotation, but its representation type is not a valid JS interop type: '{1}'.
js_interop_extension_type_used_with_wrong_js_annotation
Extension types should use the '@JS' annotation from 'dart:js_interop' and not from 'package:js'.
js_interop_external_extension_member_on_type_invalid
JS interop type or @Native type from an SDK web library required for 'external' extension members.
js_interop_external_extension_member_with_static_disallowed
External extension members with the keyword 'static' on JS interop and @Native types are disallowed.
js_interop_external_member_not_j_s_annotated
Only JS interop members may be 'external'.
js_interop_function_to_j_s_named_parameters
Functions converted via '{0}' cannot declare named parameters.
js_interop_function_to_j_s_requires_static_type
Functions converted via '{0}' require a statically known function type, but Type '{1}' is not a precise function type, e.g., void Function().
js_interop_function_to_j_s_type_parameters
Functions converted via '{0}' cannot declare type parameters.
js_interop_function_to_j_s_type_violation
Function converted via '{0}' contains invalid types in its function signature: '{1}'.
js_interop_invalid_static_class_member_name
JS interop static class members cannot have '.' in their JS name.
js_interop_is_a_invalid_type_variable
Type argument '{0}' provided to 'isA' cannot be a type variable and must be an interop extension type that can be determined at compile-time.
js_interop_is_a_object_literal_type
Type argument '{0}' has an object literal constructor. Because 'isA' uses the type's name or '@JS()' rename, this may result in an incorrect type check.
js_interop_is_a_primitive_extension_type
Type argument '{0}' wraps primitive JS type '{1}', which is specially handled using 'typeof'.
js_interop_is_a_tearoff
'isA' can't be torn off.
js_interop_j_s_class_extends_dart_class
JS interop class '{0}' cannot extend Dart class '{1}'.
js_interop_named_parameters
Named parameters for JS interop functions are only allowed in object literal constructors or @anonymous factories.
js_interop_native_class_in_annotation
Non-static JS interop class '{0}' conflicts with natively supported class '{1}' in '{2}'.
js_interop_non_external_constructor
JS interop classes do not support non-external constructors.
js_interop_non_external_member
This JS interop member must be annotated with external. Only factories and static methods can be non-external.
js_interop_non_static_with_static_interop_supertype
Class '{0}' does not have an @staticInterop annotation, but has supertype '{1}', which does.
js_interop_object_literal_constructor_positional_parameters
{0} should not contain any positional parameters.
js_interop_operator_cannot_be_renamed
JS interop operator methods cannot be renamed using the '@JS' annotation.
js_interop_operators_not_supported
JS interop types do not support overloading external operator methods, with the exception of '[]' and '[]=' using static interop.
js_interop_static_interop_external_accessor_type_violation
External JS interop member contains an invalid type: '{0}'.
js_interop_static_interop_external_function_type_violation
External JS interop member contains invalid types in its function signature: '{0}'.
js_interop_static_interop_generative_constructor
@staticInterop classes should not contain any generative constructors.
js_interop_static_interop_mock_missing_getter_or_setter
Dart class '{0}' has a {1}, but does not have a {2} to implement any of the following extension member(s) with export name '{3}': {4}.
js_interop_static_interop_mock_missing_implements
Dart class '{0}' does not have any members that implement any of the following extension member(s) with export name '{1}': {2}.
js_interop_static_interop_mock_not_static_interop_type
Type argument '{0}' needs to be a @staticInterop type.
js_interop_static_interop_mock_type_parameters_not_allowed
Type argument '{0}' has type parameters that do not match their bound. createStaticInteropMock requires instantiating all type parameters to their bound to ensure mocking conformance.
js_interop_static_interop_no_j_s_annotation
@staticInterop classes should also have the @JS annotation.
js_interop_static_interop_parameter_initializers_are_ignored
Initializers for parameters are ignored on static interop external functions.
js_interop_static_interop_synthetic_constructor
Synthetic constructors on @staticInterop classes can not be used.
js_interop_static_interop_tear_offs_disallowed
Tear-offs of external {0} '{1}' are disallowed.
js_interop_static_interop_trust_types_usage_not_allowed
JS interop class '{0}' has an @trustTypes annotation, but @trustTypes is only supported within the sdk.
js_interop_static_interop_trust_types_used_without_static_interop
JS interop class '{0}' has an @trustTypes annotation, but no @staticInterop annotation.
js_interop_static_interop_with_instance_members
JS interop class '{0}' with @staticInterop annotation cannot declare instance members.
js_interop_static_interop_with_non_static_supertype
JS interop class '{0}' has an @staticInterop annotation, but has supertype '{1}', which does not.
label_in_outer_scope
Can't reference label '{0}' declared in an outer method.
Learn more
label_not_found
Can't find label '{0}'.
label_undefined
Can't reference an undefined label '{0}'.
Learn more
language_version_invalid_in_dot_packages
The language version is not specified correctly in the packages file.
language_version_library_context
This is language version annotation in the library.
language_version_mismatch_in_part
The language version override has to be the same in the library and its part(s).
language_version_mismatch_in_patch
The language version override has to be the same in the library and its patch(es).
language_version_part_context
This is language version annotation in the part.
language_version_patch_context
This is language version annotation in the patch.
language_version_too_high_explicit
The specified language version {0}.{1} is too high. The highest supported language version is {2}.{3}.
language_version_too_high_package
The language version {0}.{1} specified for the package '{2}' is too high. The highest supported language version is {3}.{4}.
language_version_too_low_explicit
The specified language version {0}.{1} is too low. The lowest supported language version is {2}.{3}.
language_version_too_low_package
The language version {0}.{1} specified for the package '{2}' is too low. The lowest supported language version is {3}.{4}.
late_definitely_assigned_error
Late final variable '{0}' definitely assigned.
late_definitely_unassigned_error
Late variable '{0}' without initializer is definitely unassigned.
late_final_field_with_const_constructor
Can't have a late final field in a class with a generative const constructor.
Learn more
late_final_local_already_assigned
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
leaf_call_must_not_return_handle
FFI leaf call can't return a 'Handle'.
Learn more
leaf_call_must_not_take_handle
FFI leaf call can't take arguments of type 'Handle'.
Learn more
library_annotations
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.
library_names
The library name '{0}' isn't a lower_case_with_underscores identifier.
toggle_on
Learn more
library_prefixes
The prefix '{0}' isn't a lower_case_with_underscores identifier.
toggle_on
Learn more
library_private_types_in_public_api
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.
list_element_type_not_assignable
The element type '{0}' can't be assigned to the list type '{1}'.
Learn more
list_literal_too_many_type_arguments
List literal requires exactly one type argument.
list_pattern_too_many_type_arguments
A list pattern requires exactly one type argument.
list_remove_unrelated_type
toggle_on
literal_only_boolean_expressions
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'.
load_library_takes_no_arguments
'loadLibrary' takes no arguments.
local_function_declaration_modifier
Local function declarations can't specify any modifiers.
local_variable_used_before_declared
Local variable '{0}' can't be referenced before it is declared.
local_variable_used_before_declared_context
This is the declaration of the variable '{0}'.
main_first_positional_parameter_type
The type of the first positional parameter of the 'main' function must be a supertype of 'List'.
Learn more
main_has_required_named_parameters
The function 'main' can't have any required named parameters.
Learn more
main_has_too_many_required_positional_parameters
The function 'main' can't have more than two required positional parameters.
Learn more
main_is_not_function
The declaration named 'main' must be a function.
Learn more
main_not_function_declaration
The 'main' declaration must be a function declaration.
main_not_function_declaration_exported
The exported 'main' declaration must be a function declaration.
main_required_named_parameters
The 'main' method cannot have required named parameters.
main_required_named_parameters_exported
The exported 'main' method cannot have required named parameters.
main_too_many_required_parameters
The 'main' method must have at most 2 required parameters.
main_too_many_required_parameters_exported
The exported 'main' method must have at most 2 required parameters.
main_wrong_parameter_type
The type '{0}' of the first parameter of the 'main' method is not a supertype of '{1}'.
main_wrong_parameter_type_exported
The type '{0}' of the first parameter of the exported 'main' method is not a supertype of '{1}'.
map_entry_not_in_map
Map entries can only be used in a map literal.
Learn more
map_key_type_not_assignable
The element type '{0}' can't be assigned to the map key type '{1}'.
Learn more
map_pattern_type_argument_mismatch
A map pattern requires exactly two type arguments.
map_value_type_not_assignable
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_conflicts_with_constructor
The member conflicts with constructor '{0}'.
member_conflicts_with_constructor_cause
Conflicting constructor '{0}'.
member_conflicts_with_factory
The member conflicts with factory '{0}'.
member_conflicts_with_factory_cause
Conflicting factory '{0}'.
member_not_found
Member not found: '{0}'.
member_should_be_listed_as_callable_in_dynamic_interface
Cannot invoke member '{0}' from a dynamic module.
member_should_be_listed_as_can_be_overridden_in_dynamic_interface
Cannot override member '{0}.{1}' in a dynamic module.
member_with_same_name_as_class
A class member can't have the same name as the enclosing class.
metadata_space_before_parenthesis
Annotations can't have spaces or comments before the parenthesis.
metadata_type_arguments
An annotation can't use type arguments.
metadata_type_arguments_uninstantiated
An annotation with type arguments must be followed by an argument list.
method_not_found
Method not found: '{0}'.
mismatched_annotation_on_struct_field
The annotation doesn't match the declared type of the field.
Learn more
missing_annotation_on_struct_field
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_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.
missing_dart_library
Required library '{0}' is missing.
Learn more
missing_default_value_for_parameter
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_dependency
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_enum_constant_in_switch
Missing case clause for '{0}'.
Learn more
missing_exception_value
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_explicit_const
Constant expression expected.
missing_exponent
Numbers in exponential notation should always contain an exponent (an integer number with an optional sign).
missing_expression_in_initializer
Expected an expression after the assignment operator.
missing_expression_in_throw
Missing expression after 'throw'.
missing_field_type_in_struct
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
A function declaration needs an explicit list of 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_implementation_cause
'{0}' is defined here.
missing_implementation_not_abstract
The non-abstract class '{0}' is missing implementations for these members: {1}
missing_input
No input file provided to the compiler.
missing_key
Missing the required key '{0}'.
missing_main
No 'main' method found.
missing_method_parameters
A method declaration needs an explicit list of parameters. Methods must have an explicit list of parameters.
missing_name
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.
missing_named_pattern_field_name
The getter name is not specified explicitly, and the pattern is not a variable.
Learn more
missing_named_super_constructor_parameter
The super constructor has no corresponding named parameter.
missing_one_of_multiple_keys
Exactly one of the following keys must be provided: {0}.
missing_operator_keyword
Operator declarations must be preceded by the keyword 'operator'.
missing_override_of_must_be_overridden
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_part_of
Can't use '{0}' as a part, because it has no 'part of' declaration.
missing_positional_super_constructor_parameter
The super constructor has no corresponding positional parameter.
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 ").
missing_required_argument
The named parameter '{0}' is required, but there's no corresponding argument.
Learn more
missing_required_param
The parameter '{0}' is required. The parameter '{0}' is required. {1}.
Learn more
missing_return
This function has a return type of '{0}', but doesn't end with a return statement.
Learn more
missing_size_annotation_carray
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_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
A typedef needs an explicit list of 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.
missing_variable_pattern
Variable pattern '{0}' is missing in this branch of the logical-or pattern.
Learn more
missing_whitespace_between_adjacent_strings
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_concrete_super_invoked_member_type
The super-invoked member '{0}' has the type '{1}', and the concrete member in the class has the type '{2}'.
Learn more
mixin_application_incompatible_supertype
'{0}' doesn't implement '{1}' so it can't be used with '{2}'.
mixin_application_no_concrete_getter
The class doesn't have a concrete implementation of the super-accessed member '{0}'.
mixin_application_no_concrete_member_context
This is the super-access that doesn't have a concrete target.
mixin_application_no_concrete_method
The class doesn't have a concrete implementation of the super-invoked member '{0}'.
mixin_application_no_concrete_setter
The class doesn't have a concrete implementation of the super-accessed setter '{0}'.
mixin_application_no_concrete_super_invoked_member
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
mixin_application_not_implemented_interface
'{0}' can't be mixed onto '{1}' because '{1}' doesn't implement '{2}'.
Learn more
mixin_class_declaration_extends_not_object
The class '{0}' can't be declared a mixin because it extends a class other than 'Object'.
Learn more
mixin_class_declares_constructor
The class '{0}' can't be used as a mixin because it declares a constructor.
Learn more
mixin_declares_constructor
Mixins can't declare constructors.
mixin_deferred_mixin
Classes can't mix in deferred mixins.
mixin_inference_no_matching_class
Type parameters couldn't be inferred for the mixin '{0}' because '{1}' does not implement the mixin's supertype constraint '{2}'.
mixin_inherits_from_not_object
The class '{0}' can't be used as a mixin because it extends a class other than 'Object'.
Learn more
mixin_instantiate
Mixins can't be instantiated.
Learn more
mixin_of_non_class
Classes can only mix in mixins and classes.
Learn more
mixin_on_sealed_class
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_subtype_of_base_is_not_base
The mixin '{0}' must be 'base' because the supertype '{1}' is 'base'.
mixin_subtype_of_final_is_not_base
The mixin '{0}' must be 'base' because the supertype '{1}' is 'final'.
mixin_super_class_constraint_deferred_class
Deferred classes can't be used as superclass constraints.
Learn more
mixin_super_class_constraint_non_interface
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}'.
more_than_one_super_initializer
Can't have more than one 'super' initializer.
multiple_clauses
Each '{0}' definition can have at most one '{1}' clause.
multiple_combinators
Using multiple 'hide' or 'show' combinators is never necessary and often produces surprising results.
Learn more
multiple_extends
Each class definition can have at most one extends clause.
multiple_implements
Each class definition can have at most one implements 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_plugins
Multiple plugins can't be enabled.
multiple_positional_parameter_groups
Can't have multiple groups of positional parameters in a single parameter list.
multiple_primary_constructor_body_declarations
Only one primary constructor body declaration is allowed.
multiple_redirecting_constructor_invocations
Constructors can have only one 'this' redirection, at most.
Learn more
multiple_representation_fields
Each extension type should have exactly one representation field.
multiple_super_initializers
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
Each class definition can have at most one with clause.
must_be_a_native_function_type
The type '{0}' given to '{1}' must be a valid 'dart:ffi' native function type.
Learn more
must_be_a_subtype
The type '{0}' must be a subtype of '{1}' for '{2}'.
Learn more
must_be_immutable
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
must_call_super
This method overrides a method annotated as '@mustCallSuper' in '{0}', but doesn't invoke the overridden method.
Learn more
must_return_void
The return type of the function passed to 'NativeCallable.listener' must be 'void' rather than '{0}'.
Learn more
name_not_found
Undefined name '{0}'.
name_not_found_in_record_name_get
Field name {0} isn't found in records of type {1}.
name_not_string
The value of the 'name' field is required to be a string.
Learn more
named_field_clashes_with_positional_field_in_record
Record field names can't be a dollar sign followed by an integer when integer is the index of a positional field.
named_function_expression
A function expression can't have a name. Function expressions can't be named.
named_function_type
Function types can't be named.
named_mixin_override
The mixin application class '{0}' introduces an erroneous override of '{1}'.
named_parameter_outside_group
Named parameters must be enclosed in curly braces ('{' and '}').
named_parameters_in_extension_type_declaration
Extension type declarations can't have named parameters.
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.
native_field_invalid_type
'{0}' is an unsupported type for native fields. Native fields only support pointers, arrays or numeric and compound types.
Learn more
native_field_missing_type
The native type of this field could not be inferred and must be specified in the annotation.
Learn more
native_field_not_static
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.
native_function_missing_type
The native type of this function couldn't be inferred so it must be specified in the annotation.
Learn more
negative_variable_dimension
The variable dimension of a variable-length array must be non-negative.
Learn more
never_reachable_switch_default_error
null encountered as case in a switch expression with a non-nullable enum type.
never_reachable_switch_expression_error
null encountered as case in a switch expression with a non-nullable type.
never_reachable_switch_statement_error
null encountered as case in a switch statement with a non-nullable type.
never_value_error
null encountered as the result from expression with type Never.
new_as_selector
'new' can only be used as a constructor reference.
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}'.
new_with_undefined_constructor_default
The class '{0}' doesn't have an unnamed constructor.
Learn more
no_adjacent_strings_in_list
Don't use adjacent strings in a list literal.
toggle_on
Learn more
no_annotation_constructor_arguments
Annotation creation must have arguments.
Learn more
no_augment_super_invoke_target
Cannot call 'augment super'.
no_augment_super_read_target
Cannot read from 'augment super'.
no_augment_super_write_target
Cannot write to 'augment super'.
no_combined_super_signature
Can't infer missing types in '{0}' from overridden methods: {1}.
Learn more
no_default_cases
Invalid use of 'default' member in a switch.
toggle_on
no_default_super_constructor
The superclass '{0}' doesn't have a zero argument constructor.
no_duplicate_case_values
The value of the case clause ('{0}') is equal to the value of an earlier case clause ('{1}').
toggle_on
Learn more
no_generative_constructors_in_superclass
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
no_leading_underscores_for_library_prefixes
The library prefix '{0}' starts with an underscore.
toggle_on
Learn more
no_leading_underscores_for_local_identifiers
The local variable '{0}' starts with an underscore.
toggle_on
Learn more
no_literal_bool_comparisons
Unnecessary comparison to a boolean literal.
toggle_on
no_logic_in_create_state
Don't put any logic in 'createState'.
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_such_named_parameter
No named parameter with the name '{0}'.
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.
no_unnamed_constructor_in_object
'Object' has no unnamed constructor.
no_wildcard_variable_uses
The referenced identifier is a wildcard.
toggle_on
Learn more
non_abstract_class_inherits_abstract_member
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
non_ascii_identifier
The non-ASCII character '{0}' ({1}) can't be used in identifiers, only in strings and comments.
non_ascii_whitespace
The non-ASCII space character {0} can only be used in strings and comments.
non_augmentation_declaration_conflict_cause
This is the existing declaration.
non_augmentation_member_conflict_cause
This is the existing member.
non_bool_condition
Conditions must have a static type of 'bool'.
Learn more
non_bool_expression
The expression in an assert must be of type 'bool'.
Learn more
non_bool_negation_expression
A negation operand must have a static type of 'bool'.
Learn more
non_bool_operand
The operands of the operator '{0}' must be assignable to 'bool'.
Learn more
non_const_argument_for_const_parameter
Argument '{0}' must be a constant.
Learn more
non_const_call_to_literal_constructor
This instance creation must be 'const', because the {0} constructor is marked as '@literal'.
Learn more
non_const_constructor
Cannot invoke a non-'const' constructor where a const expression is expected.
non_const_factory
Cannot invoke a non-'const' factory where a const expression is expected.
non_const_generative_enum_constructor
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.
non_constant_annotation_constructor
Annotation creation can only call a const constructor.
Learn more
non_constant_case_expression
Case expressions must be constant.
Learn more
non_constant_case_expression_from_deferred_library
Constant values from a deferred library can't be used as a case expression.
Learn more
non_constant_default_value
The default value of an optional parameter must be constant.
Learn more
non_constant_default_value_from_deferred_library
Constant values from a deferred library can't be used as a default parameter value.
Learn more
non_constant_identifier_names
The variable name '{0}' isn't a lowerCamelCase identifier.
toggle_on
Learn more
non_constant_list_element
The values in a const list literal must be constants.
Learn more
non_constant_map_element
The elements in a const map literal must be constant.
Learn more
non_constant_map_key
The keys in a const map literal must be constant.
Learn more
non_constant_map_pattern_key
Key expressions in map patterns must be constants.
Learn more
non_constant_map_value
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.
non_constant_relational_pattern_expression
The relational pattern expression must be a constant.
Learn more
non_constant_set_element
The values in a const set literal must be constants.
Learn more
non_constant_type_argument
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.
non_covariant_type_parameter_in_representation_type
An extension type parameter can't be used non-covariantly in its representation type.
non_covariant_type_parameter_position_in_representation_type
An extension type parameter can't be used in a non-covariant position of its representation type.
Learn more
non_exhaustive_switch_expression
The enum '{0}' isn't exhaustively matched by the switch cases because some of the enum constants are private. The type '{0}' is not exhaustively matched by the switch cases since it doesn't match '{1}'. The type '{0}' isn't exhaustively matched by the switch cases since it doesn't match the pattern '{1}'.
Learn more
non_exhaustive_switch_statement
The enum '{0}' isn't exhaustively matched by the switch cases because some of the enum constants are private. The type '{0}' is not exhaustively matched by the switch cases since it doesn't match '{1}'. The type '{0}' isn't exhaustively matched by the switch cases since it doesn't match the pattern '{1}'.
Learn more
non_extension_type_member_context
This is the inherited non-extension type member.
non_extension_type_member_one_of_context
This is one of the inherited non-extension type members.
non_final_field_in_enum
Enums can only declare final fields.
Learn more
non_generative_constructor
The generative constructor '{0}' is expected, but a factory was found.
Learn more
non_generative_implicit_constructor
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.
non_native_function_type_argument_to_pointer
Can't invoke 'asFunction' because the function signature '{0}' for the pointer isn't a valid C function signature.
Learn more
non_null_aware_spread_is_null
Can't spread a value with static type '{0}'.
non_nullable_equals_parameter
The parameter type of '==' operators should be non-nullable.
Learn more
non_nullable_not_assigned_error
Non-nullable variable '{0}' must be assigned before it can be used.
non_part_of_directive_in_part
The part-of directive must be the only directive in a part.
non_positive_array_dimension
Array dimensions must be positive numbers.
Learn more
non_positive_array_dimensions
Array dimensions must be positive numbers.
non_redirecting_generative_constructor_with_primary
Classes with primary constructors can't have non-redirecting generative constructors.
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
non_simple_bound_via_reference
Bound of this variable references raw type '{0}'.
non_simple_bound_via_variable
Bound of this variable references variable '{0}' from the same declaration.
non_sized_type_argument
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.
non_sync_factory
Factory bodies can't use 'async', 'async*', or 'sync*'.
Learn more
non_type_as_type_argument
The name '{0}' isn't a type, so it can't be used as a type argument.
Learn more
non_type_in_catch_clause
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.
non_void_return_for_operator
The return type of the operator []= must be 'void'.
Learn more
non_void_return_for_setter
The return type of the setter must be 'void' or absent.
Learn more
non_void_return_operator
The return type of the operator []= must be 'void'.
non_void_return_setter
The return type of the setter must be 'void' or absent.
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.
not_a_constant_expression
Not a constant expression.
not_a_prefix_in_type_annotation
'{0}.{1}' can't be used as a type because '{0}' doesn't refer to an import prefix.
not_a_type
'{0}' isn't a type. {0} isn't a type.
Learn more
not_a_type_context
This isn't a type.
not_an_lvalue
Can't assign to this.
not_assigned_potentially_non_nullable_local_variable
The non-nullable local variable '{0}' must be assigned before it can be used.
Learn more
not_binary_operator
'{0}' isn't a binary operator.
Learn more
not_constant_expression
{0} is not a constant expression.
not_enough_positional_arguments
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
not_initialized_non_nullable_instance_field
Non-nullable instance field '{0}' must be initialized.
Learn more
not_initialized_non_nullable_variable
The non-nullable variable '{0}' must be initialized.
Learn more
not_instantiated_bound
Type parameter bound types must be instantiated.
not_iterable_spread
Spread elements in list or set literals must implement 'Iterable'.
Learn more
not_map_spread
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.
null_argument_to_non_null_type
'{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.
null_check_always_fails
This null-check will always throw an exception because the expression will always evaluate to 'null'.
Learn more
null_check_on_nullable_type_parameter
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
nullable_expression_call_error
Can't use an expression of type '{0}' as a function because it's potentially null.
nullable_interface_error
Can't implement '{0}' because it's nullable.
nullable_method_call_error
Method '{0}' cannot be called on '{1}' because it is potentially null.
nullable_mixin_error
Can't mix '{0}' in because it's nullable.
nullable_operator_call_error
Operator '{0}' cannot be called on '{1}' because it is potentially null.
nullable_property_access_error
Property '{0}' cannot be accessed on '{1}' because it is potentially null.
nullable_spread_error
An expression whose value can be 'null' must be null-checked before it can be dereferenced.
nullable_superclass_error
Can't extend '{0}' because it's nullable.
nullable_tearoff_error
Can't tear off method '{0}' from a potentially null value.
nullable_type_in_catch_clause
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_type_in_extends_clause
A class can't extend a nullable type.
Learn more
nullable_type_in_implements_clause
A class, mixin, or extension type can't implement a nullable type.
Learn more
nullable_type_in_on_clause
A mixin can't have a nullable type as a superclass constraint.
Learn more
nullable_type_in_with_clause
A class or mixin can't mix in a nullable type.
Learn more
object_cannot_extend_another_class
The class 'Object' can't extend any other class.
object_extends
The class 'Object' can't have a superclass.
object_implements
The class 'Object' can't implement anything.
object_member_name_used_for_record_field
Record field names can't be the same as a member from 'Object'.
object_mixes_in
The class 'Object' can't use mixins.
obsolete_colon_for_default_value
Using a colon as a separator before a default value is no longer supported. 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
on_repeated
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
only_throw_errors
Don't throw instances of classes that don't extend either 'Exception' or 'Error'.
toggle_on
Learn more
only_try
A try block must be followed by an 'on', 'catch', or 'finally' clause.
operator_minus_parameter_mismatch
Operator '{0}' should have zero or one parameter.
operator_parameter_mismatch0
Operator '{0}' shouldn't have any parameters.
operator_parameter_mismatch1
Operator '{0}' should have exactly one parameter.
operator_parameter_mismatch2
Operator '{0}' should have exactly two parameters.
operator_with_optional_formals
An operator can't have optional parameters.
operator_with_type_parameters
Types parameters aren't allowed when defining an operator.
optional_non_nullable_without_initializer_error
The parameter '{0}' can't have a value of 'null' because of its type '{1}', but the implicit default value is 'null'.
optional_parameter_in_operator
Optional parameters aren't allowed when defining an operator.
Learn more
optional_parameters_in_extension_type_declaration
Extension type declarations can't have optional parameters.
optional_super_parameter_without_initializer
Type '{0}' of the optional super-initializer parameter '{1}' doesn't allow 'null', but the parameter doesn't have a default value, and the default value can't be copied from the corresponding parameter of the super constructor.
out_of_order_clauses
The '{0}' clause must come before the '{1}' clause.
overridden_fields
Field overrides a field inherited from '{0}'.
toggle_on
Learn more
overridden_method_cause
This is the overridden method ('{0}').
override_fewer_named_arguments
The method '{0}' has fewer named arguments than those of overridden method '{1}'.
override_fewer_positional_arguments
The method '{0}' has fewer positional arguments than those of overridden method '{1}'.
override_mismatch_named_parameter
The method '{0}' doesn't have the named parameter '{1}' of overridden method '{2}'.
override_mismatch_required_named_parameter
The required named parameter '{0}' in method '{1}' is not required in overridden method '{2}'.
override_more_required_arguments
The method '{0}' has more required arguments than those of overridden method '{1}'.
override_on_non_overriding_member
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
override_type_mismatch_parameter
The parameter '{0}' of the method '{1}' has type '{2}', which does not match the corresponding type, '{3}', in the overridden method, '{4}'.
override_type_mismatch_return_type
The return type of the method '{0}' is '{1}', which does not match the return type, '{2}', of the overridden method, '{3}'.
override_type_mismatch_setter
The field '{0}' has type '{1}', which does not match the corresponding type, '{2}', in the overridden setter, '{3}'.
override_type_parameters_bound_mismatch
Declared bound '{0}' of type variable '{1}' of '{2}' doesn't match the bound '{3}' on overridden method '{4}'.
override_type_parameters_mismatch
Declared type variables of '{0}' doesn't match those on overridden method '{1}'.
package_api_docs
Missing documentation for public API.
toggle_on
package_names
The package name '{0}' isn't a lower_case_with_underscores identifier.
toggle_on
Learn more
package_not_found
Couldn't resolve the package '{0}' in '{1}'.
package_prefixed_library_names
The library name is not a dot-separated path prefixed by the package name.
toggle_on
Learn more
packages_file_format
Problem in packages configuration file: {0}
packed_annotation
Structs must have at most one 'Packed' annotation.
Learn more
packed_annotation_alignment
Only packing to 1, 2, 4, 8, and 16 bytes is supported.
Learn more
parameter_assignments
Invalid assignment to the parameter '{0}'.
toggle_on
parse_error
{0}
Learn more
part_export
Can't export this file because it contains a 'part of' declaration.
part_export_context
This is the file that can't be exported.
part_in_part
A file that's a part of a library can't have parts itself.
part_in_part_library_context
This is the containing library.
part_of_different_library
Expected this library to be part of '{0}', not '{1}'.
Learn more
part_of_in_library
Can't import '{0}', because it has a 'part of' declaration.
part_of_library_name_mismatch
Using '{0}' as part of '{1}' but its 'part of' declaration says '{2}'.
part_of_name
The 'part of' directive can't use a name with the enhanced-parts feature.
part_of_non_part
The included part '{0}' must have a part-of directive.
Learn more
part_of_self
A file can't be a part of itself.
part_of_twice
Only one part-of directive may be declared in a file.
part_of_two_libraries
A file can't be part of more than one library.
part_of_two_libraries_context
Used as a part in this library.
part_of_unnamed_library
The library is unnamed. A URI is expected, not a library name '{0}', in the part-of directive.
Learn more
part_of_uri_mismatch
Using '{0}' as part of '{1}' but its 'part of' declaration says '{2}'.
part_of_use_uri
Using '{0}' as part of '{1}' but its 'part of' declaration says '{2}'.
part_orphan
This part doesn't have a containing library.
part_twice
Can't use '{0}' as a part more than once.
part_with_library_directive
A part cannot have a library directive.
patch_class_origin
This is the origin class.
patch_class_type_parameters_mismatch
A patch class must have the same number of type variables as its origin class.
patch_declaration_origin
This is the origin declaration.
patch_extension_origin
This is the origin extension.
patch_extension_type_parameters_mismatch
A patch extension must have the same number of type variables as its origin extension.
patch_injection_failed
Can't inject public '{0}' into '{1}'.
path_does_not_exist
The path '{0}' doesn't exist.
Learn more
path_not_posix
The path '{0}' isn't a POSIX-style path.
Learn more
path_pubspec_does_not_exist
The directory '{0}' doesn't contain a pubspec.
Learn more
pattern_assignment_declares_variable
Variable '{0}' can't be declared in a pattern assignment.
pattern_assignment_not_local_variable
Only local variables can be assigned in pattern assignments. Only local variables or formal parameters can be used in pattern assignments.
Learn more
pattern_constant_from_deferred_library
Constant values from a deferred library can't be used in patterns.
Learn more
pattern_matching_error
Pattern matching error
pattern_never_matches_value_type
The matched value type '{0}' can never match the required type '{1}'.
Learn more
pattern_type_mismatch_in_irrefutable_context
The matched value of type '{0}' isn't assignable to the required type '{1}'.
Learn more
pattern_variable_assignment_inside_guard
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,
platform_private_library_access
Can't access platform private library.
platform_value_disallowed
Keys in the platforms field can't have values.
Learn more
plugins_in_inner_options
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
Place positional arguments before named arguments. Positional arguments must occur before named arguments.
positional_field_in_object_pattern
Object patterns can only use named fields.
Learn more
positional_parameter_outside_group
Positional parameters must be enclosed in square brackets ('[' and ']').
positional_parameter_with_equals
Positional optional parameters can't use ':' to specify a default value.
positional_super_formal_parameter_with_positional_argument
Positional super parameters can't be used when the super constructor invocation has a positional argument.
Learn more
positional_super_parameters_and_arguments
Positional super-initializer parameters cannot be used when the super initializer has positional arguments.
prefer_adjacent_string_concatenation
String literals shouldn't be concatenated by the '+' operator.
toggle_on
Learn more
prefer_asserts_in_initializer_lists
Assert should be in the initializer list.
toggle_on
Learn more
prefer_asserts_with_message
Missing a message in an assert.
toggle_on
Learn more
prefer_bool_in_asserts
toggle_on
prefer_collection_literals
Unnecessary constructor invocation.
toggle_on
Learn more
prefer_conditional_assignment
The 'if' statement could be replaced by a null-aware assignment.
toggle_on
Learn more
prefer_const_constructors
Use 'const' with the constructor to improve performance.
toggle_on
Learn more
prefer_const_constructors_in_immutables
Constructors in '@immutable' classes should be declared as 'const'.
toggle_on
Learn more
prefer_const_declarations
Use 'const' for final variables initialized to a constant value.
toggle_on
Learn more
prefer_const_literals_to_create_immutables
Use 'const' literals as arguments to constructors of '@immutable' classes.
toggle_on
Learn more
prefer_constructors_over_static_methods
Static method should be a constructor.
toggle_on
Learn more
prefer_contains
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
prefer_double_quotes
Unnecessary use of single quotes.
toggle_on
Learn more
prefer_equal_for_default_values
toggle_on
prefer_expression_function_bodies
Unnecessary use of a block function body.
toggle_on
Learn more
prefer_final_fields
The private field {0} could be 'final'.
toggle_on
Learn more
prefer_final_in_for_each
The pattern should be final. The variable '{0}' should be final.
toggle_on
Learn more
prefer_final_locals
Local variables should be final.
toggle_on
Learn more
prefer_final_parameters
The parameter '{0}' should be final.
toggle_on
Learn more
prefer_for_elements_to_map_fromiterable
Use 'for' elements when building maps from iterables.
toggle_on
Learn more
prefer_foreach
Use 'forEach' and a tear-off rather than a 'for' loop to apply a function to every element.
toggle_on
Learn more
prefer_function_declarations_over_variables
Use a function declaration rather than a variable assignment to bind a function to a name.
toggle_on
Learn more
prefer_generic_function_type_aliases
Use the generic function type syntax in 'typedef's.
toggle_on
Learn more
prefer_if_elements_to_conditional_expressions
Use an 'if' element to conditionally add elements.
toggle_on
prefer_if_null_operators
Use the '??' operator rather than '?:' when testing for 'null'.
toggle_on
Learn more
prefer_initializing_formals
Use an initializing formal to assign a parameter to a field.
toggle_on
Learn more
prefer_inlined_adds
The addition of a list item could be inlined. The addition of multiple list items could be inlined.
toggle_on
Learn more
prefer_int_literals
Unnecessary use of a 'double' literal.
toggle_on
prefer_interpolation_to_compose_strings
Use interpolation to compose strings and values.
toggle_on
Learn more
prefer_is_empty
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
prefer_is_not_empty
Use 'isNotEmpty' rather than negating the result of 'isEmpty'.
toggle_on
Learn more
prefer_is_not_operator
Use the 'is!' operator rather than negating the value of the 'is' operator.
toggle_on
Learn more
prefer_iterable_wheretype
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
prefer_null_aware_operators
Use the null-aware operator '?.' rather than an explicit 'null' comparison.
toggle_on
Learn more
prefer_relative_imports
Use relative imports for files in the 'lib' directory.
toggle_on
Learn more
prefer_single_quotes
Unnecessary use of double quotes.
toggle_on
Learn more
prefer_spread_collections
The addition of multiple elements could be inlined.
toggle_on
prefer_typing_uninitialized_variables
An uninitialized field should have an explicit type annotation. An uninitialized variable should have an explicit type annotation.
toggle_on
Learn more
prefer_void_to_null
Unnecessary use of the type 'Null'.
toggle_on
Learn more
prefix_after_combinator
The prefix ('as' clause) should come before any show/hide combinators.
prefix_collides_with_top_level_member
The name '{0}' is already used as an import prefix and can't be used to name a top-level element.
Learn more
prefix_identifier_not_followed_by_dot
The name '{0}' refers to an import prefix, so it must be followed by '.'.
Learn more
prefix_shadowed_by_local_declaration
The prefix '{0}' can't be used here because it's shadowed by a local declaration.
Learn more
primary_constructor_body_without_declaration
A primary constructor body requires a primary constructor declaration.
primary_constructor_cannot_redirect
A primary constructor can't be a redirecting constructor.
private_collision_in_mixin_application
The private name '{0}', defined by '{1}', conflicts with the same name defined by '{2}'.
Learn more
private_named_non_field_parameter
A named parameter that doesn't refer to an instance variable can't start with an underscore ('_'). Named parameters that don't refer to instance variables can't start with underscore.
Learn more
private_named_parameter
A named parameter can't start with an underscore ('_').
private_named_parameter_duplicate_public_name
The corresponding public name '{0}' is already the name of another parameter.
Learn more
private_named_parameter_without_public_name
A private named parameter must be a public identifier after removing the leading underscore. A private named parameter must have a corresponding public name.
Learn more
private_optional_parameter
Named parameters can't start with an underscore.
Learn more
private_setter
The setter '{0}' is private and can't be accessed outside the library that declares it.
Learn more
provide_deprecation_message
Missing a deprecation message.
toggle_on
Learn more
public_member_api_docs
Missing documentation for a public member.
toggle_on
Learn more
read_potentially_unassigned_final
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.
record_fields_cant_be_private
Record field names can't be private.
record_literal_one_positional_field_no_trailing_comma
A record literal with exactly one positional field requires a trailing comma.
Learn more
record_literal_one_positional_no_trailing_comma
A record literal with exactly one positional field requires a trailing comma.
record_literal_zero_fields_with_trailing_comma
A record literal without fields can't have a trailing comma.
Learn more
record_type_one_positional_field_no_trailing_comma
A record type with exactly one positional field requires a trailing comma.
Learn more
record_type_zero_fields_but_trailing_comma
A record type without fields can't have a trailing comma.
Learn more
record_use_cannot_be_placed_here
RecordUse annotation cannot be placed on this element.
record_use_outside_of_package
RecordUse annotations are only supported in libraries with a package: URI.
record_used_as_callable
The 'call' property on the record type isn't directly callable but could be invoked by .call(...)
recursive_compile_time_constant
The compile-time constant expression depends on itself.
Learn more
recursive_constant_constructor
The constant constructor depends on itself.
recursive_constructor_redirect
Constructors can't redirect to themselves either directly or indirectly.
Learn more
recursive_getters
The getter '{0}' recursively returns itself.
toggle_on
Learn more
recursive_include_file
The URI '{0}' included in '{1}' includes '{1}', creating a circular reference.
Learn more
recursive_interface_inheritance
'{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
redeclare_on_non_redeclaring_member
The {0} doesn't redeclare a {0} declared in a superinterface.
Learn more
redirect_generative_to_missing_constructor
The constructor '{0}' couldn't be found in '{1}'.
Learn more
redirect_generative_to_non_generative_constructor
Generative constructors can't redirect to a factory constructor.
Learn more
redirect_to_abstract_class_constructor
The redirecting constructor '{0}' can't redirect to a constructor of the abstract class '{1}'.
Learn more
redirect_to_invalid_function_type
The redirected constructor '{0}' has incompatible parameters with '{1}'.
Learn more
redirect_to_invalid_return_type
The return type '{0}' of the redirected constructor isn't a subtype of '{1}'.
Learn more
redirect_to_missing_constructor
The constructor '{0}' couldn't be found in '{1}'.
Learn more
redirect_to_non_class
The name '{0}' isn't a type and can't be used in a redirected constructor.
Learn more
redirect_to_non_const_constructor
A constant redirecting constructor can't redirect to a non-constant constructor.
Learn more
redirect_to_type_alias_expands_to_type_parameter
A redirecting constructor can't redirect to a type alias that expands to a type parameter.
Learn more
redirecting_constructor_with_another_initializer
A redirecting constructor can't have other initializers.
redirecting_constructor_with_body
Redirecting constructors can't have a body.
redirecting_constructor_with_multiple_redirect_initializers
A redirecting constructor can't have more than one redirection.
redirecting_constructor_with_super_initializer
A redirecting constructor can't have a 'super' initializer.
redirecting_factory_incompatible_type_argument
The type '{0}' doesn't extend '{1}'.
redirection_in_non_factory
Only factory constructor can specify '=' redirection.
redirection_target_not_found
Redirection constructor target not found: '{0}'
referenced_before_declaration
Local variable '{0}' can't be referenced before it is declared.
Learn more
refutable_pattern_in_irrefutable_context
Refutable patterns can't be used in an irrefutable context.
Learn more
relational_pattern_operand_type_not_assignable
The constant expression type '{0}' is not assignable to the parameter type '{1}' of the '{2}' operator.
Learn more
relational_pattern_operator_return_type_not_assignable_to_bool
The return type of operators used in relational patterns must be assignable to 'bool'.
Learn more
remove_deprecations_in_breaking_versions
Remove deprecated elements in breaking versions.
toggle_on
Learn more
removed_lint
'{0}' was removed in Dart '{1}'
Learn more
removed_lint_use
'{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 modifiers.
representation_field_trailing_comma
The representation field can't have a trailing comma.
require_trailing_commas
Missing a required trailing comma.
toggle_on
required_named_parameter_has_default_value_error
Named parameter '{0}' is required and can't have a default value.
required_parameter_with_default
Non-optional parameters can't have a default value.
rest_element_in_map_pattern
A map pattern can't contain a rest pattern.
Learn more
rest_pattern_in_map_pattern
The '...' pattern can't appear in map patterns.
rethrow_not_catch
'rethrow' can only be used in catch clauses.
rethrow_outside_catch
A rethrow must be inside of a catch clause.
Learn more
return_from_void_function
Can't return a value from a void function.
return_in_generative_constructor
Constructors can't return values.
Learn more
return_in_generator
Can't return a value from a generator function that uses the 'async*' or 'sync*' modifier.
Learn more
return_of_do_not_store
'{0}' is annotated with 'doNotStore' and shouldn't be returned unless '{1}' is also annotated.
Learn more
return_of_invalid_type
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
return_of_invalid_type_from_closure
The returned type '{0}' isn't returnable from a '{1}' function, as required by the closure's context.
Learn more
return_without_expression_async
A value must be explicitly returned from a non-void async function.
return_without_expression_sync
A value must be explicitly returned from a non-void function.
return_without_value
The return value is missing after 'return'.
Learn more
script_tag_in_part_file
A part file cannot have script tag.
sdk_root_not_found
SDK root directory not found: {0}.
sdk_specification_not_found
SDK libraries specification not found: {0}.
sdk_summary_not_found
SDK summary not found: {0}.
sdk_version_as_expression_in_const_context
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
sdk_version_async_exported_from_core
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
sdk_version_bool_operator_in_const_context
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
sdk_version_constructor_tearoffs
Tearing off a constructor requires the 'constructor-tearoffs' language feature.
Learn more
sdk_version_eq_eq_operator_in_const_context
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
sdk_version_extension_methods
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
sdk_version_gt_gt_gt_operator
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
sdk_version_is_expression_in_const_context
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
sdk_version_never
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
sdk_version_set_literal
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.
sdk_version_ui_as_code
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
sdk_version_ui_as_code_in_const_context
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_class_subtype_outside_of_library
The class '{0}' can't be extended, implemented, or mixed in outside of its library because it's a sealed class.
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'.
secure_pubspec_urls
The '{0}' protocol shouldn't be used because it isn't secure.
toggle_on
Learn more
set_element_type_not_assignable
The element type '{0}' can't be assigned to the set type '{1}'.
Learn more
set_or_map_literal_too_many_type_arguments
A set or map literal requires exactly one or two type arguments, respectively.
setter_conflicts_with_declaration
The setter conflicts with declaration '{0}'.
setter_conflicts_with_declaration_cause
Conflicting declaration '{0}'.
setter_constructor
Constructors can't be a setter.
setter_in_function
Setters can't be defined within methods or functions.
setter_not_found
Setter not found: '{0}'.
setter_not_sync
Setters can't use 'async', 'async*', or 'sync*'.
setter_with_wrong_number_of_formals
A setter should have exactly one formal parameter.
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
shared_deferred_prefix
The prefix of a deferred import can't be used in other import directives.
Learn more
simplify_variable_pattern
The {0} identification '{1}:' is redundant and can be removed.
toggle_on
Learn more
size_annotation_dimensions
'Array's must have an 'Array' annotation that matches the dimensions.
Learn more
sized_box_for_whitespace
Use a 'SizedBox' to add whitespace to a layout.
toggle_on
Learn more
sized_box_shrink_expand
Use 'SizedBox.{0}' to avoid needing to specify the 'height' and 'width'.
toggle_on
Learn more
slash_for_doc_comments
Use the end-of-line form ('///') for doc comments.
toggle_on
Learn more
sort_child_properties_last
The '{0}' argument should be last in widget constructor invocations.
toggle_on
Learn more
sort_constructors_first
Constructor declarations should be before non-constructor declarations.
toggle_on
Learn more
sort_pub_dependencies
Dependencies not sorted alphabetically.
toggle_on
Learn more
sort_unnamed_constructors_first
Invalid location for the unnamed constructor.
toggle_on
Learn more
source_body_summary
Built bodies for {0} compilation units ({1} bytes) in {2}ms, that is, {3} bytes/ms, and {4} ms/compilation unit.
source_outline_summary
Built outlines for {0} compilation units ({1} bytes) in {2}ms, that is, {3} bytes/ms, and {4} ms/compilation unit.
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_element
Iterable spread.
spread_element_type_mismatch
Can't assign spread elements of type '{0}' to collection elements of type '{1}'.
spread_expression_from_deferred_library
Constant values from a deferred library can't be spread into a const literal.
spread_map_element
Map spread.
spread_map_entry_element_key_type_mismatch
Can't assign spread entry keys of type '{0}' to map entry keys of type '{1}'.
spread_map_entry_element_value_type_mismatch
Can't assign spread entry values of type '{0}' to map entry values of type '{1}'.
spread_map_entry_type_mismatch
Unexpected type '{0}' of a map spread entry. Expected 'dynamic' or a Map.
spread_type_mismatch
Unexpected type '{0}' of a spread. Expected 'dynamic' or an Iterable.
stack_overflow
The file has too many nested expressions or statements.
static_access_to_instance_member
Instance member '{0}' can't be accessed using static access.
Learn more
static_conflicts_with_instance
Static property '{0}' conflicts with instance property of the same name.
static_conflicts_with_instance_cause
Conflicting instance property '{0}'.
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.
static_tear_off_from_instantiated_class
Cannot access static member on an instantiated generic class.
strict_raw_type
The generic type '{0}' should have explicit type arguments but doesn't.
strict_top_level_inference
Missing type annotation.
toggle_on
subtype_of_base_is_not_base_final_or_sealed
The type '{0}' must be 'base', 'final' or 'sealed' because the supertype '{1}' is 'base'.
subtype_of_base_or_final_is_not_base_final_or_sealed
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
subtype_of_deferred_class
Classes and mixins can't implement deferred classes. Classes can't extend deferred classes. Classes can't mixin deferred classes.
Learn more
subtype_of_disallowed_type
'{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
subtype_of_ffi_class
The class '{0}' can't extend '{1}'. The class '{0}' can't implement '{1}'. The class '{0}' can't mix in '{1}'.
Learn more
subtype_of_final_is_not_base_final_or_sealed
The type '{0}' must be 'base', 'final' or 'sealed' because the supertype '{1}' is 'final'.
subtype_of_sealed_class
The class '{0}' shouldn't be extended, mixed in, or implemented because it's sealed.
Learn more
subtype_of_struct_class
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
super_as_expression
Can't use 'super' as an expression.
super_as_identifier
Expected identifier, but got 'super'.
super_bounded_hint
If you want '{0}' to be a super-bounded type, note that the inverted type '{1}' must then satisfy its bounds, which it does not.
super_extension_type_is_illegal
The type '{0}' can't be implemented by an extension type.
super_extension_type_is_illegal_aliased
The type '{0}' which is an alias of '{1}' can't be implemented by an extension type.
super_extension_type_is_nullable_aliased
The type '{0}' which is an alias of '{1}' can't be implemented by an extension type because it is nullable.
super_extension_type_is_type_parameter
The type variable '{0}' can't be implemented by an extension type.
super_formal_parameter_type_is_not_subtype_of_associated
The type '{0}' of this parameter isn't a subtype of the type '{1}' of the associated super constructor parameter.
Learn more
super_formal_parameter_without_associated_named
No associated named super constructor parameter.
Learn more
super_formal_parameter_without_associated_positional
No associated positional super constructor parameter.
Learn more
super_goes_last
toggle_on
super_in_enum_constructor
The enum constructor can't have a 'super' initializer.
Learn more
super_in_extension
The 'super' keyword can't be used in an extension because an extension doesn't have a superclass.
Learn more
super_in_extension_type
The 'super' keyword can't be used in an extension type because an extension type doesn't have a superclass.
Learn more
super_in_invalid_context
Invalid context for 'super' invocation.
Learn more
super_in_redirecting_constructor
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_initializer_not_last
Can't have initializers after 'super'.
super_initializer_parameter
This is the super-initializer parameter.
super_invocation_not_last
The superconstructor call must be last in an initializer list.
Learn more
super_null_aware
The operator '?.' cannot be used with 'super' because 'super' cannot be null.
super_parameter_initializer_outside_constructor
Super-initializer formal parameters can only be used in generative constructors.
superclass_has_no_constructor
Superclass has no constructor named '{0}'.
superclass_has_no_default_constructor
The superclass, '{0}', has no unnamed constructor that takes no arguments.
superclass_has_no_getter
Superclass has no getter named '{0}'.
superclass_has_no_member
Superclass has no member named '{0}'.
superclass_has_no_method
Superclass has no method named '{0}'.
superclass_has_no_setter
Superclass has no setter named '{0}'.
supertype_expands_to_type_parameter
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
supertype_is_function
Can't use a function type as supertype.
supertype_is_illegal
The type '{0}' can't be used as supertype.
supertype_is_illegal_aliased
The type '{0}' which is an alias of '{1}' can't be used as supertype.
supertype_is_nullable_aliased
The type '{0}' which is an alias of '{1}' can't be used as supertype because it is nullable.
supertype_is_type_parameter
The type variable '{0}' can't be used as supertype.
switch_case_completes_normally
The 'case' shouldn't complete normally.
Learn more
switch_case_fall_through
Switch case may fall through to the next case.
switch_expression_not_assignable
Type '{0}' of the switch expression isn't assignable to the type '{1}' of case expressions.
Learn more
switch_expression_not_assignable_cause
The switch expression is here.
switch_expression_not_subtype
Type '{0}' of the case expression is not a subtype of type '{1}' of this switch expression.
switch_has_case_after_default
The default case should be the last case in a switch statement.
switch_has_multiple_defaults
The 'default' case can only be declared once.
switch_on_type
Avoid switch statements on a 'Type'.
toggle_on
Learn more
synthetic_token
This couldn't be parsed.
tearoff_of_generative_constructor_of_abstract_class
A generative constructor of an abstract class can't be torn off.
Learn more
test_types_in_equals
Missing type test for '{0}' in '=='.
toggle_on
Learn more
text_direction_code_point_in_comment
The Unicode code point 'U+{0}' changes the appearance of text from how it's interpreted by the compiler.
Learn more
text_direction_code_point_in_literal
The Unicode code point 'U+{0}' changes the appearance of text from how it's interpreted by the compiler.
Learn more
this_access_in_field_initializer
Can't access 'this' in a field initializer to read '{0}'.
this_as_identifier
Expected identifier, but got 'this'.
this_not_promoted
'this' can't be promoted.
this_or_super_access_in_field_initializer
Can't access '{0}' in a field initializer.
throw_in_finally
Use of '{0}' in 'finally' block.
toggle_on
Learn more
throw_of_invalid_type
The type '{0}' of the thrown expression must be assignable to 'Object'.
Learn more
throwing_not_assignable_to_object_error
Can't throw a value of '{0}' since it is neither dynamic nor non-nullable.
tighten_type_of_initializing_formals
Use a type annotation rather than 'assert' to enforce non-nullability.
toggle_on
Learn more
todo
{0}
too_few_arguments
Too few positional arguments: {0} required, {1} given.
too_many_arguments
Too many positional arguments: {0} allowed, but {1} found.
top_level_cycle
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.
type_after_var
Variables can't be declared using both 'var' and a type name.
type_alias_cannot_reference_itself
Typedefs can't reference themselves directly or recursively via another typedef.
Learn more
type_annotate_public_apis
Missing type annotation on a public API.
toggle_on
Learn more
type_annotation_deferred_class
The deferred type '{0}' can't be used in a declaration, cast, or type test.
Learn more
type_argument_mismatch
Expected {0} type arguments.
type_argument_not_matching_bounds
'{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.
type_check_with_null
Tests for non-null should be done with '!= null'. Tests for null should be done with '== null'.
Learn more
type_init_formals
Don't needlessly type annotate initializing formals.
toggle_on
Learn more
type_literal_in_constant_pattern
Use 'TypeName _' instead of a type literal.
toggle_on
Learn more
type_not_found
Type '{0}' not found.
type_origin
'{0}' is from '{1}'.
type_origin_with_file_uri
'{0}' is from '{1}' ('{2}').
type_parameter_duplicated_name
A type variable can't have the same name as another.
type_parameter_duplicated_name_cause
The other type variable named '{0}'.
type_parameter_referenced_by_static
Static members can't reference type parameters of the class.
Learn more
type_parameter_same_name_as_enclosing
A type variable can't have the same name as its enclosing declaration.
type_parameter_supertype_of_its_bound
'{0}' can't be a supertype of its upper bound.
Learn more
type_test_with_non_type
The name '{0}' isn't a type and can't be used in an 'is' expression.
Learn more
type_test_with_undefined_name
The name '{0}' isn't defined, so it can't be used in an 'is' expression.
Learn more
type_variable_in_constant_context
Type variables can't be used as constants.
type_variable_in_static_context
Type variables can't be used in static members.
typedef_cause
The issue arises via this type alias.
typedef_in_class
Typedefs can't be declared inside classes.
typedef_not_function
Can't create typedef from non-function type.
typedef_not_type
Can't create typedef from non-type.
typedef_nullable_type
Can't create typedef from nullable type.
typedef_type_parameter_not_constructor
Can't use a typedef denoting a type variable as a constructor, nor for a static member access.
typedef_type_parameter_not_constructor_cause
This is the type variable ultimately denoted.
typedef_unaliased_type_cause
This is the type denoted by the type alias.
unable_get_content
Unable to get content of '{0}'.
unavailable_dart_library
Dart library '{0}' is not available on this platform.
unawaited_futures
Missing an 'await' for the 'Future' computed by this expression.
toggle_on
Learn more
unchecked_use_of_nullable_value
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 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_annotation
Undefined name '{0}' used as an annotation.
Learn more
undefined_class
Undefined class '{0}'.
Learn more
undefined_constructor_in_initializer
The class '{0}' doesn't have a constructor named '{1}'. The class '{0}' doesn't have an unnamed constructor.
Learn more
undefined_enum_constant
There's no constant named '{0}' in '{1}'.
Learn more
undefined_enum_constructor
The enum doesn't have a constructor named '{0}'. The enum doesn't have an unnamed constructor.
Learn more
undefined_extension_getter
The getter '{0}' isn't defined for the extension '{1}'.
Learn more
undefined_extension_method
The method '{0}' isn't defined for the extension '{1}'.
Learn more
undefined_extension_operator
The operator '{0}' isn't defined for the extension '{1}'.
Learn more
undefined_extension_setter
The setter '{0}' isn't defined for the extension '{1}'.
Learn more
undefined_function
The function '{0}' isn't defined.
Learn more
undefined_getter
The getter '{0}' isn't defined for the '{1}' function type. The getter '{0}' isn't defined for the type '{1}'.
Learn more
undefined_hidden_name
The library '{0}' doesn't export a member with the hidden name '{1}'.
Learn more
undefined_identifier
Undefined name '{0}'.
Learn more
undefined_identifier_await
Undefined name 'await' in function body not marked with 'async'.
Learn more
undefined_lint
'{0}' isn't a recognized lint rule.
Learn more
undefined_method
The method '{0}' isn't defined for the '{1}' function type. The method '{0}' isn't defined for the type '{1}'.
Learn more
undefined_named_parameter
The named parameter '{0}' isn't defined.
Learn more
undefined_operator
The operator '{0}' isn't defined for the type '{1}'.
Learn more
undefined_prefixed_name
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
undefined_referenced_parameter
The parameter '{0}' isn't defined by '{1}'.
Learn more
undefined_setter
The setter '{0}' isn't defined for the '{1}' function type. The setter '{0}' isn't defined for the type '{1}'.
Learn more
undefined_shown_name
The library '{0}' doesn't export a member with the shown name '{1}'.
Learn more
undefined_super_member
The getter '{0}' isn't defined in a superclass of '{1}'. The method '{0}' isn't defined in a superclass of '{1}'. The operator '{0}' isn't defined in a superclass of '{1}'. The setter '{0}' isn't defined in a superclass of '{1}'.
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_super_parameters_in_generative_constructors
Super parameters can only be used in non-redirecting generative constructors.
unexpected_terminator_for_parameter_group
There is no '{0}' to open a parameter group.
unexpected_token
Unexpected text '{0}'. Unexpected token '{0}'.
unexpected_tokens
Unexpected tokens.
unexpected_transform_set_token
Didn't expect to find {0}.
unignorable_ignore
The diagnostic '{0}' can't be ignored.
unintended_html_in_doc_comment
Angle brackets will be interpreted as HTML.
toggle_on
Learn more
unknown_accessor
The accessor '{0}' is invalid.
unknown_platform
The platform '{0}' is not a recognized platform.
Learn more
unmatched_augmentation_class
Augmentation class '{0}' doesn't match a class in the augmented library.
unmatched_augmentation_class_member
Augmentation member '{0}' doesn't match a member in the augmented class.
unmatched_augmentation_declaration
Augmentation '{0}' doesn't match a declaration in the augmented library.
unmatched_augmentation_library_member
Augmentation member '{0}' doesn't match a member in the augmented library.
unmatched_patch_class
Patch class '{0}' doesn't match a class in the origin library.
unmatched_patch_class_member
Patch member '{0}' doesn't match a member in the origin class.
unmatched_patch_declaration
Patch '{0}' doesn't match a declaration in the origin library.
unmatched_patch_library_member
Patch member '{0}' doesn't match a member in the origin library.
unmatched_token
Can't find '{0}' to match '{1}'.
unnamed_object_pattern_field
A pattern field in an object pattern must be named.
unnecessary_async
Don't make a function 'async' if it doesn't use 'await'.
toggle_on
unnecessary_await_in_return
Unnecessary 'await'.
toggle_on
unnecessary_brace_in_string_interps
Unnecessary braces in a string interpolation.
toggle_on
Learn more
unnecessary_breaks
Unnecessary 'break' statement.
toggle_on
unnecessary_cast
Unnecessary cast.
Learn more
unnecessary_cast_pattern
Unnecessary cast pattern.
Learn more
unnecessary_const
Unnecessary 'const' keyword.
toggle_on
Learn more
unnecessary_constructor_name
Unnecessary '.new' constructor name.
toggle_on
Learn more
unnecessary_dev_dependency
The dev dependency on {0} is unnecessary because there is also a normal dependency on that package.
Learn more
unnecessary_final
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_getters_setters
Unnecessary use of getter and setter to wrap a field.
toggle_on
Learn more
unnecessary_ignore
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
unnecessary_import
The import of '{0}' is unnecessary because all of the used elements are also provided by the import of '{1}'.
Learn more
unnecessary_lambdas
Closure should be a tearoff.
toggle_on
Learn more
unnecessary_late
Unnecessary 'late' modifier.
toggle_on
Learn more
unnecessary_library_directive
Library directives without comments or annotations should be avoided.
toggle_on
unnecessary_library_name
Library names are not necessary.
toggle_on
Learn more
unnecessary_nan_comparison
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
Unnecessary 'new' keyword.
toggle_on
Learn more
unnecessary_no_such_method
Unnecessary 'noSuchMethod' declaration.
Learn more
unnecessary_non_null_assertion
The '!' will have no effect because the receiver can't be null.
Learn more
unnecessary_null_assert_pattern
The null-assert pattern will have no effect because the matched type isn't nullable.
Learn more
unnecessary_null_aware_assignments
Unnecessary assignment of 'null'.
toggle_on
Learn more
unnecessary_null_aware_operator_on_extension_on_nullable
Unnecessary use of a null-aware operator to invoke an extension method on a nullable type.
toggle_on
Learn more
unnecessary_null_check_pattern
The null-check pattern will have no effect because the matched type isn't nullable.
Learn more
unnecessary_null_checks
Unnecessary use of a null check ('!').
toggle_on
Learn more
unnecessary_null_comparison
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_null_in_if_null_operators
Unnecessary use of '??' with 'null'.
toggle_on
Learn more
unnecessary_nullable_for_final_variable_declarations
Type could be non-nullable.
toggle_on
Learn more
unnecessary_overrides
Unnecessary override.
toggle_on
Learn more
unnecessary_parenthesis
Unnecessary use of parentheses.
toggle_on
Learn more
unnecessary_question_mark
The '?' is unnecessary because '{0}' is nullable without it.
Learn more
unnecessary_raw_strings
Unnecessary use of a raw string.
toggle_on
Learn more
unnecessary_set_literal
Braces unnecessarily wrap this expression in a set literal.
Learn more
unnecessary_statements
Unnecessary statement.
toggle_on
Learn more
unnecessary_string_escapes
Unnecessary escape in string literal.
toggle_on
Learn more
unnecessary_string_interpolations
Unnecessary use of string interpolation.
toggle_on
Learn more
unnecessary_this
Unnecessary 'this.' qualifier.
toggle_on
Learn more
unnecessary_to_list_in_spreads
Unnecessary use of 'toList' in a spread.
toggle_on
Learn more
unnecessary_type_check
Unnecessary type check; the result is always 'false'. Unnecessary type check; the result is always 'true'.
Learn more
unnecessary_unawaited
Unnecessary use of 'unawaited'.
toggle_on
Learn more
unnecessary_underscores
Unnecessary use of multiple underscores.
toggle_on
Learn more
unnecessary_wildcard_pattern
Unnecessary wildcard pattern.
Learn more
unqualified_reference_to_non_local_static_member
Static members from supertypes must be qualified by the name of the defining type.
Learn more
unqualified_reference_to_static_member_of_extended_type
Static members from the extended type or one of its superclasses must be qualified by the name of the defining type.
Learn more
unreachable_from_main
Unreachable member '{0}' in an executable library.
toggle_on
unreachable_switch_case
This case is covered by the previous cases.
Learn more
unreachable_switch_default
This default clause is covered by the previous cases.
Learn more
unrecognized_error_code
'{0}' isn't a recognized diagnostic code.
Learn more
unrelated_type_equality_checks
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
unsafe_variance
This type is unsafe: a type parameter occurs in a non-covariant position.
toggle_on
Learn more
unsound_switch_expression_error
None of the patterns in the switch expression the matched input value. See https://github.com/dart-lang/language/issues/3488 for details.
unsound_switch_statement_error
None of the patterns in the exhaustive switch statement the matched input value. See https://github.com/dart-lang/language/issues/3488 for details.
unspecified
{0}
unspecified_getter_name_in_object_pattern
The getter name is not specified explicitly, and the pattern is not a variable. Try specifying the getter name explicitly, or using a variable pattern.
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_dart_ext
Dart native extensions are no longer supported.
unsupported_key
The key '{0}' isn't supported.
unsupported_operator
The '{0}' operator is not supported.
unsupported_option
The option '{0}' isn't supported by '{1}'.
Learn more
unsupported_platform_dart_library_import
Using stub implementations for APIs in platform-specific Dart library '{0}', which will throw 'UnsupportedError' if invoked.
unsupported_prefix_plus
'+' is not a prefix operator.
unsupported_static
The key 'static' is only supported for elements in a class, enum, extension, or mixin.
unsupported_value
The value '{0}' isn't supported by '{1}'.
Learn more
unsupported_version
Only version '1' is supported at this time.
unterminated_comment
Comment starting with '/' must end with '/'.
unterminated_multi_line_comment
Unterminated multi-line comment.
unterminated_string
String starting with {0} must end with {1}.
unterminated_string_literal
Unterminated string literal.
unterminated_token
Incomplete token.
untranslatable_uri
Not found: '{0}'
unused_catch_clause
The exception variable '{0}' isn't used, so the 'catch' clause can be removed.
Learn more
unused_catch_stack
The stack trace variable '{0}' isn't used and can be removed.
Learn more
unused_element
The declaration '{0}' isn't referenced.
Learn more
unused_element_parameter
A value for optional parameter '{0}' isn't ever given.
Learn more
unused_field
The value of the field '{0}' isn't used.
Learn more
unused_field_from_primary_constructor
The value of the field '{0}' isn't used.
Learn more
unused_import
Unused import: '{0}'.
Learn more
unused_label
The label '{0}' isn't used.
Learn more
unused_local_variable
The value of the local variable '{0}' isn't used.
Learn more
unused_result
'{0}' should be used. {1}. The value of '{0}' should be used.
Learn more
unused_shown_name
The name {0} is shown, but isn't used.
Learn more
uri_does_not_exist
Target of URI doesn't exist: '{0}'.
Learn more
uri_does_not_exist_in_doc_import
Target of URI doesn't exist: '{0}'.
Learn more
uri_has_not_been_generated
Target of URI hasn't been generated: '{0}'.
Learn more
uri_with_interpolation
URIs can't use string interpolation.
Learn more
use_build_context_synchronously
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_colored_box
Use a 'ColoredBox' rather than a 'Container' with only a 'Color'.
toggle_on
Learn more
use_decorated_box
Use 'DecoratedBox' rather than a 'Container' with only a 'Decoration'.
toggle_on
Learn more
use_enums
Class should be an enum.
toggle_on
use_full_hex_values_for_flutter_colors
Instances of 'Color' should be created using an 8-digit hexadecimal integer (such as '0xFFFFFFFF').
toggle_on
Learn more
use_function_type_syntax_for_parameters
Use the generic function type syntax to declare the parameter '{0}'.
toggle_on
Learn more
use_if_null_to_convert_nulls_to_bools
Use an if-null operator to convert a 'null' to a 'bool'.
toggle_on
Learn more
use_is_even_rather_than_modulo
Use '{0}' rather than '% 2'.
toggle_on
use_key_in_widget_constructors
Constructors for public widgets should have a named 'key' parameter.
toggle_on
Learn more
use_late_for_private_fields_and_variables
Use 'late' for private members with a non-nullable type.
toggle_on
Learn more
use_named_constants
Use the constant '{0}' rather than a constructor returning the same object.
toggle_on
Learn more
use_null_aware_elements
Use the null-aware marker '?' rather than a null check via an 'if'.
toggle_on
Learn more
use_of_native_extension
Dart native extensions are deprecated and aren't available in Dart 2.15.
Learn more
use_of_void_result
This expression has a type of 'void' so its value can't be used.
Learn more
use_raw_strings
Use a raw string to avoid using escapes.
toggle_on
Learn more
use_rethrow_when_possible
Use 'rethrow' to rethrow a caught exception.
toggle_on
Learn more
use_setters_to_change_properties
The method is used to change a property.
toggle_on
Learn more
use_string_buffers
Use a string buffer rather than '+' to compose strings.
toggle_on
Learn more
use_string_in_part_of_directives
The part-of directive uses a library name.
toggle_on
Learn more
use_super_parameters
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
Use truncating division.
toggle_on
Learn more
valid_regexps
Invalid regular expression syntax.
toggle_on
Learn more
value_for_required_parameter_not_provided_error
Required named parameter '{0}' must be provided.
values_declaration_in_enum
A member named 'values' can't be declared in an enum.
Learn more
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'.
variable_could_be_null_due_to_write
Variable '{0}' could not be promoted due to an assignment.
variable_length_array_not_last
Variable length 'Array's must only occur as the last field of Structs.
Learn more
variable_pattern_keyword_in_declaration_context
Variable patterns in declaration context can't specify 'var' or 'final' keyword.
Learn more
variable_type_mismatch
A value of type '{0}' can't be assigned to a const variable of type '{1}'.
Learn more
verification_error_origin_context
The node most likely is taken from here by a transformer.
visit_registered_nodes
Declare 'visit' methods for all registered node types.
void_checks
Assignment to a variable of type 'void'.
toggle_on
Learn more
void_expression
This expression has type 'void' and can't be used.
void_with_type_arguments
Type 'void' can't have type arguments.
wasm_extern_invalid_load
WebAssembly elements may only be referenced to directly call a method on them.
wasm_extern_invalid_target
The receiver of this call must be a top-level variable describing the WebAssembly element.
wasm_extern_memory_missing_annotation
This external getter returns a memory instance, but no annotation describing it was found
wasm_import_or_export_in_user_code
Pragmas wasm:import and wasm:export are for internal use only and cannot be used by user code.
wasm_intrinsic_tear_off
This intrinsic extension member may not be torn off.
weak_reference_mismatch_return_and_argument_types
Return and argument types of a weak reference should match.
weak_reference_not_one_argument
Weak reference should take one required positional argument.
weak_reference_not_static
Weak reference pragma can be used on a static method only.
weak_reference_return_type_not_nullable
Return type of a weak reference should be nullable.
weak_reference_target_has_parameters
The target of weak reference should not take parameters.
weak_reference_target_not_static_tearoff
The target of weak reference should be a tearoff of a static method.
web_literal_cannot_be_represented_exactly
The integer literal {0} can't be represented exactly in JavaScript.
with_before_extends
The extends clause must be before the with clause.
workspace_field_not_list
The value of the 'workspace' field is required to be a list of relative file paths.
Learn more
workspace_value_not_string
Workspace entries are required to be directory paths (strings).
Learn more
workspace_value_not_subdirectory
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}'.
wrong_number_of_parameters_for_operator
Operator '-' should declare 0 or 1 parameter, but {0} found. Operator '{0}' should declare exactly {1} parameters, but {2} found.
Learn more
wrong_number_of_parameters_for_setter
Setters must declare exactly one required positional parameter.
Learn more
wrong_number_of_type_arguments
The type '{0}' is declared with {1} type parameters, but {2} type arguments were given.
Learn more
wrong_number_of_type_arguments_constructor
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
wrong_number_of_type_arguments_element
The {0} '{1}' is declared with {2} type parameters, but {3} type arguments are given.
Learn more
wrong_number_of_type_arguments_enum
The enum is declared with {0} type parameters, but {1} type arguments were given.
Learn more
wrong_number_of_type_arguments_extension
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_as_identifier
'yield' can't be used as an identifier in 'async', 'async*', or 'sync*' methods.
yield_in_non_generator
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
yield_not_generator
'yield' can only be used in 'sync*' or 'async*' methods.
yield_of_invalid_type
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