Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Commit

Permalink
Remove unnecessary ! operator. (#822)
Browse files Browse the repository at this point in the history
  • Loading branch information
asashour authored Nov 2, 2022
1 parent 1eda8b7 commit a9738d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test_benchmarks/benchmarks/scroll.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Future<void> 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));

Expand All @@ -95,13 +95,13 @@ Future<void> 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;
Expand Down

0 comments on commit a9738d3

Please sign in to comment.