我正在做一个扑朔迷离的项目。我想将列表从一页传递到另一页。但这对我没用
List list;
articleCall save = await Navigator.of(context).push(new MaterialPageRoute<articleCall>(
builder: (BuildContext context) {
return new AddArticleDialog(list);
},
-----------
class AddArticleDialog extends StatefulWidget {
List ls=[];
AddArticleDialog({this.ls});
@override
AddArticleDialogState createState() => new AddArticleDialogState();
}
它告诉我错误:位置参数过多:期望0,但发现1。请帮助
谢谢, 沙沙语