Skip to content
Discussion options

You must be logged in to vote

A non nullable parameter is simply Type paramName in nullable aware code. With Type paramName!! you get a non nullable parameter with an explicit runtime check (a potential nullable violation causes just a warning which can be ignored or suppressed).
This can be used for example for your public API which wants to enforce non null values for certain parameters. If your API might be used in a non-nullable aware environment you can avoid issues based on contract violations with this feature.

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@heyajulia
Comment options

@bernd5
Comment options

@heyajulia
Comment options

Answer selected by heyajulia
Comment options

You must be logged in to vote
1 reply
@heyajulia
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants