Skip to content

new lint: if_null_boolean_conversions (use ?? to convert null to a boolean value.) #58324

@pq

Description

@pq

I'm sure someone can come up with a better name but the rationale is in dart-archive/linter#2458 (comment). The advice from effective Dart is

DO use ?? to convert null to a boolean value.

See: https://dart.dev/guides/language/effective-dart/usage#do-use--to-convert-null-to-a-boolean-value

Cheers @a14n for the suggestion 🍻 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    devexp-linterIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions