notifyNow method

void notifyNow()

Forces firing all pending visibility callbacks immediately.

This might be desirable just prior to tearing down the widget tree (such as when switching views or when exiting the application).

Example:

// Before disposing a page with visibility detectors
VisibilityDetectorController.instance.notifyNow();

Implementation

void notifyNow() => VisibilityDetectorLayer.notifyNow();