avoid_null_check_operator 0.1.1 copy "avoid_null_check_operator: ^0.1.1" to clipboard
avoid_null_check_operator: ^0.1.1 copied to clipboard

An analysis rule that warns about null check operator usage.

pub package

A Dart analyzer plugin that warns about null check operator (!) usage.

Requires Dart 3.10+ (Flutter 3.38+).

Null check operators will cause failures at runtime without any kind of compile-time warning when expectations of the code around them changes. Even if a particular usage looks safe today, they are easy to miss, and there is nothing preventing anyone from making a mistake tomorrow.

As such, it is better to avoid them entirely.

Usage #

Add to your pubspec.yaml:

dev_dependencies:
  avoid_null_check_operator: ^0.1.0

Then add to analysis_options.yaml:

plugins:
  avoid_null_check_operator: ^0.1.0

Restart the Dart Analysis Server to activate.

0
likes
150
points
30
downloads

Documentation

API reference

Publisher

verified publisherwolverinebeach.net

Weekly Downloads

An analysis rule that warns about null check operator usage.

Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

analysis_server_plugin, analyzer

More

Packages that depend on avoid_null_check_operator