DriveHelper class

Properties

account ↔ GoogleSignInAccount
Signed in Google account
getter/setter pair
avatar Widget
Widget that shows the signed in Google account's avatar
no setter
driveAPI ↔ DriveApi
Internal Google APIs Drive v3 instance
getter/setter pair
email String
Signed in Google account's email
no setter
hashCode int
The hash code for this object.
no setterinherited
name String?
Signed in Google account's display name, which might not exist
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
signIn ↔ GoogleSignIn
Google account sign in configuration settings
getter/setter pair

Methods

appendFile(String fileID, String data, {String mime = "text/plain", String seperator = '\n'}) Future<void>
Append data to an existing file of fileID
createFile(String fileName, String mime, {List<String>? parents, String text = ""}) Future<String>
Create a new file with fileName, and a mime type that is from FileMIMETypes or a custom string
deleteFile(String fileID) Future<void>
Deletss the file of fileID
disconnect() Future<void>
Disconnect the user from the app, and revoke all authentication between the user and this app
exportFile(String fileID, String mime) Future<String?>
Export a Google Workspace file of fileID in the provided mime type
getData(String fileID) Future<String>
GET the data of fileID's file as a string
getFileID(String fileName) Future<List<String>>
Get the file ID of a file from its fileName
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
signOut() Future<void>
Mark the current user as being in the signed out state
toString() String
A string representation of this object.
inherited
updateFile(String fileID, String data) Future<void>
Overwrite an existing file of fileID with new data

Operators

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

Static Methods

initialise(List<String> scopes) Future<DriveHelper>
Sign in to Google Drive and intialise DriveHelper. Provide scopes from DriveScopes, or custom ones by passing strings.