ScerIO / packages.flutter

👨‍💻 Plugins and packages for Flutter framework
https://pub.dev/publishers/serge.software/packages
MIT License
461 stars 454 forks source link

Flutter Web -> openData throws null is not a subtype of JSObject #525

Open joseianpatrick opened 3 months ago

joseianpatrick commented 3 months ago

Describe the bug A clear and concise description of what the bug is.

Flutter Web, it throws this error

final document = await PdfDocument.openData(platformFile.bytes!);

TypeError: null: type 'Null' is not a subtype of type 'JSObject'

It works in mobile

To Reproduce Steps to reproduce the behavior:

  1. in Flutter web, when using PdfDocument.openData(platformFile.bytes)

Expected behavior A clear and concise description of what you expected to happen.

  1. Should get the pdf page normally

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

ukchanJung commented 2 months ago

me too plz fix