Lint Rules
This list is auto-generated from our sources.
Rules are organized into familiar rule groups.
Possible coding errors.
Matters of style, largely derived from the official Dart Style Guide.
Pub-related rules.
In addition, rules can be further distinguished by maturity. Unqualified rules are considered stable, while others may be marked experimental to indicate that they are under review. Lints that are marked as deprecated should not be used and are subject to removal in future Linter releases.
Rules can be selectively enabled in the analyzer using analysis options or through an analysis options file.
As some lints may contradict each other, only a subset of these will be enabled in practice, but this list should provide a convenient jumping-off point.
Many lints are included in various predefined rulesets:
flutter create
enables these by default).Rules included in these rulesets are badged in the documentation below.
These rules are under active development. Feedback is welcome!
The argument '{0}' equal default({1}) no need set.
prefer_builder_constructor_for_widgetPrefer use {0}.builder constructor.
prefer_if_null_operators_with_default_boolPrefer using if null operators with default bool value.
prefer_method_not_use_callsPrefer method direct calls instead of call calls.
prefer_switch_casePrefer switch case instead of multiple if else processes.
use_container_property_as_possibleUse Container '{0}' property as possible.