You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And it works but if i'm testing this code at 9pm it will throw an exception 'startTime < endTime': is not true.
So, for testing purposes i've tried using this code for getting a small range to start the Timetable with:
This code just throwed another error 'VerticalZoom.zoomMin <= 1 / (endFraction - startFraction) && 1 / (endFraction - startFraction) <= VerticalZoom.zoomMax': is not true.
This is what I basically want to achieve:
Thanks!
The text was updated successfully, but these errors were encountered:
The first exception occurs because adding to a LocalTime beyond the 24 h of a day wraps the result — so 9 PM + 6 hours = 3 AM, and hence your startTime of 8 PM is bigger than your endTime.
The second exception is thrown because the internally used VerticalZoom widget (for zooming in/out the hours) had fixed limits for minimum and maximum zoom values and the initial zoom level had to be within those constraints. I've now (as of v0.2.7) moved these fixed limits to TimetableThemeData as minimumHourZoom and maximumHourZoom, and values outside of these constraints are now coerced to fulfill them — so if the initialTimeRange is set to 11 PM – 12 PM, but showing only this range would exceed the maximum zoom level, the range is extended to e.g. 7 PM – 12 PM. By setting TimetableThemeData.maximumHourHeight to double.infinity (the default for maximumHourZoom is double.infinity already), no coercion is performed and only 11 PM – 12 PM will be shown.
Feel free to reopen this issue if this doesn't solve your problem.
Is there a way to start the Timetable at the current hour?
I've tried the following code:
And it works but if i'm testing this code at 9pm it will throw an exception
'startTime < endTime': is not true
.So, for testing purposes i've tried using this code for getting a small range to start the Timetable with:
This code just throwed another error
'VerticalZoom.zoomMin <= 1 / (endFraction - startFraction) && 1 / (endFraction - startFraction) <= VerticalZoom.zoomMax': is not true
.This is what I basically want to achieve:
Thanks!
The text was updated successfully, but these errors were encountered: