Skip to content

🐛 Fix scroll behavior by replacing ScrollController with ZoomScrollController#543

Open
kavantrivedi wants to merge 1 commit into
masterfrom
fix/scroll_exception_issue
Open

🐛 Fix scroll behavior by replacing ScrollController with ZoomScrollController#543
kavantrivedi wants to merge 1 commit into
masterfrom
fix/scroll_exception_issue

Conversation

@kavantrivedi

Copy link
Copy Markdown
Contributor

Description

Fix scroll behavior by replacing ScrollController with ZoomScrollController and updating scroll listener parameters across day, multi-day, and week views

Checklist

  • The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

@kavantrivedi kavantrivedi force-pushed the fix/scroll_exception_issue branch 2 times, most recently from eb06e59 to ea99aac Compare May 28, 2026 09:32
@kavantrivedi kavantrivedi requested review from PRBaraiya and Copilot and removed request for PRBaraiya May 28, 2026 09:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses scroll-controller exceptions by moving Day, Week, and MultiDay views toward per-page ZoomScrollController instances and tracking active/page-specific scroll offsets.

Changes:

  • Adds per-page scroll offset caching and active scroll controller tracking in DayView, WeekView, and MultiDayView.
  • Updates internal page widgets to own their local ZoomScrollController and report page index/controller details to parents.
  • Updates the example and changelog to reflect the scroll behavior fix.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lib/src/day_view/day_view.dart Tracks per-page offsets and active controller for DayView scrolling.
lib/src/day_view/_internal_day_view_page.dart Switches DayView pages to always use local ZoomScrollController.
lib/src/week_view/week_view.dart Tracks per-page offsets and active controller for WeekView scrolling.
lib/src/week_view/_internal_week_view_page.dart Switches WeekView pages to always use local ZoomScrollController.
lib/src/multi_day_view/multi_day_view.dart Tracks per-page offsets and active controller for MultiDayView scrolling.
lib/src/multi_day_view/_internal_multi_day_view_page.dart Switches MultiDayView pages to always use local ZoomScrollController.
example/lib/widgets/day_view_widget.dart Enables keepScrollOffset in the DayView example.
CHANGELOG.md Adds an entry for the scroll exception fix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/src/day_view/_internal_day_view_page.dart
Comment thread lib/src/week_view/_internal_week_view_page.dart
Comment thread lib/src/multi_day_view/_internal_multi_day_view_page.dart
@kavantrivedi kavantrivedi force-pushed the fix/scroll_exception_issue branch from ea99aac to 1b1ec03 Compare May 28, 2026 10:18
@kavantrivedi kavantrivedi force-pushed the fix/scroll_exception_issue branch from 1b1ec03 to f525134 Compare May 28, 2026 10:21
Comment thread CHANGELOG.md Outdated
- Updated documentation for `DayView`, `WeekView`, `MonthView` and `MultiDayView` to add more details about the parameters and their usage. [#448](https://github.com/SimformSolutionsPvtLtd/flutter_calendar_view/pull/448)
- Fixed `onlyShowToday` parameter in `WeekView` to update `liveTimeIndicator` properly. [#518](https://github.com/SimformSolutionsPvtLtd/flutter_calendar_view/issues/518)
- Added `ZoomScrollController` to `DayView`, `WeekView` and `MultiDayView` for programmatic control of zoom level and scroll position. [#522](https://github.com/SimformSolutionsPvtLtd/flutter_calendar_view/issues/522)
- Fixed issue with scroll exception when using `ZoomScrollController` in `DayView` and `WeekView`. [#543](https://github.com/SimformSolutionsPvtLtd/flutter_calendar_view/pull/543)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this entry as this exception is related to the change above

@kavantrivedi kavantrivedi force-pushed the fix/scroll_exception_issue branch from f525134 to 2257fe4 Compare May 29, 2026 07:12
@lavigarg-simform

Copy link
Copy Markdown
Contributor

@kavantrivedi Please add a small section in documentation as well for ZoomScrollController

@kavantrivedi kavantrivedi force-pushed the fix/scroll_exception_issue branch from 2257fe4 to 147f259 Compare May 29, 2026 07:34
…ntroller and updating scroll listener parameters across day, multi-day, and week views
@kavantrivedi kavantrivedi force-pushed the fix/scroll_exception_issue branch from 147f259 to 78d29f0 Compare May 29, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants