From 3d6a78de65c312585c90f9476611b21edb457e96 Mon Sep 17 00:00:00 2001 From: Jacques Date: Tue, 7 Nov 2023 10:39:22 +0100 Subject: [PATCH] fix: Fixed the assert to check the values properly --- CHANGELOG.md | 4 ++++ example/lib/main.dart | 2 ++ lib/src/timetable.dart | 2 +- pubspec.yaml | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) 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: