Open fisforfaheem opened 7 months ago
i'M getting this issue in android Pixel 3a
here's the code which i'm using
Future<String?> getVideoThumbnail({ int? videoItemIndex, required String videoUrl, }) async { try { Uint8List? bytes = await VideoThumbnail.thumbnailData( timeMs: 0, quality: 10, video: videoUrl, imageFormat: ImageFormat.PNG, );
if (bytes != null) {
final tempDirectory = await getTemporaryDirectory();
final String tempPath = tempDirectory.path;
final String thumbnailPath =
("$tempPath/${DateTime.now().microsecondsSinceEpoch}.png");
await File(thumbnailPath).writeAsBytes(bytes);
if (videoItemIndex != null &&
!videoThumbnailsData["thumbnails_data"]
.containsKey(videoItemIndex)) {
videoThumbnailsData["thumbnails_data"][videoItemIndex] =
thumbnailPath;
}
return thumbnailPath;
}
return null;
} catch (e, s) {
String errorMsg = ("Get Video Thumbnail\nError: $e");
errorMsg =
"${e is PlatformException ? "Platform Exception : " : e is FileSystemException ? "File System Exception :" : ""} :$errorMsg";
LogPrint().error(
error: e,
stackTrace: s,
errorMsg: errorMsg,
);
return null;
}
}
Killing the app, restarting vs code, and rerunning the app fixed this issue for me
─── Another exception was thrown: MissingPluginException(No implementation found for method data on channel plugins.justsoft.xyz/video_thumbnail) Another exception was thrown: MissingPluginException(No implementation found for method data on channel plugins.justsoft.xyz/video_thumbnail) I/flutter (31440): ┌──────────────────────