extension FirstWhereExt on List { /// The first element satisfying [test], or `null` if there are none. T? firstWhereOrNull(bool Function(T element) test) { for (final element in this) { if (test(element)) return element; } return null; } }