drive_direct_download 0.0.4 copy "drive_direct_download: ^0.0.4" to clipboard
drive_direct_download: ^0.0.4 copied to clipboard

Generate Direct download link from google drive link

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

2
likes
135
points
14
downloads

Publisher

verified publisherdharmikjoshi.in

Weekly Downloads

Generate Direct download link from google drive link

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on drive_direct_download