binSaed / flutter_cached_pdfview

Enhanced PDF view for Flutter.
https://pub.dev/packages/flutter_cached_pdfview
MIT License
121 stars 70 forks source link

error at build for backgroundColor attribute #112

Closed satoyan closed 2 weeks ago

satoyan commented 2 weeks ago

Describe the bug An error below ocured when I ran my app

../../../.pub-cache/hosted/pub.dev/flutter_cached_pdfview-0.4.3/lib/src/pdf_view_wrapper.dart:41:7: Error: No named parameter with the name 'backgroundColor'.
      backgroundColor: pdf.backgroundColor,
      ^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/flutter_pdfview-1.3.2/lib/flutter_pdfview.dart:19:9: Context: Found this candidate, but the arguments don't match.
  const PDFView({
        ^^^^^^^
Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

To Reproduce Steps to reproduce the behaviour: _lib/feature/common/ui/widget/pdf_viewer.dart:41_

      child: PDF(
        onError: logger.e,

      ).fromUrl(
        url,

Expected behaviour compile done successfully.

binSaed commented 2 weeks ago

Add this to your pubspec.yaml file:

dependencies:
  flutter_pdfview: 1.3.4
satoyan commented 2 weeks ago

@binSaed
thank you.

Then you need to write that somewhere in document .