Problem with pdf viewer plugin


Do you know how I can solve this package problem?

…/…/…/Dart/flutter/flutter/.pub-cache/hosted/ Error: The argument type ‹ Null Function(dynamic, dynamic) › can’t be assigned to the parameter type ‹ ImageStreamListener ›.

  • ‹ ImageStreamListener › is from ‹ package:flutter/src/painting/image_stream.dart › (’…/…/…/Dart/flutter/flutter/packages/flutter/lib/src/painting/image_stream.dart’).
    resolver.addListener((imgInfo, alreadyPainted) {

FAILURE: Build failed with an exception.

  • Where:
    Script ‹ C:\Users\utilisateur\Documents\Docs\Dart\flutter\flutter\packages\flutter_tools\gradle\flutter.gradle › line: 997
  • What went wrong:
    Execution failed for task ‹ :app:compileFlutterBuildDebug ›.

Process ‹ command ‹ C:\Users\utilisateur\Documents\Docs\Dart\flutter\flutter\bin\flutter.bat › › finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  • Get more help at

Exception: Gradle task assembleDebug failed with exit code 1

solve this issue by
remove the file “pubspec.lock”
then flutter clean command
then run the project