# ObjectProvider<T> constructor

const ObjectProvider<T>()

A flexible, functional-style provider interface for retrieving and interacting with pods or objects of a particular type.

This is an extension of ObjectFactory and Iterable that provides advanced options for conditional retrieval, functional callbacks, filtering, and ordering.

### 🚀 Usage

    final ObjectProvider<MyService> provider = ...;

    // Get the object, or throw if none or multiple exist
    MyService service = provider.getObject();

    // Get if available, or null if none exist
    MyService? maybeService = provider.getIfAvailable();

    // Get a default if not present
    MyService service = provider.getIfAvailableOrDefault(() => MyService());

    // Use a consumer if available
    provider.ifAvailable((s) => s.start());

    // Stream through all instances
    provider.stream().forEach(print);

### 🔍 Filtering and Ordering

You can stream all matching pods ordered by Ordered or PriorityOrdered:

    provider.orderedStream().forEach(print);

Or with a custom type filter (using your Class<T> metadata):

    provider.orderedStreamWithFilter((clazz) => clazz.name.contains('MyType'));

Note: By default, non-singletons are included. Support for filtering them is not yet implemented.

## Implementation

    const ObjectProvider();