jonataslaw / jonataslaw/VideoCompress

Compress.getThumbnail error: type 'Future<String?>' is not a subtype of type 'FutureOr<String>' in type cast

Open
#105 8 comments 8 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
262
Forks
344
PR merge metrics
No merged PRs in 30d

Description

After the upgrade to null safety and version 3.0.0 I now get an error when trying to get the thumbnail file from the video File. Compression on the main file seems to work - I just get an error on the getThumbnail method.

flutter: ----------------FIREBASE CRASHLYTICS----------------
flutter: type 'Future' is not a subtype of type 'FutureOr' in type cast
flutter:
#0 Compress.getFileThumbnail (package:video_compress/src/video_compress/video_compressor.dart:81:8)

Tried using the method like this:

` final File? thumbnailFile = await VideoCompress.getFileThumbnail(
video.path,
quality: 30, // default(100)
position: 1, // default(-1)
);
`

Anyone else experiencing this or has a solution?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.