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

An analysis rule that warns about null check operator usage.

example/README.md

Example #

Add the plugin to your project's pubspec.yaml:

dev_dependencies:
  avoid_null_check_operator: ^0.1.0

Enable it in analysis_options.yaml:

plugins:
  avoid_null_check_operator: ^0.1.0

Then restart the Dart Analysis Server. Any use of the null check operator (!) will produce a warning:

int foo(Map? a) {
  return a!['foo']; // warning: Avoid using the null check operator (!).
}
0
likes
130
points
32
downloads

Documentation

API reference

Publisher

verified publisherwolverinebeach.net

Weekly Downloads

An analysis rule that warns about null check operator usage.

License

Apache-2.0 (license)

Dependencies

analysis_server_plugin, analyzer

More

Packages that depend on avoid_null_check_operator