TemplatePortal class

A part of a template, when attached, becomes live as part of the host.

Inheritance
Implementers

Constructors

TemplatePortal(TemplateRef template, ViewContainerRef viewContainer)

Properties

hashCode int
The hash code for this object.
no setterinherited
isAttached bool
Returns true if this portal is in the process of being attached but the host has not loaded it yet or if the host has already loaded it.
no setterinherited
locals Map<String, dynamic>
Local variables that are defined for the context of this template.
no setter
origin → dynamic
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
template → TemplateRef
The template this portal originated from.
final
viewContainer → ViewContainerRef
The ViewContainerRef this portal originated from.
final

Methods

attach(PortalHost? host, [Map<String, dynamic> locals = const {}]) Future<Map<String, dynamic>?>
Attach to the host, optionally with locals specific to this instance.
override
clone() TemplatePortal
Creates a copy of this portal that can also be attached.
override
detach() Future<void>
Detaches the portal if attached to a host.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setAttachedHost(PortalHost? host) → void
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited