0

I've been developing in flutter for a while but the ui side isn't my main area. I currently have an application developed on a 16:9 tablet format where widget sizes are expressed via MediaQuery.size but when I switch to my smartphone in 20:9 it creates gaps. Is there a way for flutter to take screen formats into account? As you can see on the 16:9 page the truck as a good height, but in 20:9 his width increment so his height going to big.[enter image description here](https://i.sstatic.net/BOXZoKvz.png)

I've tried several approaches, including MediaQuery, AspectRatio, Expanded and Flexible, but they don't solve my problem. There's still the solution of creating a visual for each format, as we do for orientation, but before committing myself to this project, I'd prefer to know if there's a simpler solution.

Thanks for all your help

1 Answer 1

1

Use fit option :

Image.network(src, fit: StackFit.cover)

Not the answer you're looking for? Browse other questions tagged or ask your own question.