Example from pub dev returns this mensage:
Somebody save me :)
Hi CLAUDIO DIEGO SOUSA RAMOS,
We tried to replicate the issue with provided details, but the PDF is loaded properly on our end. For your reference we have prepared the sample and it can be downloaded from the attachment. Kindly share the modified issue reproducing in sample and also share the following details,
syncfusion_flutter_pdfviewer version
Flutter SDK version
Issue reproducing document
Issue reproducing steps
This information will be helpful for us to provide the prompt solution at earliest.
Regards,
Deepika R
I am having similart issue.
BUILD FAILED in 2m 28s
Retrying Gradle Build: #1, wait time: 100ms
[!] Gradle threw an error while downloading artifacts from the network.
Running Gradle task 'assembleOneAppProductionDebug'...
../../../../.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_core-20.4.48/lib/src/widgets/interactive_scroll_viewer.dart:59:9: Error: Type 'PanAxis' not found.
final PanAxis panAxis;
^^^^^^^
../../../../.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_core-20.4.48/lib/src/widgets/interactive_scroll_viewer.dart:15:22: Error: Undefined name 'PanAxis'.
this.panAxis = PanAxis.free,
^^^^^^^
../../../../.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-20.4.48/lib/src/pdfviewer.dart:1016:54: Error: Method 'readState' cannot be called on 'PageStorageBucket?' because it is potentially null.
- 'PageStorageBucket' is from 'package:flutter/src/widgets/page_storage.dart' ('../../../../fvm/versions/3.3.3/packages/flutter/lib/src/widgets/page_storage.dart').
Try calling using ?. instead.
final dynamic offset = PageStorage.of(context).readState(context);
^^^^^^^^^
../../../../.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-20.4.48/lib/src/pdfviewer.dart:1020:12: Error: Method 'readState' cannot be called on 'PageStorageBucket?' because it is potentially null.
- 'PageStorageBucket' is from 'package:flutter/src/widgets/page_storage.dart' ('../../../../fvm/versions/3.3.3/packages/flutter/lib/src/widgets/page_storage.dart').
Try calling using ?. instead.
.readState(context, identifier: 'zoomLevel_${widget.key}');
^^^^^^^^^
../../../../.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-20.4.48/lib/src/pdfviewer.dart:3244:35: Error: Method 'writeState' cannot be called on 'PageStorageBucket?' because it is potentially null.
- 'PageStorageBucket' is from 'package:flutter/src/widgets/page_storage.dart' ('../../../../fvm/versions/3.3.3/packages/flutter/lib/src/widgets/page_storage.dart').
Try calling using ?. instead.
PageStorage.of(context).writeState(
^^^^^^^^^^
../../../../.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-20.4.48/lib/src/pdfviewer.dart:3272:35: Error: Method 'writeState' cannot be called on 'PageStorageBucket?' because it is potentially null.
- 'PageStorageBucket' is from 'package:flutter/src/widgets/page_storage.dart' ('../../../../fvm/versions/3.3.3/packages/flutter/lib/src/widgets/page_storage.dart').
Try calling using ?. instead.
PageStorage.of(context).writeState(
^^^^^^^^^^
../../../../.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_core-20.4.48/lib/src/widgets/interactive_scroll_viewer.dart:59:9: Error: 'PanAxis' isn't a type.
final PanAxis panAxis;
^^^^^^^
../../../../.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_core-20.4.48/lib/src/widgets/interactive_scroll_viewer.dart:299:9: Error: No named parameter with the name 'panAxis'.
panAxis: widget.panAxis,
^^^^^^^
../../../../fvm/versions/3.3.3/packages/flutter/lib/src/widgets/interactive_viewer.dart:61:3: Context: Found this candidate, but the arguments don't match.
InteractiveViewer({
^^^^^^^^^^^^^^^^^
../../../../.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdf-20.4.48/lib/src/pdf/implementation/forms/pdf_xfdf_document.dart:38:35: Error: The argument type 'String?' can't be assigned to the parameter type 'Object' because 'String?' is nullable and 'Object' isn't.
- 'Object' is from 'dart:core'.
builder.attribute('rel='nofollow' href', _pdfFilePath);
Hi CLAUDIO DIEGO SOUSA RAMOS, The reported issue is caused by a recent upgrade to the Flutter version. In previous versions, the alignPanAxis property was a Boolean, but in version 3.7.0, it was changed to an Enum type. To resolve this issue, upgrade the Flutter SDK to the latest version [3.7.0] and also upgrade the latest Syncfusion package version [20.4.48].
PdfViewer package: https://pub.dev/packages/syncfusion_flutter_pdfviewer/versions/20.4.48
I'm having the following problem:
Error: The argument type 'String?' can't be assigned to the parameter type 'Object' because 'String?' is nullable and 'Object' isn't.
- 'Object' is from 'dart:core'.
builder.attribute('rel='nofollow' href', _pdfFilePath);
I have flutter version 3.7.2 and using the latest version of syncfusion flutter pdfviewer that is 20.4.49.
I think it is having the compatibility issue with the latest version of flutter.
Kindly brief me on this.
Hi. I am also having the same issue. All my Syncfusion is at 20.4.49 and my flutter is on 3.7.3.
../../../../../AppData/Local/Pub/Cache/hosted/pub.dev/syncfusion_flutter_pdf-20.4.49/lib/src/pdf/implementation/forms/pdf_xfdf_document.dart:38:35: Error: The argument type 'String?' can't be assigned to the parameter type 'Object' because 'String?' is nullable and 'Object' isn't.
- 'Object' is from 'dart:core'.
builder.attribute('rel='nofollow' href', _pdfFilePath);
I have the same problem.
Syncfusion is at 20.4.49 and Flutter is on 3.7.3
Hi Matt Booth ,Kindly run the flutter clean command to clear the cache, then check the reported issue and let us know if the issue is resolved or not.
Hi,
I try:
flutter clean
Flutter pub get
but the issue was not resolved.
Hi Daniel Ardison,
We found that the problem is due to the older version of the xml package being referred to in your project. Recently, the XmlBuilder attribute value API has been updated from non-nullable to nullable type; you can refer to the following API reference for further details.
Xml package version 6.2.0 |
Xml package version 6.2.2 |
https://pub.dev/documentation/xml/6.2.0/xml/XmlBuilder/attribute.html
|
https://pub.dev/documentation/xml/latest/xml/XmlBuilder/attribute.html
|
So, we request you to update your pub cache by using the following command to resolve the issue.
dart pub cache add xml --version "6.2.2"
You can refer to https://dart.dev/tools/pub/cmd/pub-cache for more details.