diff --git a/CHANGELOG.md b/CHANGELOG.md index 1118688..84a47a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,3 +18,7 @@ ## [1.2.0] - 6 November 2023 * Add the ability to use BorderScroll. If enabled the next page is shown when scrolling to an specific offset. + +## [1.2.1] - 7 November 2023 + +* Fixed the assert on the [scrollTriggerOffset] and [scrollJumpToOffset]. diff --git a/example/lib/main.dart b/example/lib/main.dart index d699de3..9dd2e66 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -147,6 +147,8 @@ class _TimetableDemoState extends State { Container( color: Colors.white, child: Timetable( + onOverScroll: () {}, + onUnderScroll: () {}, size: Size(size.width, size.height * 0.64), tableDirection: _horizontal ? Axis.horizontal : Axis.vertical, startHour: 3, diff --git a/lib/src/timetable.dart b/lib/src/timetable.dart index 1152a11..6ee1c94 100644 --- a/lib/src/timetable.dart +++ b/lib/src/timetable.dart @@ -39,7 +39,7 @@ class Timetable extends StatefulWidget { this.scrollJumpToOffset = 115, super.key, }) : assert( - scrollTriggerOffset < scrollJumpToOffset, + scrollTriggerOffset > scrollJumpToOffset, 'ScrollTriggerOffset cannot be smaller' ' then the scrollJumpToOffset.'); diff --git a/pubspec.yaml b/pubspec.yaml index fe2a1a1..97303e6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_timetable description: Flutter package to create a Timetable Widget that display blocks of widgets inside a timetable. -version: 1.2.0 +version: 1.2.1 repository: https://github.com/Iconica-Development/timetable environment: