RemoteMainHandler class abstract interface

Main-thread handler for remote backend communication.

Each remote backend (Solid, GDrive) provides a main-thread handler that manages worker communication. This is typically combined with RemoteUiAdapter in a RemoteIntegration implementation.

Implementation Pattern

Most applications implement RemoteIntegration which combines this interface with RemoteUiAdapter:

class SolidMainIntegration implements RemoteIntegration {
  final SolidAuth _solidAuth;

  // RemoteMainHandler implementation
  @override
  String get id => 'solid';

  @override
  List<WorkerPluginFactory> get workerConnectors => [
    SolidAuthConnector.sender(_solidAuth),
  ];

  // RemoteUiAdapter implementation
  @override
  String get displayName => 'Solid Pod';

  @override
  Auth get auth => _solidAuth;

  @override
  Future<bool> showLogin(BuildContext context) async {
    // Show Solid login UI
  }
}

Properties

hashCode int
The hash code for this object.
no setterinherited
id String
Unique identifier for this remote backend (e.g., 'locorda_solid:default', 'locorda_gdrive:default').
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
workerConnectors List<MainHandlerFactory>
Worker thread connector factories for main-to-worker communication.
no setter

Methods

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