DataSourceRegistry class

Registry for managing data source implementations.

This singleton class maintains a registry of all available data sources and provides methods to register new sources and find appropriate handlers for URIs.

Example

// Register a custom source
DataSourceRegistry.register(S3DataSource());

// Find handler for a URI
final source = DataSourceRegistry.findByUri(Uri.parse('s3://bucket/data.csv'));
if (source != null) {
  final df = await source.read(uri, {});
}

Constructors

DataSourceRegistry()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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

Static Methods

clear() → void
Clears all registered sources (useful for testing)
findByUri(Uri uri) DataSource?
Finds a data source that can handle the given URI
getByScheme(String scheme) DataSource?
Gets a data source by scheme
listSchemes() List<String>
Lists all registered schemes
register(DataSource source) → void
Registers a new data source
unregister(String scheme) → void
Unregisters a data source by scheme