Contextual layout

If you need more than density changes and can’t find a
widget that does what you need, you can take a more
procedural approach to adjust parameters, calculate sizes,
swap widgets, or completely restructure your UI to suit
a particular form factor.

Screen-based breakpoints

The simplest form of procedural layouts uses
screen-based breakpoints. In Flutter,
this can be done with the MediaQuery API.
There are no hard and fast rules for the sizes to use
here, but these are general values:

Using breakpoints, you can set up a simple system
to determine the device type:

As an alternative, you could abstract it more
and define it in terms of small to large:

Screen-based breakpoints are best used for making
top-level decisions in your app. Changing things like
visual density, paddings, or font-sizes are best when
defined on a global basis.