GoogleDriveProvider class

Inheritance
Implementers

Properties

driveApi ↔ DriveApi
The authenticated Google Drive API client.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
isAuthenticated ↔ bool
getter/setter pair
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
handleAuthErrorAndRetry<T>(Future<T> request(), Object error, StackTrace stackTrace) → Future<T>
A helper to handle auth errors by reconnecting and retrying the request.
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

googleSignIn ↔ GoogleSignIn?
getter/setter pair
instance → GoogleDriveProvider?
no setter
scopes ↔ List<String>
getter/setter pair

Static Methods

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