Flutter tips that will simplify your life when developing an app
When writing widgets with Flutter, you keep doing the same thing again again and again … After developing for over a year mobile applications with Flutter, I started to implement collections of widgets that I reuse everywhere in one or more applications. It goes from a simple custom RaisedButton to a custom Scaffold/Appbar and even up to a custom State. I compiled a list of what is most useful to do to save a lot of time while developing an application with Flutter.
Custom widgets to replace buttons
The first very usefull thing to do is to create custom widgets for all the kinds of buttons you will use. Let’s say that you want to use rounded buttons everywhere in your application with fontSize set to 14px. The code would look like this:
So now when you want to use one of your buttons, just write: