September 2019
Beginner
512 pages
12h 52m
English
Our Favors app is not responsive in terms of screen size so far. It displays a vertical list of cards that fills the available space on the screen. For typical smartphones it looks good, but this is how it looks on devices with a bigger screen:

As you can see, each card fills each row, and they are a lot larger than necessary. We can change this according to the screen size and make the list display more items if there is more space than we need to display a card.
By using the MediaQuery class, we have made a calculation to change the number of cards displayed per row:
// part of hands_on_mediaquery/lib/main.dart file
Read now
Unlock full access