google_drive_file_picker 0.0.2 copy "google_drive_file_picker: ^0.0.2" to clipboard
google_drive_file_picker: ^0.0.2 copied to clipboard

The google_drive_file_picker plugin for Flutter is a package that allows users to browse, select, and retrieve files from their Google Drive directly within a Flutter application. It simplifies the pr [...]

google_drive_file_picker #

google_drive_file_picker is a Flutter plugin that allows users to browse, select, and retrieve files from Google Drive within a Flutter application. It provides an easy-to-use API for authentication, file listing, selection, and downloading.

Features #

  • Google Authentication – Handles OAuth 2.0 authentication.
  • 📂 File Listing – Fetch files and folders from Google Drive.
  • 🔍 Search & Filter – Filter files by type, name.
  • 📑 File Selection – Pick single files.
  • ⬇️ Download Support – Download selected files.

Showcase #

Here are some screenshots of the plugin in action:


Installation #

1. Add Dependency #

Add the package to your pubspec.yaml file:

dependencies:
  google_drive_file_picker: latest_version

Run the following command:

flutter pub get

2. Setup Sign In Google #

https://pub.dev/packages/google_sign_in

3. Configure Google Cloud Console #

  1. Go to Google Cloud Console.
  2. Create a new project or use an existing one.
  3. Enable the Google Drive API.
  4. CREATE NEW CREDENTIAL (API KEY)

Usage #

1. Set API Key #

import 'package:google_drive_file_picker/google_drive_file_picker.dart';

final GoogleDriveController controller = GoogleDriveController();
controller.setAPIKey(apiKey: 'your_api_key');

2. Pick a File #

final file = await controller.getFileFromGoogleDrive(
  context: context,
);

Permissions #

Make sure to configure the OAuth consent screen and include the necessary Google Drive API scopes in your project settings.

Required Scopes #

https://www.googleapis.com/auth/drive.readonly

License #

This project is licensed under the MIT License - see the LICENSE file for details.

Contributions #

Contributions are welcome! Feel free to open an issue or submit a pull request.


Contact #

For questions or support, reach out via GitHub Issues.

2
likes
130
points
45
downloads

Publisher

unverified uploader

Weekly Downloads

The google_drive_file_picker plugin for Flutter is a package that allows users to browse, select, and retrieve files from their Google Drive directly within a Flutter application. It simplifies the process of integrating Google Drive file access by handling authentication, file listing, and downloading.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, google_sign_in, googleapis, http, path_provider, pull_to_refresh_flutter3

More

Packages that depend on google_drive_file_picker