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

Remove unnecessary ! operator. #822

Merged
merged 1 commit into from
Nov 2, 2022
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
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