Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Flutter Starter Project, the Easy Way
Salman S
Salman S

Posted on

     

Flutter Starter Project, the Easy Way

When starting our application with Flutter, we usually use a default project from the following Flutter command.

flutter create myapp
Enter fullscreen modeExit fullscreen mode

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

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 viagit 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 whereF comes it.

F

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.

https://pub.dev/packages/f
https://github.com/salkuadrat/f

It's as simple as using these command:

f s myapp
Enter fullscreen modeExit fullscreen mode

By defaultf 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 myappf s --cubit myappf s --getx myappf s --riverpod myapp
Enter fullscreen modeExit fullscreen mode

You can explore the examples to see the structure of starter project generated byf s command.

starter_bloc
starter_cubit
starter_getx
starter_provider
starter_riverpod

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

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

  • Joined

Trending onDEV CommunityHot

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp