ScerIO / packages.flutter

πŸ‘¨β€πŸ’» Plugins and packages for Flutter framework
https://pub.dev/publishers/serge.software/packages
MIT License
437 stars 420 forks source link

Printing and pdfx are incompatible in windows #490

Open Mapashito1 opened 4 months ago

Mapashito1 commented 4 months ago

Describe the bug When I launch a windows build of my app with modules printing and pdfx, I have a compile problem.

CMake Error at flutter/ephemeral/.plugin_symlinks/printing/windows/DownloadProject.cmake:179 (message): Build step for pdfium failed: 1 Call Stack (most recent call first): flutter/ephemeral/.plugin_symlinks/printing/windows/CMakeLists.txt:36 (download_project)

The problem is variable PDFIUM_VERSION. In pdfx module the value is 4636 and in printing module the value is 5200. It tries to download pdfx variable value instead of printing variable value. I put a debug trace and it's easy to see... image

To Reproduce Launch a windows project with this in pubspec.yaml printing: ^5.11.1 pdfx: ^2.6.0

Additional context Temporaly, I can build a windows app if I make a flutter clean and comment out pdfx import in pubspec.yaml. Then it gives me a error because I use this module in my code but It has downloaded correct libraries. After, I put pdfx import back in pubspec.yaml and it works because printing module uses cache libraries.

Is it necessary "CACHE" variable for PDFIUM_VERSION?

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.16.9, on Microsoft Windows [Versi’n 10.0.22621.3155], locale es-ES)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.4.1)
[√] Android Studio (version 2023.1)
[√] VS Code (version 1.86.2)
[√] Connected device (3 available)
[√] Network resources

β€’ No issues found!