GDriveWorkerHandler class
Worker-thread RemoteWorkerHandler implementation for Google Drive backend.
Creates GDriveBackend instances in the worker thread for Drive communication.
This plugin handles all backend operations:
- HTTP requests to Google Drive API
- OAuth2 token management
- File operations (list, read, write)
The configuration (GDriveConfig) is automatically received from the main thread
via GDriveAuthConnector.receiveConfig.
Main Thread Counterpart
This plugin requires a corresponding GDriveMainIntegration on the main thread. The main thread handles authentication and configuration, sending both to the worker via connectors.
Usage
Future<WorkerParams> setupWorkerEngine() async => WorkerParams(
remotes: [
GDriveWorkerHandler(), // Config received automatically
],
// ... storage needs to be configured as well
);
Constructors
- GDriveWorkerHandler({Client? httpClient, String id = gDriveRemoteHandlerId})
Properties
Methods
-
createBackend(
BackendWorkerHandlerContext context, SyncEngineConfig syncEngineConfig) → Future< Backend> - Creates a backend instance for this remote handler.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited