A dart package to download the video from the Reddit post. Currently package support Android, iOS and MacOS platforms.
downloadRedditVideo()
import 'package:reddit_video_downloader/reddit_video_downloader.dart';
downloadVideo() async {
final reddit = RedditVideDownloader();
await reddit
.downloadRedditVideo(
videoUrl:
'https://www.reddit.com/r/SipsTea/comments/vmf0zx/how_different_animals_fight/',
videoLocation: '/storage/emulated/0/Download',
videoTitle: 'test')
.then((value) async {
final startTime = value.getStartTime();
print('Start Time: $startTime');
final endTime = await value.getEndTime();
print('End Time: $endTime');
final duration = await value.getDuration();
print('Duration: $duration');
// returnCode is 0 if the operation was successful
final returnCode = await value.getReturnCode();
if (returnCode == 0) {
print('Operation Successful');
} else {
value.getAllLogs().then((value) => {
for (final log in value) {print(log)}
});
}
});
- ✅ Support for Android
- ✅ Support for iOS
- ✅ Support for MacOS
- 🕐 Support for Windows - On progress
- 🕐 Support for Linux - On Progress
- 🕐 Support for Web - On Progress