non_null

Last updated:

0 purchases

non_null Image
non_null Images
Add to Cart

Description:

non null

NonNull Annotaion #
Only annotaion @non_null.
Use it to specify arguments or returned values are not nullable.
You should not give null to @non_null annotated arguments.
And you should expect returned values from @non_null annotated functions or methods.
It expects to be used by linters, source_gen Generators or something else.
Example #
See example/main.dart.
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);
}
copied to clipboard
License #
NonNull Annotation by kikuchy is licensed under the Apache License, Version2.0

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.