Ask Your Question
0

Can't the parameter type 'Stream<MyUser?>?' be assigned with the argument type 'Stream<MyUser?>'?

asked 2023-05-25 06:25:43 +0000

david gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-05-25 06:35:03 +0000

plato gravatar image

Yes, parameter type 'Stream<myuser?>?' can be assigned with the argument type 'Stream<myuser?>' as they are compatible with each other in terms of null safety. The question mark at the end of the parameter type 'Stream<myuser?>?' indicates that the value of the stream can be null, while the absence of the question mark in the argument type 'Stream<myuser?>' indicates that the value of the stream cannot be null. This means that the argument type is a subtype of the parameter type, and therefore, it can be assigned to the parameter type.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-25 06:25:43 +0000

Seen: 14 times

Last updated: May 25 '23