我在重新启动游戏时搜索以删除位置列表
这是我的列表
List<Positioned> snakePiecesWithNewPoints = List();
if (score ==0){
final latestPoint = Positioned(
child: newSnakePointInGame,
left: newPointPosition.x * 15.5,
top: newPointPosition.y * 15.5,
);
snakePiecesWithNewPoints.add(latestPoint);
};
if (score ==1){
final latestPoint1 = Positioned(
child: newSnakeVomiInGame,
left: newPointPosition2.x * 15.5,
top: newPointPosition2.y * 15.5,
);
snakePiecesWithNewPoints.add(latestPoint1);
};
我尝试仅删除LatestPoint1而不是LatestPoint