skip to Main Content

I want to make my application responsive to the different sizes of mobile screens and I wonder which of these two packages is better for it.
https://pub.dev/packages/flutter_screenutil or https://pub.dev/packages/sizer .
I want to make responsive all of my app widgets

2

Answers


  1. It all depends on your preference and the one you can comfortably work with.

    Outside these two, you can use LayoutBuilder providing already in Flutter if you want your app to be responsive.

    But I would suggest the first one (flutter_screenutil), due to its documentation, number of usages and regular update of the package by the developer.

    Login or Signup to reply.
  2. I’d stay away from flutter_screenutil, and any package that scales fontsize based on width.

    Generally, any scaling that is driven by device width is wrong. TL;DR: use LayoutBuilder (not MediaQuery) to determine breakpoints only (side nav vs bottom nav, two columns vs three). Then use Flex widgets (Row, Column, Expanded, Spacer, etc) to lay out your text. Do not change the font size.

    The way to remember this is to think back to the last time you made a web page or a desktop app wider. Did the characters get bigger? No? 🙂 Then stop making your apps "scale" font sizes. Use width to re-layout, not re-size.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search