Skip to main content

Function Signature

Description

Configures Google Drive backup storage. Must be called before using PortalBackupMethod.googleDrive for backup or recovery. backupOption selects where the encrypted backup is written.

Parameters

PortalGDriveBackupOption

Returns

void

Important Notes

  • All three options are supported by the native iOS and Android SDK versions bundled with the current portal_flutter release. If you pin or override a lower native SDK version, appDataFolder and appDataFolderWithFallback may be rejected at runtime and backups previously stored in the App Data Folder will be lost — keep your portal_flutter dependency current to avoid this.
  • Choose the appropriate backupOption based on your application’s requirements:
    • Use appDataFolder to keep wallet backups hidden from users (recommended).
    • Use customFolder if you want users to see the backup file in their Drive UI.
    • Use appDataFolderWithFallback only when migrating an existing custom-folder integration.

Example Usage

Errors

Throws a PortalException on failure: For more information about Google Drive integration, see: