diff --git a/lib/helpers/hooks/chat_scroll.dart b/lib/helpers/hooks/chat_scroll.dart index 3166087..d341645 100644 --- a/lib/helpers/hooks/chat_scroll.dart +++ b/lib/helpers/hooks/chat_scroll.dart @@ -125,10 +125,10 @@ final class ChatScroll({ final position = scrollController.position; if (position.extentAfter <= loadThreshold) { - await paginate(Direction.backward); + await paginate(.backward); } else if (contextualEvent != null && position.extentBefore <= loadThreshold) { - await paginate(Direction.forward); + await paginate(.forward); } else if (position.extentBefore <= readThreshold) { await markRead(); } @@ -168,7 +168,7 @@ final class ChatScroll({ if (offset != null) { await scrollController.animateTo( offset, - duration: const Duration(milliseconds: 700), + duration: const .new(milliseconds: 700), curve: Curves.easeInOut, ); return; @@ -185,7 +185,7 @@ final class ChatScroll({ await Scrollable.ensureVisible( context, alignment: 0.5, - duration: const Duration(milliseconds: 700), + duration: const .new(milliseconds: 700), curve: Curves.easeInOut, ); }