From 4fba3730c78bc1b7beabd80c4e7428cc1251ed98 Mon Sep 17 00:00:00 2001 From: Bawantha Rajapaksha Date: Wed, 24 Jul 2024 18:04:38 +0530 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=F0=9F=90=9B=20add=20scrollOffset=20?= =?UTF-8?q?listener?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/src/week_view/week_view.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/src/week_view/week_view.dart b/lib/src/week_view/week_view.dart index dd61214c..47e1332b 100644 --- a/lib/src/week_view/week_view.dart +++ b/lib/src/week_view/week_view.dart @@ -462,6 +462,11 @@ class WeekViewState extends State> { // Update builders and callbacks _assignBuilders(); + + if(widget.scrollOffset != oldWidget.scrollOffset) { + _lastScrollOffset = widget.scrollOffset; + _scrollController.jumpTo(widget.scrollOffset); + } } @override From c642b9853cdd112b55ff189e04830fcc47863d54 Mon Sep 17 00:00:00 2001 From: Bawantha Rajapaksha Date: Wed, 24 Jul 2024 18:20:58 +0530 Subject: [PATCH 2/2] fixed formatting --- lib/src/week_view/week_view.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/week_view/week_view.dart b/lib/src/week_view/week_view.dart index 47e1332b..9186fc9e 100644 --- a/lib/src/week_view/week_view.dart +++ b/lib/src/week_view/week_view.dart @@ -463,7 +463,7 @@ class WeekViewState extends State> { // Update builders and callbacks _assignBuilders(); - if(widget.scrollOffset != oldWidget.scrollOffset) { + if (widget.scrollOffset != oldWidget.scrollOffset) { _lastScrollOffset = widget.scrollOffset; _scrollController.jumpTo(widget.scrollOffset); }