Merge pull request #10 from Iconica-Development/hotfix/assert_scroll_offset

fix: Fixed the assert to check the values properly
This commit is contained in:
Jacques Doeleman 2023-11-07 10:41:48 +01:00 committed by GitHub
commit f79ae93962
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 2 deletions

View file

@ -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].

View file

@ -147,6 +147,8 @@ class _TimetableDemoState extends State<TimetableDemo> {
Container(
color: Colors.white,
child: Timetable(
onOverScroll: () {},
onUnderScroll: () {},
size: Size(size.width, size.height * 0.64),
tableDirection: _horizontal ? Axis.horizontal : Axis.vertical,
startHour: 3,

View file

@ -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.');

View file

@ -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: