Remove unnecessary `!` operator. (#822)
diff --git a/test_benchmarks/benchmarks/scroll.dart b/test_benchmarks/benchmarks/scroll.dart
index 62cbf29..cdf02b3 100644
--- a/test_benchmarks/benchmarks/scroll.dart
+++ b/test_benchmarks/benchmarks/scroll.dart
@@ -85,7 +85,7 @@
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 @@
_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;