boardgames_app/lib/utils/commons.dart
2025-06-14 14:28:16 +02:00

8 lines
176 B
Dart

E? findWhere<E>(List<E> elements, bool Function(E element) test) {
for (final element in elements) {
if (test(element)) {
return element;
}
}
return null;
}