addLayoutObserver method
- @Deprecated("Use onLayoutChanged instead")
- void domReadCallback()
Adds a new callback to the layout observer heartbeat.
The layout observer heartbeat is a consistency check that is run outside
of the Angular zone. If a component needs to synchronize its position,
size or orientation to the ever-changing layout, it can run its
observations in this callback. If there is a need to modify the DOM or
trigger a new Angular digest, it can do it through the updateLayout
method.
Returns a subscription that allows pausing, resuming and canceling the observer.
Implementation
@Deprecated("Use onLayoutChanged instead")
StreamSubscription<DomService> addLayoutObserver(void domReadCallback()) =>
onLayoutChanged!.listen((_) => domReadCallback());