Skip to content

Commit fd5cb10

Browse files
gnpricechrisbobbe
authored andcommitted
msglist [nfc]: Discard scroll-to-bottom animation future up front
Nothing awaits this future anyway; this method is only called as a gesture callback. The callback is expected to return void, emphasizing that nothing will inspect its return value.
1 parent 1b4991f commit fd5cb10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/widgets/message_list.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,12 +695,12 @@ class ScrollToBottomButton extends StatelessWidget {
695695
final ValueNotifier<bool> visible;
696696
final ScrollController scrollController;
697697

698-
Future<void> _scrollToBottom() {
698+
void _scrollToBottom() {
699699
final target = 0.0;
700700
final distance = target - scrollController.position.pixels;
701701
final durationMsAtSpeedLimit = (1000 * distance / 8000).ceil();
702702
final durationMs = max(300, durationMsAtSpeedLimit);
703-
return scrollController.animateTo(
703+
scrollController.animateTo(
704704
target,
705705
duration: Duration(milliseconds: durationMs),
706706
curve: Curves.linear);

0 commit comments

Comments
 (0)