Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter - How to setup a custom height and width of Scaffold

Tags:

flutter

dart

I'm aware that MediaQuery solutions exist to problems, however, I want to limit the size of my Scaffold so that it can be used for web-based apps as well. Similar to what Instagram has, can anyone help me with it? enter image description here

like image 688
Arnav Avatar asked Sep 01 '25 20:09

Arnav


1 Answers

Have you tried wrapping your Scaffold in SafeArea with a minimum property of EdgeInsets.all(32.0)?

For me, this recreates your mockup on any screen

Example code:

//...
return SafeArea(

  minimum: const EdgeInsets.all(32.0),

  child: Scaffold(
    //...
  ),
);
//...
like image 105
daddy7860 Avatar answered Sep 03 '25 16:09

daddy7860