2

When I add syncfusion_flutter_pdfviewer package in yaml file I am getting the below error. can anyone tell me what is that error states ? /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-20.2.48-beta/lib/src/common/pdfviewer_plugin.dart:21:23: Error: Type 'Uint8List' not found. CancelableOperation<Uint8List?>? _nativeImage; ^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-20.2.48-beta/lib/src/common/pdfviewer_plugin.dart:24:37: Error: Type 'Uint8List' not found.

Rajesh
  • 91
  • 8

4 Answers4

1

After adding package, application should be compiled again.

Try running a command in terminal.

flutter run -d [device id]

UPDATE: Also try to:

import 'dart:typed_data';

in a file where you are using syncfusion components.

I.Step
  • 613
  • 6
  • 22
1

The issue was also resolved for me by upgrading to the latest Flutter version (as of 22 October 2022).

McGuy
  • 81
  • 1
  • 11
  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 25 '22 at 23:08
0

Upgrade flutter to the latest version. This issue was solved after I upgraded to version 3.3.1.

Peter
  • 142
  • 11
0

Might not the easiest decision but upgrading flutter, mine was 2.10.3 to 3.7.11 solved the problem.

geniusvale
  • 71
  • 2