From a9738d39b195df7da3bc65d0d70ab9012b4ddfb7 Mon Sep 17 00:00:00 2001 From: Ahmed Ashour Date: Wed, 2 Nov 2022 15:40:30 +0100 Subject: [PATCH] Remove unnecessary `!` operator. (#822) --- test_benchmarks/benchmarks/scroll.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test_benchmarks/benchmarks/scroll.dart b/test_benchmarks/benchmarks/scroll.dart index 62cbf29fbc..cdf02b3a8c 100644 --- a/test_benchmarks/benchmarks/scroll.dart +++ b/test_benchmarks/benchmarks/scroll.dart @@ -85,7 +85,7 @@ Future scrollUntilVisible({ final elementRect = _absoluteRect(elementRenderObject); final scrollable = Scrollable.of(element); - final viewport = RenderAbstractViewport.of(elementRenderObject)!; + final viewport = RenderAbstractViewport.of(elementRenderObject); final visibleWindow = _absoluteRect(viewport).intersect(_windowRect(element)); @@ -95,13 +95,13 @@ Future scrollUntilVisible({ _hasSufficientFreeRoom( large: visibleWindow, small: elementRect, - axisDirection: scrollable!.axisDirection, + axisDirection: scrollable.axisDirection, )) { return; } late double pixelsToBeMoved; - switch (scrollable!.axisDirection) { + switch (scrollable.axisDirection) { case AxisDirection.down: pixelsToBeMoved = elementRect.top - visibleWindow.top; break;