Can anyone tell me what is this error in flutter when I am trying to add syncfusion_flutter_pdfviewer package

Viewed 133

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.

2 Answers

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.

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

Related