Visual Density

Learn how Flutter changes the widgets' precision depending on the input used in the platform.

We'll cover the following...

When we use a Flutter application with different devices, the input we use is also different. On a smartphone or a tablet, we provide input by touching the screen, while on a desktop device, whether on web or a desktop application, we use a mouse pointer. Flutter uses the VisualDensity class to adjust the UI to different input styles.

For instance, when input is provided via touch, buttons can be made larger, so that they ...