-
-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change visible range dynamically #60
Comments
Hey, Awesome lib! |
I was able to solve this with just rebuilding timetable widget with a different controller instance |
Having two different controller instances doesn't solve it to me, could you please explain how you solved it? @TatsuUkraine thanks! |
so I have an enum that represents all my range variants, Statefull widget that creates controller in initState and renders timetable itself. In the constructor it receives enum value. Then in didUpdateWidget this stateful widget checks if the enum is changed, and if so - disposes prev controller and creates a new one with a different visible range |
@javieralcantara sorry, don't pay attention to my prev comment)) I looked at different package))) in timetable - I'm changing value key for this Statefull widget each time range is changing. This leads to destroy widget with prev range and creating a new range from the scratch |
but I'm going to change this behavior to a variant with didUpdateWidget (at least I will try)) |
I apologize if the feature is already available, but I couldn't find a way to make it work.
I want to give the user the option between 4 visible ranges. 1, 3, 5 and week.
But, the grid does not update after that and keeps the first used VisibleRange (example: if when I created the controller I used VisibleRange.days(5) it always maintain a grid with 5 columns)
My controller code is as follows:
Below are some screenshots.
Thanks in advance.
The text was updated successfully, but these errors were encountered: