DelegateRegistry class

Typed map of component contracts to the theme's implementations.

Keys are contract types (ButtonDelegate), never implementation types.

Annotations

Constructors

DelegateRegistry([Map<Type, ComponentDelegate> delegates = const {}])
Creates a registry from delegates, keyed by contract type.
const
DelegateRegistry.empty()
An empty registry.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
isEmpty bool
Whether no delegates are registered.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

maybeGet<D extends ComponentDelegate>() → D?
Returns the delegate registered for D, or null if none is present.
mergeWith(DelegateRegistry other) DelegateRegistry
Returns a registry where this instance overwrites other on key overlap.
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.
override