You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that snapkit package is currently unavailable to share video on Android.
actually, it's not unavailable as it is described on the package readme page, you can share the video if it's an asset only, and that is because the share function (line 200) uses the rootBundle to load the video
The solution is too simple just replace this line:
ByteData byteData = await rootBundle.load(videoPath!);
with this line:
Uint8List byteData = await File(videoPath!).readAsBytes();
now we can call the share function and just give it the video path.
The text was updated successfully, but these errors were encountered:
The problem is that snapkit package is currently unavailable to share video on Android.
actually, it's not unavailable as it is described on the package readme page, you can share the video if it's an asset only, and that is because the share function (line 200) uses the rootBundle to load the video
The solution is too simple just replace this line:
ByteData byteData = await rootBundle.load(videoPath!);
with this line:
Uint8List byteData = await File(videoPath!).readAsBytes();
now we can call the share function and just give it the video path.
The text was updated successfully, but these errors were encountered: