Problem with pdf viewer plugin

Hello,

Do you know how I can solve this package problem?

…/…/…/Dart/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_pdf_viewer-1.0.4/lib/src/page.dart:33:26: 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) {
    ^
    3

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 https://help.gradle.org

BUILD FAILED in 14s
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