Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug plugin not working #16

Closed
maxTeste opened this issue May 31, 2021 · 6 comments
Closed

bug plugin not working #16

maxTeste opened this issue May 31, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@maxTeste
Copy link

maxTeste commented May 31, 2021

hi,
i'm using this plugin and out of nowhere the plugin stopped working and gives this error:

/opt/flutter/.pub-cache/hosted/pub.dartlang.org/pdf_viewer_jk-2.1.2/lib/src/document.dart:75:14: Error: The class 'File' is abstract and can't be instantiated.
file = File("${dir.path}/file.pdf");
^^^^
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/pdf_viewer_jk-2.1.2/lib/src/document.dart:83:26: Error: Non-nullable variable 'file' must be assigned before it can be used.
document._filePath = file.path;
^^^^
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/pdf_viewer_jk-2.1.2/lib/src/document.dart:86:24: Error: Non-nullable variable 'file' must be assigned before it can be used.
{'filePath': file.path, 'clearCacheDir': clearPreviewCache});
^^^^

edit:
I also tested with the code that is in the github repository and gives the same problem

@WolfWeasel
Copy link

I have the same error on version 2.1.0. I upgraded from 2.0.0-nullsafety.

@thejundguy
Copy link

same error, any workaround? i'm on flutter 2.2.1

@jawadsahil jawadsahil added the bug Something isn't working label Jun 1, 2021
@jawadsahil
Copy link
Owner

What is your flutter , and dart version?

@souurz
Copy link

souurz commented Jun 1, 2021

The error occurred after "pub upgrade". Latest version library: pdf_viewer_jk: ^2.1.0
[✓] Flutter (Channel beta, 2.2.0, on Mac OS X 10.15.7 19H2 darwin-x64, locale ru-RU)
• Flutter version 2.2.0
• Framework revision b22742018b (3 weeks ago), 2021-05-14 19:12:57 -0700
• Engine revision a9d88a4d18
• Dart version 2.13.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Platform android-S, build-tools 30.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1

@jawadsahil
Copy link
Owner

The bug arises after upgrade to Flutter 2.2. It was OK with Flutter 2.0. I will be publishing an update soon for Flutter 2.2.

@jawadsahil
Copy link
Owner

published pdf_viewer_jk-2.1.3.. Please upgrade.

@xarmatura xarmatura mentioned this issue Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants