Skip to content

alextekartik/google-jsapi-picker.dart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

767d5b2 · Apr 14, 2025

History

65 Commits
Jan 21, 2025
Feb 16, 2025
Feb 16, 2025
Feb 16, 2025
Jul 24, 2024
Nov 9, 2021
Mar 10, 2014
Apr 14, 2025
Mar 20, 2023
Apr 14, 2025

Repository files navigation

google-jsapi-picker.dart

DEPRECATED (looking for solutions)

Google File picker access from Dart

Online demo

Description

Dart library to use for Google File Picker jsapi / Client-side flow

Usage/Installation

Go to Google APIs Console and create a new Project Create a new Client ID for web applications in "API Access" Set JavaScript origins to your server or for example http://127.0.0.1:3030/ for local testing in Dartium

Add this dependency to your pubspec.yaml

  dependencies:
     tekartik_google_jsapi_picker:
       git: https://github.com/alextekartik/google-jsapi-picker.dart.git
       ref: dart3a

Web applications

Import the library in your dart application

  import 'package:tekartik_google_jsapi_picker/picker.dart';

Initialize the library with your parameters

Pick files

  PickerBuilder builder = new PickerBuilder(gpicker);
  
  PickerView pickerView = new PickerView(gpicker, gpicker.viewId.DOCS);
  builder.addView(pickerView); 
  
  builder.developerKey = DEVELOPER_KEY;
  builder.oauthToken = _authToken;
  
  Picker uiPicker = builder.build();
  uiPicker.pick().then((PickerDataDocuments docs) {
    ...
    // handle the docs here
    print(docs);
    ... 
  
  });

About

Google File picker access from Dart

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published