When starting our application with Flutter, we usually use a default project from the following Flutter command.
flutter create myapp
These default project is more than enough for a newcomer who just starting to learn development with Flutter.
However, for some who are on their journey to build a real production-ready application, this default feels a little too simple. This is where a starter project comes in.
Starter project is a template that we use to structure our new project.
It's usually comes with boilerplate code so we don't need to repeat ourselves (DRY) each time we start a new project.
There're many starter projects for Flutter that we can find at Github.
Most of it comes as a standalone repository that we can copy via
git clone or download manually (and then setup all the necessary changes to fulfill the needs of our new app).
Most of these starter project also comes with a predefined state management that we have to use in the new project. They don't give enough freedom to choose our preferred state management from the start.
This is where F comes it.
Started as a simple CLI package to be used as an alternative for Flutter CLI. In its new version, F is now equipped with a command that we can use to create a starter project in Flutter.
It's as simple as using these command:
f s myapp
f s command will generate a starter project with Provider. But, if we want a project with other state management (BLoC, Cubit, GetX, or Riverpod), feel free to specify it in the command.
f s --bloc myapp f s --cubit myapp f s --getx myapp f s --riverpod myapp
You can explore the examples to see the structure of starter project generated by
f s command.
It's simple and flexible.
The goal is to make our journey with Flutter becomes better... more smooth, more comfortable, and more enjoyable.
Try it out and let us know what you think.
~ Happy Coding