Dart: What does a question mark (?) after a variable name mean?

Viewed 3035
1 Answers

"Variable?" is use for null safety. If _contact has value null then we can't check length of variable or it's throw error.

"??" is used for if condition. It's assign value 0.

Check Here for more information.

Related