dart_pdf icon indicating copy to clipboard operation
dart_pdf copied to clipboard

Flutter 3.19 support

Open adil192 opened this issue 4 months ago • 0 comments

Describe the bug Compilation/tests fail with this error after upgrading to Flutter 3.19.0 stable:

> flutter test -r expanded test/cleanup_assets_test.dart 
00:00 +0: loading /home/ahann/Documents/GitHub/saber/test/cleanup_assets_test.dart
../../../.pub-cache/hosted/pub.dev/pdf_widget_wrapper-1.0.2/lib/src/widget_wrapper.dart:173:11: Error: No named parameter with the name 'physicalConstraints'.
          physicalConstraints: BoxConstraints(
          ^^^^^^^^^^^^^^^^^^^
../../Sources/flutter/packages/flutter/lib/src/rendering/view.dart:23:9: Context: Found this candidate, but the arguments don't match.
  const ViewConfiguration({
        ^^^^^^^^^^^^^^^^^
00:00 +0 -1: loading /home/ahann/Documents/GitHub/saber/test/cleanup_assets_test.dart [E]
  Failed to load "/home/ahann/Documents/GitHub/saber/test/cleanup_assets_test.dart": Compilation failed for testPath=/home/ahann/Documents/GitHub/saber/test/cleanup_assets_test.dart
00:00 +0 -1: Some tests failed.

To Reproduce Compile with 3.19 stable. Note that I'm using the master channel here instead of the latest pub.dev because https://github.com/DavBfr/dart_pdf/pull/1460 hasn't been published yet.

Flutter Doctor

> flutter doctor -v
[✓] Flutter (Channel stable, 3.19.0, on Pop!_OS 22.04 LTS 6.6.10-76060610-generic, locale en_US.UTF-8)
    • Flutter version 3.19.0 on channel stable at /home/ahann/Documents/Sources/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision bae5e49bc2 (3 days ago), 2024-02-13 17:46:18 -0800
    • Engine revision 04817c99c9
    • Dart version 3.3.0
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /home/ahann/Android/Sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /home/ahann/.local/share/JetBrains/Toolbox/apps/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 14.0.0-1ubuntu1.1
    • cmake version 3.22.1
    • ninja version 1.10.1
    • pkg-config version 0.29.2

[✓] Android Studio (version 2023.1)
    • Android Studio at /home/ahann/.local/share/JetBrains/Toolbox/apps/android-studio
    • 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.86.2)
    • VS Code at /usr/share/code
    • Flutter extension version 3.82.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Pop!_OS 22.04 LTS 6.6.10-76060610-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 121.0.6167.184

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

• No issues found!

Additional context

The flutter/packages/flutter/lib/src/rendering/view.dart file has this constructor:

/// The layout constraints for the root render object.
@immutable
class ViewConfiguration {
  /// Creates a view configuration.
  ///
  /// By default, the view has zero [size] and a [devicePixelRatio] of 1.0.
  const ViewConfiguration({
    this.size = Size.zero,
    this.devicePixelRatio = 1.0,
  });

  /// The size of the output surface.
  final Size size;

  /// The pixel density of the output surface.
  final double devicePixelRatio;

adil192 avatar Feb 16 '24 15:02 adil192