theideasaler / calendar_date_picker2

Lightweight and highly customizable calendar picker built on Flutter's original CalendarDatePicker, with support for multi and range modes.
https://pub.dev/packages/calendar_date_picker2
Apache License 2.0
118 stars 141 forks source link

[Bug] Widget Overflows when setting custom larger Text Style on Small Devices #208

Closed ABausG closed 2 weeks ago

ABausG commented 4 weeks ago

Describe the bug When setting a custom Text Style for the Days the layout can overflow on smaller devices

To Reproduce Steps to reproduce the behavior:

  1. Set Days to larger Text Style
  2. Open A picker on a smaller Device (e.g.iPhone SE Simulator)

Expected behavior The Layout doesn't overflow

Actual Behaviour The layout overflows

Screenshots image

sdzfg347 commented 3 weeks ago

Hi @ABausG , have you tried to set dayMaxWidth? There is an example of how you can custom the minimum width in example. https://github.com/theideasaler/calendar_date_picker2/blob/main/example/lib/main.dart

ABausG commented 3 weeks ago

Hey @sdzfg347 I briefly looked at that however I would like to avoid hardcoding a value in there as that has the potential to lead to even more problems e.g when users change their device font scaling.

I made a proposed fix in #209 that solves the issue by expanding the day instead of a non Flexible Day surrounded Spacer components