Should you use 3rd party Flutter boilerplates or templates?
Do they really help you to ship faster - without having to implement all the boring stuff?
Or are there drawbacks you should be aware of?
Here's my take. 👇
The main selling point sounds good → get a Flutter project already pre-configured with many of the things you need:
- Authentication? Check
- Localization? Sure
- State Management? Everyone needs that, right? 😉
Unfortunately, most boilerplates are fundamentally flawed because different apps have different requirements.
They were never designed with *your app* in mind. Rather, they are usually too broad, include too many packages, and are often out of date (I know because I downloaded many of them, and that's what I observed).
Consider this: as soon as you start with a boilerplate, you end up borrowing a ton of code and packages that:
1) you don't fully understand
2) you don't need in the first place
3) may not even compile with the latest Flutter version
If you dig deeper, you end up discovering:
- Arbitrary folder structure
- Features you don't need (maybe your app only needs local storage, but you ended up importing an entire authentication system)
- Poor coding standards (asynchronous gaps, helper builder methods rather than widgets, etc.)
- A bunch of unnecessary design patterns (applied inconsistently across the codebase)
Sounds like a bad dream to me. 😱
So, what kind of packages and tools should you want?
- those that solve one problem and they do it well
- those that are regularly maintained
- those that give you fine-grained control over how to configure things (some good examples: flutterfire CLI, firebase CLI, shorebird, flutter_launcher_icons, flutter_flavorizr)
Remember: it's your job to figure out how to combine/use them to satisfy your app's requirements.
Of course, code reuse can be extremely valuable. For many years, I have ported my best code across projects.
The key word here is *my*. Not someone else's.
So, rather than looking for a quick fix (and regretting your choices later), consider writing your own collection of reusable components and classes. If you do this well, you will ship faster.
Happy coding!
does anyone know how i can get free flutter swag for a high school career fair - I am a sr dev and i would be talking about what i do a my job which i'm happy to say is mostly flutter :) @flutterdev#Flutter@nlycskn
#Flutterturns5 My first commits with flutter on github were Sep 2017 for codelab and May 2018 for a real project, albeit MVP/POC type stuff. so i've been super excited all along :)
@gaetschwartz @biz84 you can consider @RandallSchwartz 's technique of runApp(SplashApp(): initStuff() runApp(realApp()) or the super high reated flutter favorite native splash screen plugin has a .preserve capability. i'm curiouas what you think is better at this point a year later @biz84