Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ class VisibilityDetectorLayer extends ContainerLayer {

/// Computes the accumulated clipping bounds, in global coordinates.
Rect _computeClipRect() {
assert(RendererBinding.instance.renderView != null);
var clipRect = Offset.zero & RendererBinding.instance.renderView.size;
assert(RendererBinding.instance?.renderView != null);
var clipRect = Offset.zero & RendererBinding.instance!.renderView.size;

var parentLayer = parent;
while (parentLayer != null) {
Expand Down Expand Up @@ -167,7 +167,7 @@ class VisibilityDetectorLayer extends ContainerLayer {
if (isFirstUpdate) {
// We're about to render a frame, so a post-frame callback is guaranteed
// to fire and will give us the better immediacy than `scheduleTask<T>`.
SchedulerBinding.instance.addPostFrameCallback((timeStamp) {
SchedulerBinding.instance!.addPostFrameCallback((timeStamp) {
_processCallbacks();
});
}
Expand All @@ -190,7 +190,7 @@ class VisibilityDetectorLayer extends ContainerLayer {
// of `addPostFrameCallback` or `scheduleFrameCallback` so that work will
// be done even if a new frame isn't scheduled and without unnecessarily
// scheduling a new frame.
SchedulerBinding.instance
SchedulerBinding.instance!
.scheduleTask<void>(_processCallbacks, Priority.touch);
}

Expand Down