partitionImagePaths function
Splits candidates into image paths and everything else.
Implementation
({List<String> images, List<String> other}) partitionImagePaths(
Iterable<String> candidates,
) {
final images = <String>[];
final other = <String>[];
for (final candidate in candidates) {
if (isImagePath(candidate)) {
images.add(candidate);
} else {
other.add(candidate);
}
}
return (images: images, other: other);
}