date_time_picker icon indicating copy to clipboard operation
date_time_picker copied to clipboard

What‘s type of "late"?

Open wyz2016 opened this issue 3 years ago • 1 comments

捕获

wyz2016 avatar Mar 27 '21 09:03 wyz2016

With nullsafety, by default dart interpret that all variables should be not null, so, you always need to set the initial value. However, if you want a nullable variable, you need to tell dart using ? like (int? varName) that this specific variable is nullable. Now, LATE is a way to tell dart that this variable is not nullable, but the initial value will be set in another point of the code before you using it. In other words, this is a compromise that you will set the initial value before using it.

hslbetto avatar Mar 29 '21 12:03 hslbetto