From bc3bad362c8c03f9789b1caceb9d26612e21fe9a Mon Sep 17 00:00:00 2001 From: Harvey McQueen Date: Tue, 5 May 2026 10:50:37 -0500 Subject: [PATCH] feat: add HEIC image support on Linux via flutter_image_compress_linux - Add flutter_image_compress_linux dependency for native HEIC/JPEG/PNG/WebP compression on Linux desktop - Change !kIsDesktop to !Platform.isWindows in attachments_service.dart so HEIC conversion runs on Linux (and macOS which already has support) Fixes #117 --- lib/services/ui/attachments_service.dart | 2 +- pubspec.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/services/ui/attachments_service.dart b/lib/services/ui/attachments_service.dart index b07fa18dd..319915caf 100644 --- a/lib/services/ui/attachments_service.dart +++ b/lib/services/ui/attachments_service.dart @@ -346,7 +346,7 @@ class AttachmentsService extends GetxService { } // Handle getting heic and tiff images - if (attachment.mimeType!.contains('image/hei') && !kIsDesktop) { + if (attachment.mimeType!.contains('image/hei') && !Platform.isWindows) { if (await File("$filePath.png").exists()) { originalFile = File("$filePath.png"); } else { diff --git a/pubspec.yaml b/pubspec.yaml index 7b3084709..20bf220da 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -73,6 +73,7 @@ dependencies: flutter_displaymode: ^0.6.0 # android only flutter_dotenv: ^5.1.0 flutter_image_compress: ^2.2.0 + flutter_image_compress_linux: ^0.1.0 flutter_improved_scrolling: ^0.0.3 flutter_isolate: ^2.1.0 flutter_keyboard_visibility: ^6.0.0 # no desktop support