dart_pdf icon indicating copy to clipboard operation
dart_pdf copied to clipboard

Can not run project with printing 5.13.0

Open datpt11 opened this issue 1 year ago • 7 comments

Describe the bug

../../.pub-cache/hosted/pub.dev/printing-5.13.0/lib/src/preview/page.dart:88:24: Error: The getter 'WidgetState' isn't defined for the class 'PdfPreviewPage'. can not run project To Reproduce Code snippet to reproduce the behavior:

// your code

Expected behavior

Screenshots

Flutter Doctor

Flutter (Channel stable, 3.19.6, on macOS 14.3 23D56 darwin-arm64, locale en-US)
    • Flutter version 3.19.6 on channel stable at /Users/xxx/workspace/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 54e66469a9 (2 months ago), 2024-04-17 13:08:03 -0700
    • Engine revision c4cd48e186
    • Dart version 3.3.4
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/xxx/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/xxx/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

[✓] VS Code (version 1.90.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.90.0

[✓] Connected device (5 available)
    • DinoP (mobile)     • 00008110-001A492836EB801E                • ios            • iOS 17.5.1 21F90
    • iPhone (mobile)    • 1240a15de43a71032b3bbbd6da96172886f2bdfa • ios            • iOS 12.5.7 16H81
    • iPhone 13 (mobile) • FB24DBF4-A79F-43E9-8643-4054E6CDFA73     • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator)
    • macOS (desktop)    • macos                                    • darwin-arm64   • macOS 14.3 23D56 darwin-arm64
    • Chrome (web)       • chrome                                   • web-javascript • Google Chrome 126.0.6478.116

[✓] Network resources
    • All expected network resources are available.

Desktop (please complete the following information):

  • [x] iOS
  • [ ] Android
  • [ ] Browser
  • [ ] Windows
  • [ ] Linux

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

datpt11 avatar Jun 26 '24 15:06 datpt11

your flutter doctor please

DavBfr avatar Jun 26 '24 15:06 DavBfr

oh sorry i updated

datpt11 avatar Jun 26 '24 15:06 datpt11

Looks like it works only on Flutter 3.22

DavBfr avatar Jun 26 '24 15:06 DavBfr

Looks like it works only on Flutter 3.22

No, in flutter 3.19 as well. I have the same problem here

BrunoVieiraL avatar Jun 28 '24 14:06 BrunoVieiraL

@BrunoVieiraL What problem?

DavBfr avatar Jun 28 '24 14:06 DavBfr

I removed version 5.13.0 and published 5.13.1 with Flutter 3.22.0 as minimal requirement.

DavBfr avatar Jun 28 '24 14:06 DavBfr

../../AppData/Local/Pub/Cache/hosted/pub.dev/printing-5.13.1/lib/printing_web.dart:213:124: Error: A value of type 'String' can't be assigned to a variable of type 'JSAny'. '''function ${_frameId}_print(){var f=document.getElementById('$_frameId');f.focus();f.contentWindow.print();}''';

Doctor summary (to see all details, run flutter doctor -v):

[√] Flutter (Channel stable, 3.22.2, on Microsoft Windows [Version 10.0.22631.3880], locale ru-KG) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [√] Chrome - develop for the web [X] Visual Studio - develop Windows apps X Visual Studio not installed; this is necessary to develop Windows apps. Download at https://visualstudio.microsoft.com/downloads/. Please install the "Desktop development with C++" workload, including all of its default components [√] Android Studio (version 2023.3) [√] VS Code (version 1.90.2) [√] Connected device (3 available) [√] Network resources

kymko avatar Jul 17 '24 10:07 kymko