prefer_equal_for_default_values
Use =
to separate a named parameter from its default value.
This rule has been removed as of the latest Dart releases.
Rule sets: recommended, flutter
Details
DO use =
to separate a named parameter from its default value.
BAD:
m({a: 1})
GOOD:
m({a = 1})
Usage
To enable the prefer_equal_for_default_values
rule,
add prefer_equal_for_default_values
under linter > rules in your
analysis_options.yaml
file:
linter:
rules:
- prefer_equal_for_default_values