avoid_non_null_assertion_operator 1.1.0 copy "avoid_non_null_assertion_operator: ^1.1.0" to clipboard
avoid_non_null_assertion_operator: ^1.1.0 copied to clipboard

A custom lint package to forbid the non-null assertion operator (!).

example/main.dart

class A {
  String? nullable;
}

void main() {
  String? nullable = "test";
  String nonNullable = nullable!; // Should trigger the lint

  A a = A();
  String nonNullable2 = a.nullable!; // Should trigger the lint
}
0
likes
0
points
1.18k
downloads

Publisher

unverified uploader

Weekly Downloads

A custom lint package to forbid the non-null assertion operator (!).

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

analyzer, custom_lint, custom_lint_builder

More

Packages that depend on avoid_non_null_assertion_operator