Try adding a return type to the function. Its category is style. It is stable since Dart 2.0.
- Code
always_declare_return_types- Message
The function '{}' should have a return type but doesn't.- Message
The method '{}' should have a return type but doesn't.
Try moving the statement to a new line. Its category is errorProne, style. It is stable since Dart 2.0.
- Code
always_put_control_body_on_new_line- Message
Statement should be on a separate line.
Try moving the required named parameter to be before any optional named parameters. Its category is style. It is stable since Dart 2.0.
- Code
always_put_required_named_parameters_first- Message
Required named parameters should be before optional named parameters.
Try adding a type annotation. Its category is style. It is stable since Dart 2.0.
- Code
always_specify_types- Message
Missing type annotation.
Try converting the URI to a 'package:' URI. Its category is errorProne. It is stable since Dart 2.10.
- Code
always_use_package_imports- Message
Use 'package:' imports for files in the 'lib' directory.
Its category is publicInterface. It is internal since Dart 3.10.
- Code
analyzer_element_model_tracking_bad- Message
Bad tracking annotation for this member.
Its category is publicInterface. It is internal since Dart 3.10.
- Code
analyzer_element_model_tracking_more_than_one- Message
There can be only one tracking annotation.
Its category is publicInterface. It is internal since Dart 3.10.
- Code
analyzer_element_model_tracking_zero- Message
No required tracking annotation.
Its category is publicInterface. It is internal since Dart 3.10.
- Code
analyzer_public_api_bad_part_directive- Message
Part directives in the analyzer public API should point to files in the analyzer public API.
Its category is publicInterface. It is internal since Dart 3.10.
- Code
analyzer_public_api_bad_type- Message
Element makes use of type(s) which is not part of the analyzer public API: {}.
Its category is publicInterface. It is internal since Dart 3.10.
- Code
analyzer_public_api_experimental_inconsistency- Message
Element makes use of experimental type(s), but is not itself marked with `@experimental`: {}.
Its category is publicInterface. It is internal since Dart 3.10.
- Code
analyzer_public_api_exports_non_public_name- Message
Export directive exports element(s) that are not part of the analyzer public API: {}.
Its category is publicInterface. It is internal since Dart 3.10.
- Code
analyzer_public_api_impl_in_public_api- Message
Declarations in the analyzer public API should not end in "Impl".
Try using the V2 counterpart, or annotating the enclosing declaration with '@V1Ast'. Its category is publicInterface. It is internal since Dart 3.14.
- Code
analyzer_v1_ast_use- Message
'{}' is part of the V1 AST API, and should be used only from other V1 AST API.{}
Try adding the '@override' annotation. Its category is style. It is stable since Dart 2.0.
- Code
annotate_overrides- Message
The member '{}' overrides an inherited member but isn't annotated with '@override'.
Try adding the '@redeclare' annotation. Its category is style. It is experimental since Dart 3.2.
- Code
annotate_redeclares- Message
The member '{}' is redeclaring but isn't annotated with '@redeclare'.
Try adding an 'await' or making the body non-async. Its category is errorProne. It is stable since Dart 3.13.
- Code
async_return_with_no_await- Message
Returning a 'Future' without 'await'.
Try removing the type 'dynamic'. Its category is brevity, style. It is stable since Dart 2.0.
- Code
avoid_annotating_with_dynamic- Message
Unnecessary 'dynamic' type annotation.
Try rewriting the expression to use either '&&' or '||'. Its category is brevity. It is stable since Dart 2.0.
- Code
avoid_bool_literals_in_conditional_expressions- Message
Conditional expressions with a 'bool' literal can be simplified.
Try adding an 'on' clause before the 'catch'. Its category is effectiveDart, style. It is stable since Dart 2.0.
- Code
avoid_catches_without_on_clauses- Message
Catch clause should use 'on' to specify the type of exception being caught.
Try removing the catch or catching an 'Exception' instead. Its category is style. It is stable since Dart 2.0.
- Code
avoid_catching_errors- Message
The type 'Error' should not be caught.- Message
The type '{}' should not be caught because it is a subclass of 'Error'.
Try adding instance behavior or moving the members out of the class. Its category is effectiveDart, languageFeatureUsage, style. It is stable since Dart 2.0.
- Code
avoid_classes_with_only_static_members- Message
Classes should define instance members.
Try removing the check. Its category is errorProne, web. It is stable since Dart 2.0.
- Code
avoid_double_and_int_checks- Message
Explicit check for double or int.
Try giving the target a type. Its category is binarySize, errorProne. It is stable since Dart 2.14.
- Code
avoid_dynamic_calls- Message
Method invocation or property access on a 'dynamic' target.
Try removing the empty statement or removing the else clause. Its category is brevity, errorProne. It is stable since Dart 2.0.
- Code
avoid_empty_else- Message
Empty statements are not allowed in an 'else' clause.
Try removing the override or annotating the class with '@immutable'. Its category is effectiveDart, style. It is stable since Dart 2.6.
- Code
avoid_equals_and_hash_code_on_mutable_classes- Message
The method '{}' should not be overridden in classes not annotated with '@immutable'.
Try changing the outer quotes to '…'. Its category is style. It is stable since Dart 2.8.
- Code
avoid_escaping_inner_quotes- Message
Unnecessary escape of '{}'.
Try converting the field to a getter or initializing the field in the constructors. Its category is style. It is stable since Dart 2.0.
- Code
avoid_field_initializers_in_const_classes- Message
Fields in 'const' classes should not have initializers.
Try removing the keyword 'final'. Its category is style. It is stable since Dart 2.16.
- Code
avoid_final_parameters- Message
Parameters should not be marked as 'final'.
Try using a 'for' loop. Its category is style. It is stable since Dart 2.0.
- Code
avoid_function_literals_in_foreach_calls- Message
Function literals shouldn't be passed to 'forEach'.
Try using 'Future<void>?' or 'void'. Its category is errorProne, unintentional. It is experimental since Dart 3.6.
- Code
avoid_futureor_void- Message
Don't use the type 'FutureOr<void>'.
Try removing the class from the 'implements' clause. Its category is style. It is stable since Dart 2.1.
- Code
avoid_implementing_value_types- Message
Classes that override '==' should not be implemented.
Try removing the initializer. Its category is brevity, effectiveDart, style. It is stable since Dart 2.0.
- Code
avoid_init_to_null- Message
Redundant initialization to 'null'.
Try using a 'BigInt' to represent the value. Its category is errorProne, web. It is stable since Dart 2.0.
- Code
avoid_js_rounded_ints- Message
Integer literal can't be represented exactly when compiled to JavaScript.
Try splitting the variable declarations into multiple lines. Its category is style. It is stable since Dart 2.13.
- Code
avoid_multiple_declarations_per_line- Message
Multiple variables declared on a single line.
Try removing the comparison. Its category is style. It is stable since Dart 2.0. The Dart team deprecated it in Dart 3.11.
- Code
avoid_null_checks_in_equality_operators- Message
Unnecessary null comparison in implementation of '=='.
Try converting the parameter to a named parameter. Its category is effectiveDart, style. It is stable since Dart 2.2.
- Code
avoid_positional_boolean_parameters- Message
'bool' parameters should be named parameters.
Try using a logging framework. Its category is unintentional. It is stable since Dart 2.5.
- Code
avoid_print- Message
Don't invoke 'print' in production code.
Try inlining the type or using it in other places. Its category is style. It is stable since Dart 2.0. The Dart team deprecated it in Dart 3.13.
- Code
avoid_private_typedef_functions- Message
The typedef is unnecessary because it is only used in one place.
Try removing the argument. Its category is brevity, style. It is stable since Dart 2.8.
- Code
avoid_redundant_argument_values- Message
The value of the argument is redundant because it matches the default value.
Try fixing the relative path or changing the import to a 'package:' import. Its category is errorProne. It is stable since Dart 2.0.
- Code
avoid_relative_lib_imports- Message
Can't use a relative path to import a library in 'lib'.
Try changing the name to '…'. Its category is documentationCommentMaintenance. It is stable since Dart 2.0.
- Code
avoid_renaming_method_parameters- Message
The parameter name '{}' doesn't match the name '{}' in the overridden method.
Try removing the return type. Its category is brevity, style. It is stable since Dart 2.0.
- Code
avoid_return_types_on_setters- Message
Unnecessary return type on a setter.
Try removing the 'null'. Its category is style. It is stable since Dart 2.1.
- Code
avoid_returning_null_for_void- Message
Don't return 'null' from a function with a return type of 'void'.- Message
Don't return 'null' from a method with a return type of 'void'.
Try changing the return type to 'void' and removing the return. Its category is effectiveDart, style. It is stable since Dart 2.0.
- Code
avoid_returning_this- Message
Don't return 'this' from a method.
Try adding a corresponding getter or removing the setter. Its category is style. It is stable since Dart 2.0.
- Code
avoid_setters_without_getters- Message
Setter has no corresponding getter.
Try renaming one of the type parameters. Its category is errorProne. It is stable since Dart 2.1.
- Code
avoid_shadowing_type_parameters- Message
The type parameter '{}' shadows a type parameter from the enclosing {}.
Try using the operator '…'. Its category is brevity, style. It is stable since Dart 2.0.
- Code
avoid_single_cascade_in_expression_statements- Message
Unnecessary cascade expression.
Try using the synchronous version of the method. Its category is nonPerformant. It is stable since Dart 2.0.
- Code
avoid_slow_async_io- Message
Use of an async 'dart:io' method.
Try a normal type check or compare the 'runtimeType' directly. Its category is unintentional. It is stable since Dart 2.12.
- Code
avoid_type_to_string- Message
Using 'toString' on a 'Type' is not safe in production code.
Try adding a name for the parameter or changing the parameter name to not match an existing type.
- Code
avoid_types_as_parameter_names- Message
The parameter name '{}' matches a visible type name.- Message
The type parameter name '{}' matches a visible type name.
Try removing the type annotation. Its category is style. It is stable since Dart 2.0.
- Code
avoid_types_on_closure_parameters- Message
Unnecessary type annotation on a function expression parameter.
Try removing the 'Container' (but not its children) from the widget tree. Its category is flutter, style. It is stable since Dart 2.7.
- Code
avoid_unnecessary_containers- Message
Unnecessary instance of 'Container'.
Try using the parameter or removing it. Its category is unintentional. It is stable since Dart 2.0.
- Code
avoid_unused_constructor_parameters- Message
The parameter '{}' is not used in the constructor.
Try changing the return type. Its category is style. It is stable since Dart 2.1.
- Code
avoid_void_async- Message
An 'async' function should have a 'Future' return type when it doesn't return a value.
Try finding a different library for your needs. Its category is errorProne, flutter, web. It is stable since Dart 2.14.
- Code
avoid_web_libraries_in_flutter- Message
Don't use web-only libraries outside Flutter web plugins.
Try removing the 'await' or changing the expression. Its category is style. It is stable since Dart 2.0.
- Code
await_only_futures- Message
Uses 'await' on an instance of '{}', which is not a subtype of 'Future'.
Try changing the name to follow the UpperCamelCase style. Its category is effectiveDart, style. It is stable since Dart 2.6.
- Code
camel_case_extensions- Message
The extension name '{}' isn't an UpperCamelCase identifier.
Try changing the name to follow the UpperCamelCase style. Its category is effectiveDart, style. It is stable since Dart 2.0.
- Code
camel_case_types- Message
The type name '{}' isn't an UpperCamelCase identifier.
Try invoking 'cancel' in the function in which the 'StreamSubscription' was created. Its category is errorProne, memoryLeaks. It is stable since Dart 2.0.
- Code
cancel_subscriptions- Message
Uncancelled instance of 'StreamSubscription'.
Try using a cascade to avoid the duplication. Its category is brevity, languageFeatureUsage, style. It is stable since Dart 2.0.
- Code
cascade_invocations- Message
Unnecessary duplication of receiver.
Try adding a not-null assertion ('!') to make the type non-nullable. Its category is errorProne. It is stable since Dart 2.12.
- Code
cast_nullable_to_non_nullable- Message
Don't cast a nullable value to a non-nullable type.
Try invoking 'close' in the function in which the 'Sink' was created. Its category is errorProne, memoryLeaks. It is stable since Dart 2.0.
- Code
close_sinks- Message
Unclosed instance of 'Sink'.
Try changing the argument or element type to match. Its category is unintentional. It is stable since Dart 2.19.
- Code
collection_methods_unrelated_type- Message
The argument type '{}' isn't related to '{}'.
Try sorting the combinator names alphabetically. Its category is style. It is stable since Dart 2.19.
- Code
combinators_ordering- Message
Sort combinator names alphabetically.
Try creating the file referenced by the URI, or try using a URI for a file that does exist. Its category is errorProne. It is stable since Dart 2.16.
- Code
conditional_uri_does_not_exist- Message
The target of the conditional URI '{}' doesn't exist.
Try changing the name to follow the lowerCamelCase style. Its category is style. It is stable since Dart 2.0.
- Code
constant_identifier_names- Message
The constant name '{}' isn't a lowerCamelCase identifier.
Try restructuring the code. Its category is errorProne. It is stable since Dart 2.0.
- Code
control_flow_in_finally- Message
Use of '{}' in a 'finally' clause.
Try wrapping the statement in a block. Its category is errorProne. It is stable since Dart 2.0.
- Code
curly_braces_in_flow_control_structures- Message
Statements in {} should be enclosed in a block.
Try adding a dependency for '…' in the 'pubspec.yaml' file. Its category is pub. It is stable since Dart 2.14.
- Code
depend_on_referenced_packages- Message
The imported package '{}' isn't a dependency of the importing package.
Try marking the constructor as deprecated. Its category is style. It is stable since Dart 2.13.
- Code
deprecated_consistency- Message
Constructors in a deprecated class should be deprecated.- Message
Fields that are initialized by a deprecated parameter should be deprecated.- Message
Parameters that initialize a deprecated field should be deprecated.
Try replacing the use of the deprecated member with the replacement, if a replacement is specified. Its category is languageFeatureUsage. It is stable since Dart 3.0.
- Code
deprecated_member_use_from_same_package- Message
'{}' is deprecated and shouldn't be used. {}- Message
'{}' is deprecated and shouldn't be used.
Try describing the property. Its category is errorProne, flutter. It is stable since Dart 2.3.
- Code
diagnostic_describe_all_properties- Message
The public property isn't described by either 'debugFillProperties' or 'debugDescribeChildren'.
Try sorting the directives. Its category is style. It is stable since Dart 2.0.
- Code
directives_ordering- Message
Sort directive sections alphabetically.- Message
Place 'dart:' {} before other {}.- Message
Specify exports in a separate section after all imports.- Message
Place 'package:' {} before relative {}.
Try making the enclosing function 'async' and awaiting the expression.
- Code
discarded_futures- Message
'FutureOr'-returning calls in a non-'async' function.- Message
'Future'-returning calls in a non-'async' function.
Try removing the environment declaration usage. Its category is errorProne. It is stable since Dart 2.9.
- Code
do_not_use_environment- Message
Invalid use of an environment declaration.
Try adding a comment immediately above the ignore comment. Its category is style. It is stable since Dart 3.5.
- Code
document_ignores- Message
Missing documentation explaining why the diagnostic is ignored.
Try adding statements to the block, adding a comment to the block, or removing the 'catch' clause. Its category is style. It is stable since Dart 2.0.
- Code
empty_catches- Message
Empty catch block.
Try replacing the constructor body with ';'. Its category is brevity, effectiveDart, style. It is stable since Dart 2.0.
- Code
empty_constructor_bodies- Message
Empty constructor bodies should be written using a ';' rather than '{}'.
Try replacing the … body with ';'. Its category is style. It is stable since Dart 3.13.
- Code
empty_container_bodies- Message
Empty {} bodies should be written using a ';' rather than '{}'.
Try removing the empty statement or restructuring the code. Its category is errorProne. It is stable since Dart 2.0.
- Code
empty_statements- Message
Unnecessary empty statement.
Try adding a newline at the end of the file. Its category is style. It is stable since Dart 2.14.
- Code
eol_at_end_of_file- Message
Missing a newline at the end of the file.- Message
Too many newlines at the end of the file.
Ensure DartType extension types are erased by using a helper method. Its category is errorProne. It is internal since Dart 3.3.
- Code
erase_dart_type_extension_types- Message
Unsafe use of 'DartType' in an 'is' check.
Try adding case clauses for the missing constants. Its category is errorProne. It is stable since Dart 2.9.
- Code
exhaustive_cases- Message
Missing case clauses for some constants in '{}'.
Try changing the name to follow the lower_case_with_underscores style. Its category is style. It is stable since Dart 2.0.
- Code
file_names- Message
The file name '{}' isn't a lower_case_with_underscores identifier.
Try following the Flutter style for to-do comments. Its category is style. It is stable since Dart 2.1.
- Code
flutter_style_todos- Message
To-do comment doesn't follow the Flutter style.
Try replacing `Future.value` with `Future.syncValue`. Its category is nonPerformant. It is stable since Dart 3.14.
- Code
future_sync_value- Message
For synchronous values, `Future.syncValue` is more performant.
Try overriding '…' or removing '…'. Its category is errorProne. It is stable since Dart 2.0.
- Code
hash_and_equals- Message
Missing a corresponding override of '{}'.
Try importing a public library that exports this library, or removing the import. Its category is style. It is stable since Dart 2.0.
- Code
implementation_imports- Message
Import of a library in the 'lib/src' directory of another package.
Try explicitly tearing off the 'call' method. Its category is style. It is stable since Dart 2.19.
- Code
implicit_call_tearoffs- Message
Implicit tear-off of the 'call' method.
Try marking '…' '…' or annotating it with '@reopen'. Its category is errorProne. It is experimental since Dart 3.0.
- Code
implicit_reopen- Message
The {} '{}' reopens '{}' because it is not marked '{}'.
Try initializing the field where it's declared. Its category is style. It is stable since Dart 3.13.
- Code
initialize_in_field_declaration- Message
Field should be initialized in the field declaration.
Try refactoring the expression to be valid in 3.0. Its category is languageFeatureUsage. It is experimental since Dart 3.0.
- Code
invalid_case_patterns- Message
This expression is not valid in a 'case' clause in Dart 3.0.
Remove the type in the catch clause and try using 'isA' from 'dart:js_interop' within the catch block to check if the value is a JS interop type.
- Code
invalid_runtime_check_with_js_interop_types- Message
Catch clause with type '{}' checks whether the caught value is a JS interop type, which might not be platform-consistent.- Message
Cast from '{}' to '{}' casts a Dart value to a JS interop type, which might not be platform-consistent.- Message
Runtime check between '{}' and '{}' checks whether a Dart value is a JS interop type, which might not be platform-consistent.- Message
Runtime check or cast between '{}' and '{}' involves both a 'dart:js_interop' type and a 'dart:js' type, which are unrelated. 'dart:js' types are Dart wrappers around JS values and aren't JS values themselves.- Message
Cast from '{}' to '{}' casts a JS interop value to a Dart type, which might not be platform-consistent.- Message
Cast from '{}' to '{}' casts a JS interop value to an incompatible JS interop type, which might not be platform-consistent.
Try inlining the assigned value in the 'return' statement. Its category is brevity, style. It is stable since Dart 2.0.
- Code
join_return_with_assignment- Message
Assignment could be inlined in 'return' statement.
Try adding a newline at the beginning of the string. Its category is style. It is stable since Dart 2.8.
- Code
leading_newlines_in_multiline_strings- Message
Missing a newline at the beginning of a multiline string.
Try attaching the annotation to a library directive. Its category is style. It is stable since Dart 2.19.
- Code
library_annotations- Message
This annotation should be attached to a library directive.
Try changing the name to follow the lower_case_with_underscores style. Its category is style. It is stable since Dart 2.0.
- Code
library_names- Message
The library name '{}' isn't a lower_case_with_underscores identifier.
Try changing the prefix to follow the lower_case_with_underscores style. Its category is style. It is stable since Dart 2.0.
- Code
library_prefixes- Message
The prefix '{}' isn't a lower_case_with_underscores identifier.
Try making the private type public, or making the API that uses the private type also be private. Its category is publicInterface. It is stable since Dart 2.14.
- Code
library_private_types_in_public_api- Message
Invalid use of a private type in a public API.
Try breaking the line across multiple lines. Its category is style. It is stable since Dart 2.0.
- Code
lines_longer_than80_chars- Message
The line length exceeds the 80-character limit.
Try changing the expression. Its category is unusedCode. It is stable since Dart 2.2.
- Code
literal_only_boolean_expressions- Message
The Boolean expression has a constant value.
Try using the name of the corresponding parameter in the super constructor. Its category is style. It is stable since Dart 3.0.
- Code
matching_super_parameters- Message
The super parameter named '{}' does not share the same name as the corresponding parameter in the super constructor, '{}'.
Try using the Material or Cupertino package. Its category is flutter.
- Code
migrate_design_widgets- Message
The '{}' library is deprecated.
Try adding whitespace between the strings. Its category is errorProne. It is stable since Dart 2.8.
- Code
missing_whitespace_between_adjacent_strings- Message
Missing whitespace between adjacent strings.
Try adding a comma between the strings. Its category is style. It is stable since Dart 2.0.
- Code
no_adjacent_strings_in_list- Message
Don't use adjacent strings in a list literal.
Try enumerating all the possible values of the switch expression. Its category is style. It is experimental since Dart 2.9.
- Code
no_default_cases- Message
Invalid use of 'default' member in a switch.
Try removing or changing the value. Its category is errorProne. It is stable since Dart 2.0.
- Code
no_duplicate_case_values- Message
The value of the case clause ('{}') is equal to the value of an earlier case clause ('{}').
Try adding an explicit cast or changing the target type. Its category is errorProne. It is stable since Dart 3.13.
- Code
no_dynamic_casts- Message
Implicit cast from 'dynamic'.
Try renaming the prefix to not start with an underscore. Its category is style. It is stable since Dart 2.16.
- Code
no_leading_underscores_for_library_prefixes- Message
The library prefix '{}' starts with an underscore.
Try renaming the variable to not start with an underscore. Its category is style. It is stable since Dart 2.16.
- Code
no_leading_underscores_for_local_identifiers- Message
The local variable '{}' starts with an underscore.
Remove the comparison and use the negation operator `!` if necessary. Its category is effectiveDart, style. It is stable since Dart 3.0.
- Code
no_literal_bool_comparisons- Message
Unnecessary comparison to a boolean literal.
Try moving the logic out of 'createState'. Its category is errorProne, flutter. It is stable since Dart 2.8.
- Code
no_logic_in_create_state- Message
Don't put any logic in 'createState'.
Use explicit type arguments for '…'. Its category is errorProne. It is stable since Dart 3.13.
- Code
no_raw_types- Message
The generic type '{}' should have explicit type arguments but doesn't.
Try removing the usage of 'toString' or restructuring the code. Its category is nonPerformant. It is stable since Dart 2.8.
- Code
no_runtimetype_tostring- Message
Using 'toString' on a 'Type' is not safe in production code.
Try removing the assignment that has no direct effect. Its category is unintentional. It is stable since Dart 3.1.
- Code
no_self_assignments- Message
The variable or property is being assigned to itself.
Try removing the 'soloTest' annotation or 'solo_' prefix. Its category is errorProne. It is internal since Dart 3.10.
- Code
no_solo_tests- Message
Don't commit soloed tests.
Try removing the trailing spaces. Its category is errorProne. It is internal since Dart 3.10.
- Code
no_trailing_spaces- Message
Don't create string literals with trailing spaces in tests.
Use an identifier name that is not a wildcard. Its category is languageFeatureUsage, unintentional. It is stable since Dart 3.1.
- Code
no_wildcard_variable_uses- Message
The referenced identifier is a wildcard.
Try changing the name to follow the lowerCamelCase style. Its category is style. It is stable since Dart 2.0.
- Code
non_constant_identifier_names- Message
The variable name '{}' isn't a lowerCamelCase identifier.
Try removing the expression. Its category is style. It is stable since Dart 2.14.
- Code
noop_primitive_operations- Message
The expression has no effect and can be removed.
Try explicitly testing for 'null'. Its category is style. It is stable since Dart 2.17.
- Code
null_check_on_nullable_type_parameter- Message
The null check operator shouldn't be used on a variable whose type is a potentially nullable type parameter.
Try providing a non-null closure. Its category is errorProne. It is stable since Dart 2.0.
- Code
null_closures- Message
Don't pass 'null' as an argument where a closure is expected.
Try removing the type annotation. Its category is style. It is stable since Dart 2.0.
- Code
omit_local_variable_types- Message
Unnecessary type annotation on a local variable.
Try removing the type annotation. Its category is style. It is stable since Dart 3.11.
- Code
omit_obvious_local_variable_types- Message
Omit the type annotation on a local variable when the type is obvious.
Try removing the type annotation. Its category is style. It is stable since Dart 3.11.
- Code
omit_obvious_property_types- Message
The type annotation isn't needed because it is obvious.
Try making '…' a top-level function and removing the class. Its category is effectiveDart, languageFeatureUsage, style. It is stable since Dart 2.0. The Dart team deprecated it in Dart 3.13.
- Code
one_member_abstracts- Message
Unnecessary use of an abstract class.
Try throwing a different class of object. Its category is style. It is stable since Dart 2.0.
- Code
only_throw_errors- Message
Don't throw instances of classes that don't extend either 'Exception' or 'Error'.
Try removing the field, overriding the getter and setter if necessary. Its category is style. It is stable since Dart 2.0.
- Code
overridden_fields- Message
Field overrides a field inherited from '{}'.
Try changing the name to follow the lower_case_with_underscores style. Its category is style. It is stable since Dart 2.0.
- Code
package_names- Message
The package name '{}' isn't a lower_case_with_underscores identifier.
Try changing the name to '…'. Its category is style. It is stable since Dart 2.0.
- Code
package_prefixed_library_names- Message
The library name is not a dot-separated path prefixed by the package name.
Try using a local variable in place of the parameter. Its category is style. It is stable since Dart 2.0.
- Code
parameter_assignments- Message
Invalid assignment to the parameter '{}'.
Try removing the operator to use adjacent strings. Its category is style. It is stable since Dart 2.0.
- Code
prefer_adjacent_string_concatenation- Message
String literals shouldn't be concatenated by the '+' operator.
Try moving the assert to the initializer list. Its category is style. It is stable since Dart 2.0.
- Code
prefer_asserts_in_initializer_lists- Message
Assert should be in the initializer list.
Try adding a message to the assert. Its category is style. It is stable since Dart 2.3.
- Code
prefer_asserts_with_message- Message
Missing a message in an assert.
Try using a collection literal. Its category is brevity, style. It is stable since Dart 2.0.
- Code
prefer_collection_literals- Message
Unnecessary constructor invocation.
Try using the '??=' operator to conditionally assign a value. Its category is brevity, style. It is stable since Dart 2.0.
- Code
prefer_conditional_assignment- Message
The 'if' statement could be replaced by a null-aware assignment.
Try adding the 'const' keyword to the constructor invocation. Its category is style. It is stable since Dart 2.0.
- Code
prefer_const_constructors- Message
Use 'const' with the constructor to improve performance.
Try adding 'const' to the constructor declaration. Its category is style. It is stable since Dart 2.0.
- Code
prefer_const_constructors_in_immutables- Message
Constructors in '@immutable' classes should be declared as 'const'.
Try replacing 'final' with 'const'. Its category is style. It is stable since Dart 2.0.
- Code
prefer_const_declarations- Message
Use 'const' for final variables initialized to a constant value.
Try adding 'const' before the literal. Its category is style. It is stable since Dart 2.0.
- Code
prefer_const_literals_to_create_immutables- Message
Use 'const' literals as arguments to constructors of '@immutable' classes.
Try converting the method into a constructor. Its category is style. It is stable since Dart 2.0.
- Code
prefer_constructors_over_static_methods- Message
Static method should be a constructor.
Its category is style.
- Code
prefer_contains- Message
Always 'false' because 'indexOf' is always greater than or equal to -1.- Message
Always 'true' because 'indexOf' is always greater than or equal to -1.- Message
Unnecessary use of 'indexOf' to test for containment.
Try using double quotes unless the string contains double quotes. Its category is style. It is stable since Dart 2.4.
- Code
prefer_double_quotes- Message
Unnecessary use of single quotes.
Try using an expression function body. Its category is brevity, style. It is stable since Dart 2.0.
- Code
prefer_expression_function_bodies- Message
Unnecessary use of a block function body.
Try making the field 'final'. Its category is effectiveDart, style. It is stable since Dart 2.0.
- Code
prefer_final_fields- Message
The private field {} could be 'final'.
Try making the pattern final. Its category is style. It is stable since Dart 2.1.
- Code
prefer_final_in_for_each- Message
The pattern should be final.- Message
The variable '{}' should be final.
Try making the variable final. Its category is style. It is stable since Dart 2.0.
- Code
prefer_final_locals- Message
Local variables should be final.
Try making the parameter final. Its category is style. It is stable since Dart 2.14. The Dart team deprecated it in Dart 3.11.
- Code
prefer_final_parameters- Message
The parameter '{}' should be final.
Try using a collection literal with a 'for' element. Its category is brevity, style. It is stable since Dart 2.3.
- Code
prefer_for_elements_to_map_fromiterable- Message
Use 'for' elements when building maps from iterables.
Try using 'forEach' and a tear-off rather than a 'for' loop. Its category is style. It is stable since Dart 2.2.
- Code
prefer_foreach- Message
Use 'forEach' and a tear-off rather than a 'for' loop to apply a function to every element.
Try rewriting the closure assignment as a function declaration. Its category is effectiveDart, style. It is stable since Dart 2.0.
- Code
prefer_function_declarations_over_variables- Message
Use a function declaration rather than a variable assignment to bind a function to a name.
Try using the generic function type syntax ('…'). Its category is style. It is stable since Dart 2.0.
- Code
prefer_generic_function_type_aliases- Message
Use the generic function type syntax in 'typedef's.
Try using an 'if' element rather than a conditional expression. Its category is brevity, style. It is stable since Dart 2.3.
- Code
prefer_if_elements_to_conditional_expressions- Message
Use an 'if' element to conditionally add elements.
Try rewriting the code to use '??'. Its category is brevity, style. It is stable since Dart 2.4.
- Code
prefer_if_null_operators- Message
Use the '??' operator rather than '?:' when testing for 'null'.
Try using an initializing formal ('this.…') to initialize the field. Its category is brevity, style. It is stable since Dart 2.0.
- Code
prefer_initializing_formals- Message
Use an initializing formal to assign a parameter to a field.
Try adding the items to the list literal directly. Its category is brevity, style. It is stable since Dart 2.3.
- Code
prefer_inlined_adds- Message
The addition of multiple list items could be inlined.- Message
The addition of a list item could be inlined.
Try using an 'int' literal. Its category is style. It is stable since Dart 2.1.
- Code
prefer_int_literals- Message
Unnecessary use of a 'double' literal.
Try using string interpolation to build the composite string. Its category is style. It is stable since Dart 2.0.
- Code
prefer_interpolation_to_compose_strings- Message
Use interpolation to compose strings and values.
Its category is errorProne.
- Code
prefer_is_empty- Message
The comparison is always 'false' because the length is always greater than or equal to 0.- Message
The comparison is always 'true' because the length is always greater than or equal to 0.- Message
Use 'isEmpty' instead of 'length' to test whether the collection is empty.- Message
Use 'isNotEmpty' instead of 'length' to test whether the collection is empty.
Try rewriting the expression to use 'isNotEmpty'. Its category is style. It is stable since Dart 2.0.
- Code
prefer_is_not_empty- Message
Use 'isNotEmpty' rather than negating the result of 'isEmpty'.
Try rewriting the condition to use the 'is!' operator. Its category is brevity, style. It is stable since Dart 2.7.
- Code
prefer_is_not_operator- Message
Use the 'is!' operator rather than negating the value of the 'is' operator.
Try rewriting the expression to use 'whereType'. Its category is style. It is stable since Dart 2.0.
- Code
prefer_iterable_wheretype- Message
Use 'whereType' to select elements of a given type.
Try converting '…' to a mixin. Its category is languageFeatureUsage, style. It is stable since Dart 2.1.
- Code
prefer_mixin- Message
Only mixins should be mixed in.
Try using '?.call()' to invoke the function. Its category is brevity, style. It is stable since Dart 2.14.
- Code
prefer_null_aware_method_calls- Message
Use a null-aware invocation of the 'call' method rather than explicitly testing for 'null'.
Try using '?.'. Its category is brevity, style. It is stable since Dart 2.2.
- Code
prefer_null_aware_operators- Message
Use the null-aware operator '?.' rather than an explicit 'null' comparison.
Try converting the URI to a relative URI. Its category is errorProne. It is stable since Dart 2.6.
- Code
prefer_relative_imports- Message
Use relative imports for files in the 'lib' directory.
Try using single quotes unless the string contains single quotes. Its category is style. It is stable since Dart 2.0.
- Code
prefer_single_quotes- Message
Unnecessary use of double quotes.
Try using the spread operator ('...') to inline the addition. Its category is brevity, style. It is stable since Dart 2.3.
- Code
prefer_spread_collections- Message
The addition of multiple elements could be inlined.
Try adding a type annotation. Its category is errorProne, unintentional. It is stable since Dart 2.0.
- Code
prefer_typing_uninitialized_variables- Message
An uninitialized field should have an explicit type annotation.- Message
An uninitialized variable should have an explicit type annotation.
Try using 'void' instead. Its category is errorProne. It is stable since Dart 2.2.
- Code
prefer_void_to_null- Message
Unnecessary use of the type 'Null'.
Try using the constructor to provide a message ('@Deprecated("message")'). Its category is publicInterface. It is stable since Dart 2.2.
- Code
provide_deprecation_message- Message
Missing a deprecation message.
Try adding documentation for the member. Its category is publicInterface, style. It is stable since Dart 2.0.
- Code
public_member_api_docs- Message
Missing documentation for a public member.
Try changing the value being returned. Its category is errorProne, unintentional. It is stable since Dart 2.0.
- Code
recursive_getters- Message
The getter '{}' recursively returns itself.
Try removing the deprecated element. Its category is publicInterface. It is stable since Dart 3.10.
- Code
remove_deprecations_in_breaking_versions- Message
Remove deprecated elements in breaking versions.
Try adding a trailing comma. Its category is style. It is stable since Dart 2.14.
- Code
require_trailing_commas- Message
Missing a required trailing comma.
Try using a secure protocol, such as 'https'. Its category is pub. It is stable since Dart 2.16.
- Code
secure_pubspec_urls- Message
The '{}' protocol shouldn't be used because it isn't secure.
Try simplifying the directive path. Its category is style. It is stable since Dart 3.12.
- Code
simple_directive_paths- Message
Use simple directive paths.
Try removing the redundant … identification. Its category is style. It is stable since Dart 3.11.
- Code
simplify_variable_pattern- Message
The {} identification '{}:' is redundant and can be removed.
Try using a 'SizedBox' rather than a 'Container'. Its category is flutter, style. It is stable since Dart 2.9.
- Code
sized_box_for_whitespace- Message
Use a 'SizedBox' to add whitespace to a layout.
Try using 'SizedBox.…' and removing the 'height' and 'width' arguments. Its category is flutter, style. It is stable since Dart 2.16.
- Code
sized_box_shrink_expand- Message
Use 'SizedBox.{}' to avoid needing to specify the 'height' and 'width'.
Try moving the argument to the end of the argument list. Its category is flutter, style. It is stable since Dart 2.4.
- Code
sort_child_properties_last- Message
The '{}' argument should be last in widget constructor invocations.
Try moving the constructor declaration before all other members. Its category is style. It is stable since Dart 2.0.
- Code
sort_constructors_first- Message
Constructor declarations should be before non-constructor declarations.
Try sorting the dependencies alphabetically (A to Z). Its category is pub. It is stable since Dart 2.1.
- Code
sort_pub_dependencies- Message
Dependencies not sorted alphabetically.
Try moving the unnamed constructor before all other constructors. Its category is style. It is stable since Dart 2.0.
- Code
sort_unnamed_constructors_first- Message
Invalid location for the unnamed constructor.
Try adding a type annotation. Its category is style. It is stable since Dart 3.11.
- Code
specify_nonobvious_local_variable_types- Message
Specify the type of a local variable when the type is non-obvious.
Try adding a type annotation. Its category is style. It is stable since Dart 3.11.
- Code
specify_nonobvious_property_types- Message
A type annotation is needed because it isn't obvious.
Try adding a type annotation. Its category is style. It is stable since Dart 3.7.
- Code
strict_top_level_inference- Message
Missing type annotation.
Try using pattern matching on a variable instead. Its category is unintentional, style, languageFeatureUsage, errorProne. It is stable since Dart 3.9.
- Code
switch_on_type- Message
Avoid switch statements on a 'Type'.
Try testing the type of '…'. Its category is errorProne. It is stable since Dart 2.0.
- Code
test_types_in_equals- Message
Missing type test for '{}' in '=='.
Try moving the '…' outside the 'finally' block. Its category is errorProne. It is stable since Dart 2.0.
- Code
throw_in_finally- Message
Use of '{}' in a 'finally' block.
Try adding a type annotation and removing the 'assert'. Its category is style. It is stable since Dart 2.12.
- Code
tighten_type_of_initializing_formals- Message
Use a type annotation rather than 'assert' to enforce non-nullability.
Try adding a type annotation. Its category is effectiveDart, publicInterface. It is stable since Dart 2.0.
- Code
type_annotate_public_apis- Message
Missing type annotation on a public API.
Try removing the type. Its category is effectiveDart, style. It is stable since Dart 2.0.
- Code
type_init_formals- Message
Don't needlessly type annotate initializing formals.
Replace with 'TypeName _'. Its category is style. It is stable since Dart 3.0.
- Code
type_literal_in_constant_pattern- Message
Use 'TypeName _' instead of a type literal.
Try adding an 'await'.
- Code
unawaited_futures- Message
Missing an 'await' for the 'FutureOr' computed by this expression.- Message
Missing an 'await' for the 'Future' computed by this expression.