diff --git a/example/lib/custom/initial_images_custom_example.dart b/example/lib/custom/initial_images_custom_example.dart index a5f0dde..16198b2 100644 --- a/example/lib/custom/initial_images_custom_example.dart +++ b/example/lib/custom/initial_images_custom_example.dart @@ -21,7 +21,7 @@ class _InitialImagesCustomExampleState UniqueKey().toString(), name: "test-image.jpg", extension: "jpg", - path: "https://t.ly/F4XOS", + path: "https://cc-prod.scene7.com/is/image/CCProdAuthor/What-is-Stock-Photography_P1_mobile", ), ImageFile( UniqueKey().toString(), diff --git a/lib/src/image_file_view/error_preview.dart b/lib/src/image_file_view/error_preview.dart index c82a932..11a1326 100644 --- a/lib/src/image_file_view/error_preview.dart +++ b/lib/src/image_file_view/error_preview.dart @@ -41,14 +41,26 @@ class ErrorPreview extends StatelessWidget { IconData _getIcon() { switch (imageFile.extension) { - case 'pdf': - return Icons.picture_as_pdf; - case 'png': - case 'jpg': - case 'jpeg': - case 'gif': - case 'webp': + case "png": + case "jpg": + case "jpeg": + case "svg": + case "webp": return Icons.image; + case "pdf": + return Icons.picture_as_pdf; + case "mp4": + case "mkv": + case "wmv": + case "avi": + case "mov": + case "webm": + return Icons.play_circle; + case "mp3": + case "wav": + case "m4a": + case "ogg": + return Icons.music_note; default: return Icons.find_in_page_rounded; }