Changing the screen dimensions in Flutter web app

Viewed 4643

I'm building a web app with Flutter, but I want to mimic an iPhone screen view. I know that resizing the window can sort of achieve this effect, but is there a way to wrap all the contents in a frame of a phone screen graphic, or change the dimensions of the MaterialApp so that it is contained within the screen dimensions of a phone and doesn't fill up the whole window?

1 Answers

You can wrap MaterialApp in a SizedBox to restrict its size. Then you can use it anywhere you want just like a regular widget.

example

Related