non_null 0.0.1 copy "non_null: ^0.0.1" to clipboard
non_null: ^0.0.1 copied to clipboard

Annotation to express that arguments or returned values are not nullable.

example/main.dart

library non_null.example;

import 'package:non_null/non_null.dart';

@non_null
String foo(@non_null bar) {
    return "FOO $bar";
}

void main() {
    // `value` is not null (if you believe annotation).
    // And DON'T give `null` to foo's argument.
    final value = foo("BAR");
    print(value);
}
0
likes
35
pub points
2%
popularity

Publisher

unverified uploader

Annotation to express that arguments or returned values are not nullable.

Repository (GitHub)
View/report issues

License

Apache-2.0 (LICENSE)

More

Packages that depend on non_null