This commit is contained in:
Dominik 2026-02-24 19:15:15 +02:00 committed by GitHub
commit c625b62f81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,7 +33,7 @@ extension SpotubeImageExtensions on List<SpotubeImageObject>? {
int index = 1,
required ImagePlaceholder placeholder,
}) {
final sortedImage = this?.sorted((a, b) => a.width!.compareTo(b.width!));
final sortedImage = this?.sorted((a, b) => (a.width ?? 0).compareTo(b.width ?? 0));
return sortedImage != null && sortedImage.isNotEmpty
? sortedImage[