fl_cloud_storage

Last updated:

0 purchases

fl_cloud_storage Image
fl_cloud_storage Images
Add to Cart

Description:

fl cloud storage

fl_cloud_storage #
Features a cloud service can provide #

Authenticate (login)
Authorize
Upload files to a cloud
Download files from a cloud
Delete files from cloud
Supported operating systems: iOS, Android, Web, MacOS, Windows, Linux (or subset)

Supported clouds #




Google Drive
Dropbox




Authenticate




Authorize




Upload files




Download files




Delete files




iOS support




Android support




Web support




MacOS support
?



Windows support
?



Linux support
?




Usage #
Import the package:
import 'package:fl_cloud_storage/fl_cloud_storage.dart';
copied to clipboard
Initialize the service you want to use:
final driveService = await CloudStorageService.initialize(
StorageType.GOOGLE_DRIVE,
cloudStorageConfig: null, // optional parameter, vendor specific implementation
);
copied to clipboard
If you need special scopes, read the section for each cloud storage vendor.
1.a) Login:
cloudStorageService.authenticate();
copied to clipboard
1.b) Ask if the user is logged in:
cloudStorageService.isSignedIn;
copied to clipboard
1.c) Logout:
cloudStorageService.logout();
copied to clipboard
4.a) List files on cloud storage:
cloudStorageService.getAllFiles()
copied to clipboard
Google Drive Cloud Storage #
2.) Authorization
By default the app scope is used for Google Drive:
[v3.DriveApi.driveAppdataScope, v3.DriveApi.driveFileScope]
copied to clipboard
If you need full read and write access, add a cloudStorageConfig:
final driveService = await CloudStorageService.initialize<GoogleDriveScope>(
StorageType.GOOGLE_DRIVE,
cloudStorageConfig: GoogleDriveScope.full,
);
copied to clipboard
Behind the scens this scope is asked for:
[v3.DriveApi.driveAppdataScope, v3.DriveApi.driveFileScope, v3.DriveApi.driveScope]
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.