Member-only story
Flutter tips and good practices
Some tips and good practices to you have a good relationship with flutter!
Hi, today I'm going to write about some tips and good practices to you work with flutter. This article can and will be right opinionated, so if you don't agree with something just ignore, ok? Let's go!
If you have something that could be added to this article, just comment below, let's discuss it.
1. Always use commas:
When you don't put commas at the end of some declaration, and you try to indent your code, it is not going to end good. The indentation process use the commas to break the lines, and without them the code looks like trash, and it is difficult to understand what's happening.
Expanded(
child: InkWell(
onTap: _onAddTap, <---
child: Container(), <---
), <---
), <---
The default value for max characters it is 80, and when you do not use commands, your code feels like a hadouken.
2. Choose the right state management:
Look the needs of your project and your team, do not choose Bloc, Mobx … Or wherever, just because someone said that it is good, you need to think if every one of your team will be comfortable to work with your choice and if your project will scale as you need with…