ViewExtensionRegistration class

Describes one callback contributed to a view engine.

The callback is retained by ViewExtensionRegistry and invoked whenever a matching engine creates or prepares its extension target. A callback should verify or cast the target argument to the engine-specific environment type it expects; errors from the callback are intentionally allowed to propagate so a misconfigured provider cannot be silently ignored.

Constructors

ViewExtensionRegistration({required String engine, required void apply(Object target), String description = ''})
Creates a registration for engine and its apply callback.

Properties

apply → void Function(Object target)
Callback that mutates or configures the engine-specific target object.
final
description → String
Optional description used in diagnostics.
final
engine → String
Engine name receiving the extension.
final
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