Flutter best practices

CodingWithTashi
8 min readJul 16, 2022

During your programming journey, you will build hell lots of applications irrespective of any technology that you use, and getting these things done is one thing but doing it the right way is what matters.

Flutter best practices

Hello guys, this is CodingWithTashi and in this shitty post, we are going to discuss some of the best practices that you can apply while writing flutter/dart code.

[Background story]

So the other day I was going through one of my old flutter application source codes (App link here, sorry source code is not open source 😊). It took me some time to go through each module as the code was messy and unstructured.

But in between, I realized how much I have improved on flutter over time. So I decided to refactor my application and here are the lists of mistakes that I have made but you can avoid them.

New comers: Those of you who don’t know me. I write shitty post on programming and share my flutter journey from time to time. So if you are someone who is interested, make sure to follow and subscribe to my medium.

Alright so, If you are in rush you can consider these bullet points and leave, otherwise, feel free to read the explanation with an example.

  • Use the const keyword whenever possible
  • Define constant with leading “k”

--

--