Linter for Dart.
implicit_reopen
unnecessary_breaks
type_literal_in_constant_pattern
enable_null_safety
invariant_booleans
prefer_bool_in_asserts
prefer_equal_for_default_values
super_goes_last
unnecessary_parenthesis
false-positives with null-aware expressionsvoid_checks
to allow assignments of Future<dynamic>?
to parameters
typed FutureOr<void>?
use_build_context_synchronously
in if conditionsavoid_private_typedef_functions
with generalized
type aliasesunnecessary_parenthesis
to detect some doubled parensvoid_checks
to allow returning Never
as voidno_adjacent_strings_in_list
to support set literals and for- and
if-elementsavoid_types_as_parameter_names
to handle type variablesavoid_positional_boolean_parameters
to handle typedefsavoid_redundant_argument_values
to check parameters of redirecting
constructorsprefer_const_literals_to_create_immutables
use_build_context_synchronously
to check context propertiesunnecessary_parenthesis
support for property accesses and method
invocationsonly_throw_errors
to not report on values of type Never
prefer_mixin
to handle class mixinsunnecessary_null_checks
to ignore Future.value
and
Completer.complete
unnecessary_parenthesis
false positives on constant patternsinvalid_case_patterns
unnecessary_const
to handle case patternsunnecessary_parenthesis
unreachable_from_main
to report unreachable public static fields,
getters, setters, and methods, that are declared on public classes, mixins,
enums, and extensionsunnecessary_parenthesis
false-positive with null-aware expressionsvoid_checks
to allow assignments of Future<dynamic>?
to parameters
typed FutureOr<void>?
enable_null_safety
invariant_booleans
prefer_bool_in_asserts
prefer_equal_for_default_values
super_goes_last
unnecessary_parenthesis
to detect some doubled parensvoid_checks
to allow returning Never
as voidunnecessary_breaks
use_build_context_synchronously
in if conditionsno_adjacent_strings_in_list
to support set literals and for- and
if-elementsprefer_equal_for_default_values
to not report for SDKs >=2.19
,
where this lint is now an analyzer diagnostic.unrelated_type_equality_checks
to support updated package:fixnum
structure.enable_null_safety
library_annotations
dangling_library_doc_comments
no_leading_underscores_for_local_identifiers
to not report super formals as local variablesunnecessary_overrides
false negativescancel_subscriptions
for nullable fieldscollection_methods_unrelated_type
library_names
to support unnamed librariesunnecessary_parenthesis
support for as-expressionsuse_build_context_synchronously
to check for context property accessescomment_references
unnecessary_brace_in_string_interps
for this
expressionsuse_build_context_synchronously
for BuildContext.mounted
flutter_style_todos
to handle more casesuse_build_context_synchronously
to check for BuildContext
s in named expressionsexhaustive_cases
to check parenthesized expressionsavoid_null_checks_in_equality_operators
join_return_with_statement
recursive_getters
unnecessary_lambdas
diagnostic_describe_all_properties
prefer_foreach
avoid_escaping_inner_quotes
cascade_invocations
tighten_type_of_initializing_formals
prefer_interpolation_to_compose_strings
prefer_constructors_over_static_methods
avoid_returning_null
parameter_assignments
prefer_constructors_over_static_methods
prefer_interpolation_to_compose_strings
avoid_returning_null
avoid_returning_this
flutter_style_todos
avoid_positional_boolean_parameters
prefer_const_constructors
implicit_call_tearoffs
unnecessary_library_directive
avoid_redundant_argument_values
to work with enum declarationsprefer_contains
unreachable_from_main
DartTypeUtilities
refactoringavoid_redundant_argument_values
when referencing required
parameters in legacy librariesuse_late_for_private_fields_and_variables
use_string_in_part_of_directives
use_super_parameters
false positive with repeated super
parameter referencesuse_late_for_private_fields_and_variables
to handle enumsprefer_contains
false positive when start index is non-zeronoop_primitive_operations
to catch .toString()
in string interpolationspublic_member_api_docs
to report diagnostics on extension
names (instead of bodies)DartTypeUtilities
refactoringcombinators_ordering
use_colored_box
and use_decorated_box
to not over-report
on containers without a childunnecessary_parenthesis
on a map-or-set
literal at the start of an expression statementprefer_final_locals
reporting on fieldsunnecessary_overrides
to allow overrides on @Protected
membersavoid_multiple_declarations_per_line
false positive in
for
statementsprefer_final_locals
false positive on declaration lists
with at least one non-final variableuse_build_context_synchronously
to handle await
s in
if
conditionsdiscarded_futures
no_duplicate_case_values
lines_longer_than_80_chars
,
prefer_const_constructors_in_immutables
, andprefer_initializing_formals