Reputation: 71
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.
Upvotes: 2
Views: 3494
Reputation: 91
Might not the easiest decision but upgrading flutter, mine was 2.10.3 to 3.7.11 solved the problem.
Upvotes: 0
Reputation: 89
The issue was also resolved for me by upgrading to the latest Flutter version (as of 22 October 2022).
Upvotes: 1
Reputation: 779
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.
Upvotes: 1
Reputation: 142
Upgrade flutter to the latest version. This issue was solved after I upgraded to version 3.3.1.
Upvotes: 0