fluttercandies / flutter_image_compress

flutter image compress
MIT License
632 stars 215 forks source link

[Bug report] Run FlutterImageCompress.compressWithList on flutter web get the exaptation: "Expected a value of type 'Function', but got one of type 'Null'" #293

Closed MayaBloodsAI closed 5 months ago

MayaBloodsAI commented 5 months ago

Version

2.1.0

Platforms

Web

Device Model

Chrome

flutter info

[√] Flutter (Channel stable, 3.16.2, on Microsoft Windows [Version 10.0.19045.4046], locale en-IL)
    • Flutter version 3.16.2 on channel stable at C:\Users\Maya\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 9e1c857886 (4 months ago), 2023-11-30 11:51:18 -0600
    • Engine revision cf7a9d0800
    • Dart version 3.2.2
    • DevTools version 2.28.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\Maya\AppData\Local\Android\Sdk
    • Platform android-33, build-tools 30.0.3
    • ANDROID_SDK_ROOT = C:\Users\Maya\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[X] Visual Studio - develop Windows apps
    X Visual Studio not installed; this is necessary to develop Windows apps.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

[√] Android Studio (version 2021.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version openjdk version "11.0.13" 2021-10-19

[√] VS Code (version 1.86.1)
    • VS Code at C:\Users\Maya\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.84.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19045.4046]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 122.0.6261.112
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 122.0.2365.80

[√] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

How to reproduce?

capturedImage = await FlutterImageCompress.compressWithList(
  capturedImage,
  minWidth: 300,
);

Logs

Expected a value of type 'Function', but got one of type 'Null'

Example code (optional)

capturedImage = await FlutterImageCompress.compressWithList(
      capturedImage,
      minWidth: 300,
    );

Contact

No response