Exception: Concurrent modification during iteration: Instance(length:17) of '_GrowableList'

后端 未结 3 1436
心在旅途
心在旅途 2021-01-03 22:40

I make game. In //ERROR ZONE is called Exception. I don\'t understand it. Class game has List recrangles.

void sp         


        
3条回答
  •  清歌不尽
    2021-01-03 23:18

    try to avoid loop List too much. Using this:

    list.removeWhere((element) => element % 2 == 1;
    

提交回复
热议问题