Dart可空声明和非空断言-kotlin

https://youkmi.blog.csdn.net/article/details/108728322?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7EPayColumn-1.pc_relevant_paycolumn_v3&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7EPayColumn-1.pc_relevant_paycolumn_v3&utm_relevant_index=1

 

可空声明

类型?变量名称      与kotlin一样

非空断言

变量名称!          kotlin是2个!!

 

初始化非空变量

required 关键字 或者参数加默认值, late final关键字也一样