无法在Windows平台上使用syncfusion_flutter_pdfviewer加载flutter中的pdf

hec6srdp  于 2023-08-07  发布在  Windows
关注(0)|答案(1)|浏览(142)

我使用flutter版本3.0.5和syncfusion_flutter_pdfviewer版本19.4.40-beta。我在windows和android平台上试用过。在Android上,我可以加载PDF,但每次运行或重新启动应用程序时,终端(“调试控制台”部分)都会出现一堆错误。尽管有这些错误,它在android上运行得很好。但在Windows上它根本不工作,我在终端上也有同样的错误。尽管有这些错误,它会一直在android上工作吗?
这是我的小部件,我加载PDF文件:

import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_pdfviewer/pdfviewer.dart';

class PdfShowPage extends StatefulWidget {
  const PdfShowPage({Key? key}) : super(key: key);

  @override
  State<PdfShowPage> createState() => _PdfShowPageState();
}

class _PdfShowPageState extends State<PdfShowPage> {
  final GlobalKey<SfPdfViewerState> _pdfViewerKey = GlobalKey();

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          centerTitle: false,
          title: const Text('Show'),
        ),
        body:
            SfPdfViewer.network(
          'https://www.orimi.com/pdf-test.pdf',
          key: _pdfViewerKey,
        )
        );
  }
}

字符集
错误我得到了在调试控制台当我使用Android平台:

Launching lib\main.dart on Android SDK built for x86 in debug mode...
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:918:20: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance?.addObserver(this);
                   ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:1002:5: Warning: Operand of null-aware operation '?.' has type 'ImageCache' which excludes null.
- 'ImageCache' is from 'package:flutter/src/painting/image_cache.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/painting/image_cache.dart').
    imageCache?.clear();
    ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:1022:20: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').

    WidgetsBinding.instance?.removeObserver(this);
                   ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:1052:5: Warning: Operand of null-aware operation '?.' has type 'ImageCache' which excludes null.
- 'ImageCache' is from 'package:flutter/src/painting/image_cache.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/painting/image_cache.dart').
    imageCache?.clear();
    ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:1866:42: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
                          WidgetsBinding.instance?.window.viewInsets.bottom !=
                                         ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:1872:48: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
                                WidgetsBinding.instance!.window.viewInsets,
                                               ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:1874:38: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
                                    .instance!.window.devicePixelRatio)
                                     ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:2648:22: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
      WidgetsBinding.instance?.addPostFrameCallback((Duration timeStamp) {
                     ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:2663:28: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
            WidgetsBinding.instance?.addPostFrameCallback((Duration timeStamp) {
                           ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:2687:26: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
          WidgetsBinding.instance?.addPostFrameCallback((Duration timeStamp) {
                         ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:2785:22: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
      WidgetsBinding.instance?.addPostFrameCallback((Duration timeStamp) {
                     ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:2799:26: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
          WidgetsBinding.instance
                         ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:3320:22: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
      WidgetsBinding.instance?.addPostFrameCallback((Duration timeStamp) {
                     ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:3330:24: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
        WidgetsBinding.instance?.addPostFrameCallback((Duration timeStamp) {
                       ^

/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/common/pdfviewer_plugin.dart:105:5: Warning: Operand of null-aware operation '!' has type 'ImageCache' which excludes null.
- 'ImageCache' is from 'package:flutter/src/painting/image_cache.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/painting/image_cache.dart').
    imageCache!.clear();
    ^

/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/common/pdfviewer_plugin.dart:152:5: Warning: Operand of null-aware operation '!' has type 'ImageCache' which excludes null.
- 'ImageCache' is from 'package:flutter/src/painting/image_cache.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/painting/image_cache.dart').
    imageCache!.clear();
    ^

/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/control/pdf_page_view.dart:187:21: Warning: Operand of null-aware operation '?.' has type 'PaintingBinding' which excludes null.
- 'PaintingBinding' is from 'package:flutter/src/painting/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/painting/binding.dart').

    PaintingBinding.instance?.imageCache?.clear();
                    ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/control/pdf_page_view.dart:188:21: Warning: Operand of null-aware operation '?.' has type 'PaintingBinding' which excludes null.
- 'PaintingBinding' is from 'package:flutter/src/painting/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/painting/binding.dart').

    PaintingBinding.instance?.imageCache?.clearLiveImages();
                    ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/control/pdf_page_view.dart:196:23: Warning: Operand of null-aware operation '?.' has type 'PaintingBinding' which excludes null.

- 'PaintingBinding' is from 'package:flutter/src/painting/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/painting/binding.dart').
      PaintingBinding.instance?.imageCache?.clear();
                      ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/control/pdf_page_view.dart:197:23: Warning: Operand of null-aware operation '?.' has type 'PaintingBinding' which excludes null.

- 'PaintingBinding' is from 'package:flutter/src/painting/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/painting/binding.dart').
      PaintingBinding.instance?.imageCache?.clearLiveImages();
                      ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/control/pdf_scrollable.dart:397:22: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').

      WidgetsBinding.instance?.addPostFrameCallback((Duration timeStamp) {
                     ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/control/pdfviewer_canvas.dart:793:22: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
      WidgetsBinding.instance?.addPostFrameCallback((Duration timeStamp) {
                     ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/control/scroll_head_overlay.dart:288:20: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.

- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance?.addPostFrameCallback((Duration timeStamp) {
                   ^

√  Built build\app\outputs\flutter-apk\app-debug.apk.
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:918:20: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance?.addObserver(this);
                   ^

/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:1002:5: Warning: Operand of null-aware operation '?.' has type 'ImageCache' which excludes null.
- 'ImageCache' is from 'package:flutter/src/painting/image_cache.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/painting/image_cache.dart').
    imageCache?.clear();
    ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:1022:20: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance?.removeObserver(this);

                   ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:1052:5: Warning: Operand of null-aware operation '?.' has type 'ImageCache' which excludes null.
- 'ImageCache' is from 'package:flutter/src/painting/image_cache.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/painting/image_cache.dart').
    imageCache?.clear();
    ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:1866:42: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
                          WidgetsBinding.instance?.window.viewInsets.bottom !=

                                         ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:1872:48: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
                                WidgetsBinding.instance!.window.viewInsets,
                                               ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:1874:38: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.

- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
                                    .instance!.window.devicePixelRatio)
                                     ^

/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:2648:22: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
      WidgetsBinding.instance?.addPostFrameCallback((Duration timeStamp) {
                     ^

/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:2663:28: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
            WidgetsBinding.instance?.addPostFrameCallback((Duration timeStamp) {

                           ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:2687:26: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
          WidgetsBinding.instance?.addPostFrameCallback((Duration timeStamp) {

                         ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:2785:22: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
      WidgetsBinding.instance?.addPostFrameCallback((Duration timeStamp) {
                     ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:2799:26: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.

- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
          WidgetsBinding.instance
                         ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:3320:22: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').

      WidgetsBinding.instance?.addPostFrameCallback((Duration timeStamp) {
                     ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/pdfviewer.dart:3330:24: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
        WidgetsBinding.instance?.addPostFrameCallback((Duration timeStamp) {
                       ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/control/pdf_scrollable.dart:397:22: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
      WidgetsBinding.instance?.addPostFrameCallback((Duration timeStamp) {

                     ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/control/scroll_head_overlay.dart:288:20: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance?.addPostFrameCallback((Duration timeStamp) {

                   ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/control/pdf_page_view.dart:187:21: Warning: Operand of null-aware operation '?.' has type 'PaintingBinding' which excludes null.

- 'PaintingBinding' is from 'package:flutter/src/painting/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/painting/binding.dart').
    PaintingBinding.instance?.imageCache?.clear();

                    ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/control/pdf_page_view.dart:188:21: Warning: Operand of null-aware operation '?.' has type 'PaintingBinding' which excludes null.

- 'PaintingBinding' is from 'package:flutter/src/painting/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/painting/binding.dart').
    PaintingBinding.instance?.imageCache?.clearLiveImages();

                    ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/control/pdf_page_view.dart:196:23: Warning: Operand of null-aware operation '?.' has type 'PaintingBinding' which excludes null.
- 'PaintingBinding' is from 'package:flutter/src/painting/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/painting/binding.dart').

      PaintingBinding.instance?.imageCache?.clear();
                      ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/control/pdf_page_view.dart:197:23: Warning: Operand of null-aware operation '?.' has type 'PaintingBinding' which excludes null.
- 'PaintingBinding' is from 'package:flutter/src/painting/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/painting/binding.dart').
      PaintingBinding.instance?.imageCache?.clearLiveImages();
                      ^

/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/control/pdfviewer_canvas.dart:793:22: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/widgets/binding.dart').
      WidgetsBinding.instance?.addPostFrameCallback((Duration timeStamp) {
                     ^

/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/common/pdfviewer_plugin.dart:105:5: Warning: Operand of null-aware operation '!' has type 'ImageCache' which excludes null.
- 'ImageCache' is from 'package:flutter/src/painting/image_cache.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/painting/image_cache.dart').

    imageCache!.clear();
    ^
/C:/src/flutter_3.0.5/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-19.4.56-beta/lib/src/common/pdfviewer_plugin.dart:152:5: Warning: Operand of null-aware operation '!' has type 'ImageCache' which excludes null.
- 'ImageCache' is from 'package:flutter/src/painting/image_cache.dart' ('/C:/src/flutter_3.0.5/flutter/packages/flutter/lib/src/painting/image_cache.dart').
    imageCache!.clear();

    ^
Connecting to VM Service at ws://127.0.0.1:49674/f6ccfPwsKq0=/ws


当我在windows上做同样的事情时,我无法加载pdf,当我弹出屏幕时,我得到这个异常:通道syncfusion_flutter_pdfviewer上没有找到closeDocument方法的实现

dy1byipe

dy1byipe1#

请尝试使用更新版本的软件包。
这些错误是由较新的Dart版本中的完全空安全性更改引起的。

相关问题