【发布时间】:2019-02-20 13:53:22
【问题描述】:
我正在运行 list.firstWhere,这有时会引发异常:
Bad State: No element
When the exception was thrown, this was the stack:
#0 _ListBase&Object&ListMixin.firstWhere (dart:collection/list.dart:148:5)
我不明白这意味着什么,也无法通过查看 at the source 来识别问题。
我的firstWhere 看起来像这样:
list.firstWhere((element) => a == b);
【问题讨论】:
标签: dart