A stack of different tablets and phones
Photo by Hal Gatewood on Unsplash

Why I Hard Code My Sizes In Flutter

Andrew Zuo
Lost, But Coding
Published in
5 min readFeb 19, 2023

--

OK, this is going to be a controversial one. I first heard about this controversy on the Flutter Humpday Q&A.

And I had my thoughts then. But then a week passed and then there was a new Humpday Q&A and I lost interest in that idea. But then I saw this thread on the Flutter Dev subreddit.

OK, I think now’s the time to share my thoughts.

Clarification First

Originally I wanted to name this post “Why I Hard Code My Sizes In Flutter And Why You Should Too”. But you know, I’m not sure if the way I’m doing it is the best way to actually do it. I just know that this is what works for me.

Also some definitions. When I saw ‘hard coded’ I’m only referring to things like text sizes and padding. I still use the safe area padding. I still use columns and…

--

--