我知道如何在构造函数中初始化其他变量,例如 int 或 String,但我不知道如何为 List 和 Map 执行此操作。
class StackOverFlowQuestion{ StackOverFlowQuestion({this.test='', this.map=?, this.list=?}); String test; Map map; List list; }
我应该用什么代替问号?
谢谢。
null initialization dart flutter
dart ×1
flutter ×1
initialization ×1
null ×1