GoogleDriveProvider class

Inheritance

Properties

driveApi ↔ DriveApi
The authenticated Google Drive API client.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createDirectory(String path) Future<void>
Creates a new directory at the specified path.
override
deleteFile(String path) Future<void>
Deletes the file or directory at the specified path.
override
downloadFile({required String remotePath, required String localPath}) Future<String>
Downloads a file from a remotePath to a localPath on the device.
override
downloadFileByShareToken({required String shareToken, required String localPath}) Future<String>
Downloads a file to localPath using a shareToken.
override
Generates a shareable link for the file or directory at the path.
override
getAccessToken() Future<String?>
getFileMetadata(String path) Future<CloudFile>
Retrieves metadata for the file or directory at the specified path.
override
Extracts a share token from a given shareLink.
override
listFiles({String path = '', bool recursive = false}) Future<List<CloudFile>>
Uploads a file from a localPath to a remotePath in the cloud.
override
loggedInUserDisplayName() Future<String?>
Retrieves the display name of the currently logged-in user.
override
logout() Future<bool>
Logs out the current user from the cloud service.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
tokenExpired() Future<bool>
Checks if the current user's authentication token is expired.
override
toString() String
A string representation of this object.
inherited
uploadFile({required String localPath, required String remotePath, Map<String, dynamic>? metadata}) Future<String>
Uploads a file from a localPath to a remotePath.
override
uploadFileByShareToken({required String localPath, required String shareToken, Map<String, dynamic>? metadata}) Future<String>
Uploads a file from localPath using a shareToken.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance GoogleDriveProvider?
no setter

Static Methods

connect({bool forceInteractive = false, List<String>? scopes, String? serverClientId}) Future<GoogleDriveProvider?>
Connects to Google Drive, authenticating the user.
signOut() Future<void>
Signs the user out of Google and disconnects the app.