Using Scaffold as Body?

42 views
Skip to first unread message

Mark Valeriani

unread,
Mar 7, 2021, 9:19:54 PM3/7/21
to Flutter Development (flutter-dev)
I am building an app and am coming across a decent amount of sizing errors with my layout. Some pixel overflows, and rendering performSize() errors etc... I was wondering if I do not have an appbar should I still be using scaffold as my main body? I mean I do have a floating action button but I am sure I can find a solution for that. 

I just need some guidance on the layout in order to get it to fit for multiple devices and not just one device. 

Suzuki Tomohiro

unread,
Mar 7, 2021, 9:25:20 PM3/7/21
to Mark Valeriani, Flutter Development (flutter-dev)
You want to explain your problem to get the answer.

Without the detail of the problem, I can only recommend you to read this https://flutter.dev/docs/development/ui/layout/constraints 



On Sun, Mar 7, 2021 at 9:20 PM Mark Valeriani <mark...@gmail.com> wrote:
I am building an app and am coming across a decent amount of sizing errors with my layout. Some pixel overflows, and rendering performSize() errors etc... I was wondering if I do not have an appbar should I still be using scaffold as my main body? I mean I do have a floating action button but I am sure I can find a solution for that. 

I just need some guidance on the layout in order to get it to fit for multiple devices and not just one device. 

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/f102ff3e-aaa1-49e5-baf4-6270bcc0ef51n%40googlegroups.com.

Suzuki Tomohiro

unread,
Mar 7, 2021, 11:06:14 PM3/7/21
to Flutter Development (flutter-dev)
(Please respond to the mailing list)
You haven’t explained your problem. As long as people don’t know your code or error message, you cannot get useful advice.

> wondering if people don't use scaffold

People use Scaffold.

On Sun, Mar 7, 2021 at 21:35 Mark Valeriani <mark...@gmail.com> wrote:
I am trying to use media query and I am able to get the sizing all correct on one simulator, then I will try it on a different simulator and the sizes will be off. What I am looking for is a way to make everything fit/work on all devices used. So I was wondering if people don't use scaffold and instead use something else as their main body? Or is there another way to get everything to fit properly?

Mark Valeriani

unread,
Mar 8, 2021, 8:19:55 AM3/8/21
to Flutter Development (flutter-dev)
The 'error' at hand here is more of a theory problem than a code causing errors problem. As I stated in my email I am in need of some guidance of how someone usually goes about sizing layouts for multiple devices. Does everyone use scaffold? or should you just use a container, column, row etc? Is MediaQuery the best way to solve sizing for multiple devices? Theories like this. 

yash1...@gmail.com

unread,
Mar 8, 2021, 10:48:21 AM3/8/21
to Flutter Development (flutter-dev)
You will have to use Scaffold as a Body and sizes for multiple devices.  if they are multiple devices of the same Category like all are mobile devices then use iPhone 12 simulator or. a decent android device emulator and make a UI with appropriate sizes and flutter shall adjust it for other screens. If by multiple devices you mean web/IPad/Laptop/DESKTOP. Then you will need to check the condition like a size between 1200 and 2000, 600 and 900, 900 and 1200. And then create different layouts for these devices.

Mark Valeriani

unread,
Mar 8, 2021, 10:53:13 AM3/8/21
to Flutter Development (flutter-dev)
Perfect this helps a lot! Thank you. It is for multiple mobile devices. I think it should work for multiple devices as long as I use expanded where needed, at least through my research that is what I am getting. Thanks again. 

yash1...@gmail.com

unread,
Mar 8, 2021, 11:04:45 AM3/8/21
to Flutter Development (flutter-dev)
Yes

Jitendra Kumar Kumawat

unread,
Mar 9, 2021, 12:34:42 AM3/9/21
to yash1...@gmail.com, Flutter Development (flutter-dev)
Hello, My Dear Friend! Please like and subscribe to this youtube channel! Here you learn : 1: Creating a Modern Promo Video in After Effect 2: Modern Mobile Application Development in Flutter  
3: Modern Web App with React-Hooks. 4: Modern Video Editing 5: Principle of Animation 6: Creating JavaScript Games. https://youtu.be/cWnMXlFL_Qs

Reply all
Reply to author
Forward
0 new messages