Drive Direct Download

Features

Generate Direct download link from google drive link

Getting started

Add this package to pubspec.yaml.

Usage


@override
Widget build(BuildContext context) {
  return Center(
    child: ElevatedButton(
      child: const Text(""),
      onPressed: () {
        DriveDirect.download(driveLink: "YOUR_DRIVE_LINK").then((value) {
          setState(() {
            _downloadLink = value;

            //Here value is your drive downloadable link
          });
        });
      },
    ),
  );
}




Usage


@override
Widget build(BuildContext context) {
  return Center(
    child: ElevatedButton(
      child: const Text(""),
      onPressed: () async {
        String downloadLink =
        await DriveDirect.download(driveLink: "YOUR_DRIVE_LINK");
      },
    ),
  );
}




Example



import 'package:flutter/material.dart';
import 'package:drive_direct_download/drive_direct_download.dart';


class HomePage extends StatefulWidget {
  const HomePage({super.key});

  @override
  State<HomePage> createState() => _HomePageState();
}

String? _downloadLink;

class _HomePageState extends State<HomePage> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Center(
      child: ElevatedButton(
        child: const Text(""),
        onPressed: () {
          DriveDirect.download(driveLink: "YOUR_DRIVE_LINK").then((value) {
            setState(() {
              _downloadLink = value;

              //Here value is your drive downloadable link
            });
          });
        },
      ),
    );
  }
}


Additional information

Use Git Repo For Contribute