resolveAllValidated method
Resolves this Futures and validates with validate.
Implementation
Future<List<T>> resolveAllValidated(
bool Function(T e) validate, {
T? defaultValue,
}) {
if (isEmpty) {
return Future.value(<T>[]);
}
return Future.wait(this).then((l) {
return l.map((v) => validate(v) ? v : defaultValue as T).toList();
});
}