最佳答案
class GamePage extends StatelessWidget {
int _row;
int _column;
GamePage(this._row,this._column);
@override
Widget build(BuildContext context) {
return new Material(
color: Colors.deepPurpleAccent,
child:new Expanded(
child:new GridView.count(crossAxisCount: _column,children: new List.generate(_row*_column, (index) {
return new Center(
child: new CellWidget()
);
}),) )
);
}
}
附加错误截图。