Skip to content
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

Add Gridview month layout option #32

Open
ekuleshov-idexx opened this issue Dec 11, 2022 · 4 comments
Open

Add Gridview month layout option #32

ekuleshov-idexx opened this issue Dec 11, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@ekuleshov-idexx
Copy link

First of all, thank you for an amazing component. It is easy to customize and working great on mobile platforms.

Unfortunately it is not ideal on desktop platforms, including web. Here is animation of the project's own example with a full-window widget running in a web browser. As you can see when changing window width scale individual day cells and instead of seeing more information on the screen you actually see less.

paged_vertical_calendar_resize

Currently I'm working around that by restricting max width for the widget, but it is not optimal because a lot of screen space stay unused.

It would be great to have some options to better support desktop platforms. Here is a few ideas:

  • restrict day widget height
  • allow to stack months side by side
    • specify number of months in a row
    • alternatively use layout similar to Wrap widget to fill in available horizontal space

Thank you

@casvanluijtelaar casvanluijtelaar added question Further information is requested wontfix This will not be worked on and removed wontfix This will not be worked on labels Dec 12, 2022
@casvanluijtelaar
Copy link
Owner

I'm trying to keep this a minimal framework. how you implement it in you app is up to you, width and height of this widget can be easily set like any other flutter widget, different day size / layout behavior can be changed by using a custom dayBuilder

@ekuleshov-idexx
Copy link
Author

ekuleshov-idexx commented Dec 12, 2022

I'm trying to keep this a minimal framework. how you implement it in you app is up to you, width and height of this widget can be easily set like any other flutter widget, different day size / layout behavior can be changed by using a custom dayBuilder

@casvanluijtelaar I do agree and appreciate simplicity. I can mitigate "over-scaling" issue with individual day cells and individual month widget by restricting their width.

However that does not allow to alter the month-widget layout flow. So, I was hoping you could add some flexibility or additional options, so one could achieve layout like MacOS standard Calendar:

image

The infinite_scroll_pagination used to provide infinite scrolling does support GridView. So, it might be possible to use it to handle layout of the month widgets. Then each month will be a cell in the grid and user could simply specify how many columns to render for the grid. 1-column grid will be the same as the current list layout.

Another approach (probably less flexible) is to externalize/expose and generify the PagedChildBuilderDelegate<Month> used to build individual months and provide some groupBy criteria in the PagedVerticalCalendar. So, one could provide a custom PagedChildBuilderDelegate<Quarter> implementation that would render 4 months in the row.

BTW, will be also useful to make the _MonthView class public.

Thank you.

@casvanluijtelaar
Copy link
Owner

casvanluijtelaar commented Dec 12, 2022

ah, I see, yes this should be a quite simple addition

@casvanluijtelaar casvanluijtelaar changed the title improve widget presentation on desktop Add Gridview month layout option Dec 12, 2022
@casvanluijtelaar casvanluijtelaar added enhancement New feature or request and removed question Further information is requested labels Dec 12, 2022
@ekuleshov-idexx
Copy link
Author

Would this be somewhat related to #33

The outer layout could control what decoration is done around every month and how individual months are laid down - like show multiple months in each row.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants