contains 抽象方法
- Object? element
override
检查 value
是否在集合中。
final characters = <String>{'A', 'B', 'C'};
final containsB = characters.contains('B'); // true
final containsD = characters.contains('D'); // false
实现
bool contains(Object? element);