OpenFlutter / flutter_screenutil

Flutter screen adaptation, font adaptation, get screen information
https://pub.dartlang.org/packages/flutter_screenutil
Apache License 2.0
3.83k stars 485 forks source link

Landscape mode, font size increases causing overflow #553

Closed 315574925 closed 1 month ago

315574925 commented 4 months ago

Landscape mode, font size increases causing overflow

github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 30 days with no activity.

giantss commented 3 months ago

I also appeared, the current flutter version is 3.19.5

hmartiins commented 2 months ago

the same issue

mozomig commented 2 months ago

I thinks it's happens because in 3.9.0 fontSizeResolver calculate scale by width, and in landscape mode width very large and scale factor more 2. You can try override fontSizeResolver like this https://github.com/OpenFlutter/flutter_screenutil/issues/558#issuecomment-2047043378 and in landscape mode will calculate by screenSize.height / designSize.width

hmartiins commented 2 months ago

I thinks it's happens because in 3.9.0 fontSizeResolver calculate scale by width, and in landscape mode width very large and scale factor more 2. You can try override fontSizeResolver like this #558 (comment) and in landscape mode will calculate by screenSize.height / designSize.width

I applied this and it worked perfectly for my case!