dbx_platform 1.0.0+1 copy "dbx_platform: ^1.0.0+1" to clipboard
dbx_platform: ^1.0.0+1 copied to clipboard

outdated

An unofficial dropbox platform package.

dbx_platform #

unofficial Dropbox client Hecho en 🇵🇷 por Radamés J. Valentín Reyes

Getting an API key and other required info #

Step 1 #

Tap/click the image below to visit the Dropbox developer website and tap the button that says "App console" on the top right corner. Login or create an account if necessary.

Dropbox developer website

Step 2 #

Create app page

Step 3 #

Make selections from the given options and tap/click on Create app button

Make selections from the given options

Step 4 #

Enable permissions from the app page on the developer console. You need read and write permissions enabled so that your API calls don't throw an error.

Permissions

Step 5 #

Generate an access token. Go to the Settings tab of your app to generate the access token, copy the app key and app secret for later use.

Token generation


Import the dart package #

import 'package:dbx_platform/dbx_platform.dart';
import 'dart:io';

Dropbox instance #

DBX dbx = DBX(
  accessToken: accessToken, 
  appKey: appKey,
  appSecret: appSecret,
);

Functions(performs the API calls) #

Create folder #

await dbx.createFolder(
  fileRequestTitle: "Folder creation test", 
  folderToCreate: Directory("/test"),
);

Delete folder #

await dbx.deleteFolder(
  folderToDelete: Directory("/test"),
);

Folder Exists #

await dbx.folderExists(
  folderToCheck: Directory("/test"),
);

Upload file/Create file #

await dbx.createFile(
  fileToUpload: File("./test_assets/test.odt"), 
  path: "/test.odt", 
  mode: WriteMode.add,
  mute: true,
);

File exists #

await dbx.fileExists(
  fileToCheck: File("/test.odt"),
);

Delete file #

await dbx.deleteFile(
  fileToDelete: File("/test.odt"),
);

Contribute/donate by tapping on the Pay Pal logo/image #


References #

0
likes
0
pub points
49%
popularity

Publisher

unverified uploader

An unofficial dropbox platform package.

License

unknown (LICENSE)

Dependencies

sexy_api_client

More

Packages that depend on dbx_platform