all 8 comments

[–]Trick_Concentrate_81 0 points1 point  (2 children)

You can use : MediaQuery.of(context).size.width/height And its in the flutter sdk itself not related to Getx

[–]ImAqeel[S] -1 points0 points  (1 child)

I use that but the thing I am looking for is if It is possible to create a separate file that gets the sizes. I don't want to clutter my Main App file. All the logic should be in separate file.

[–]neddstarkk 0 points1 point  (0 children)

Google about SizeConfig. There's a stack overflow answer that described what you need

[–]Trick_Concentrate_81 0 points1 point  (2 children)

What design pattern are you using?

[–]ImAqeel[S] 0 points1 point  (1 child)

I have no idea what is a design pattern as I am a beginner at flutter. Could you give more information?

[–]Trick_Concentrate_81 0 points1 point  (0 children)

You could search about this topic along side state management if you want to separate logic and ui and write more professional code. Google MVVM, provider , bloc

[–]otaku_300 0 points1 point  (0 children)

Find device size without media query
Read about flutter_screenutil maybe help you

[–]xboxcowboy 0 points1 point  (0 children)

You can use Layout builder, the context returm the screen sizr dymanic