Starting a new Flutter Project: 10 questions you need to answer

Beginning a new project leaves you with many decisions to make. Here are 10 questions you should ask yourself.

Beginning a new project leaves you with many decisions to make. You should know supported platforms, languages and screen sizes before you start coding. This article shows you 10 things you should think about before starting a new Flutter project.

A Fresh start: Before you start a new Flutter project

Starting a new Flutter project is like starting to build a new house. At first there are almost unlimited options what you could build. But there are some decisions you need to make that define the outcome of your project.

How many floors should your house have? What type of architecture should be used? So before you start building, you start planning.

The same should apply for software projects. Before you begin coding, you should think about a few things first.

10 Questions

1. Which state management library do you use?

State management strongly defines the architecture of your Flutter app. Thus, deciding which state management approach you want to use, will be one of the first things you need to do when starting a new Flutter project.

Where for a small app you might end up just using Flutter’s setState() mechanism, with larger apps you’ll definitely want to go with a more advanced approach.

Popular libraries that base on Flutter’s InheritedWidget are Provider and Riverpod. If you are looking for reactive approaches, libraries like Bloc or Redux might be your way to go.

Have a look at the official Flutter documentation for a detailed overview of state management solutions.

2. Which platforms do you need to support?

With Flutter, you cannot only build apps for Android and iOS, but also for Web, Windows, Linux and macOS. Although, you can also add support to platforms later on, it is better to know your platforms in advance.

Whereas mobile apps work with taps and gestures, desktop apps should also support things like keyboard shortcuts and mouse interactions like right click or the mouse wheel. Adding these features later on will be more effort than just building them into your app from the start.

3. Which screen sizes do you support?

A similar question before kicking off a new Flutter project is, which screen sizes you should support. This is not only dependent on which platforms you choose to support, but also if you want to have tablet support.

Larger screen sizes offer you the possibility to put more information on one screen, which changes how you navigate through your app. For example: a tablet version can use a master-detail view on one screen, whereas the mobile version would need to put the master and the detail view on separate screens.

Changing the navigation within your app later can be a very annoying task. So better think about this before you start your project.

4. Which languages do you support?

You can target more users if you translate your app into multiple languages. Also, if you only release your app in one language, it is a good practice to have all translations in one place. This makes it easier to update names and also allows you to stay on top of your wordings.

Look at the Flutter documentation to learn how internationalizing Flutter apps works. If you are using IntelliJ, Android Studio or Visual Studio Code, I can recommend the Flutter Intl plugin. This plugin handles a lot of tasks needed for internationalization.

5. Do you need Navigator 2.0?

Flutter offers you to use two ways to build navigation within your app. Originally (using Navigator 1.0), navigation works by pushing or popping pages to/from a navigation stack. This works well for simple apps, but has limitations when you want to use deep linking or target the web.

Navigator 2.0 offers a more sophisticated approach to navigation. It gives you more control on how navigation in your app works, but requires you to set up a bunch of classes to make it work. It definitely makes sense for larger app – especially for web, but would be overkill for your tiny three to four screens app.

6. Do you need Flutter Version Manager?

If you work on multiple Flutter projects, it is likely that these projects use different Flutter versions. Although it’s best practice to use the newest version, upgrading might not have to the highest priority of your project tasks.

Usually, the Flutter SDK is installed somewhere on your computer as a directory with a bunch of files. If you have multiple versions of Flutter, you need several of these directories.

Before managing your Flutter SDKs becomes to tiresome, it may be time to install the Flutter Version Manager (fvm). This tool lets you set a Flutter version for each of your project and manages them for you.

7. Should you support multiple themes?

More and more apps support a light and a dark theme. When you are going to begin a new Flutter project, you should make sure if you want to have multiple themes.

It is much easier to add themes afterwards if you plan your architecture accordingly. This – for example – includes putting your theme configuration in a central place, instead of styling your widgets inline.

For more information about theming in Flutter, checkout this tutorial.

8. Which git repository do you use?

Don’t forget to commit and push your source code to a repository. This keeps your code stored in a safe place, even if your computer breaks or gets stolen.

So, before starting a new Flutter project, checkout services like GitHub or Bitbucket, that offer you free private repositories.

9. Is Flutter the right framework for your project?

Flutter is a great framework, but is it the right one for your project? There are some reasons why native app development would be a better fit.

For example, apps that have a strong hardware focus (e.g. need to read data from sensors or external hardware) might be easier to implement using native app development for Android and iOS.

Another example, when native app development should be preferred is, when you want to build an app with a strong native look and feel. That means using all native UI elements and animations. This is where Flutter sometimes have problems – especially with iOS specific design elements.

For more information about this question, read this article about cross-platform vs native development.

10. Do you need a CI/CD pipeline?

If you know that your new Flutter project is going to be somewhat bigger, you should also think about using a CI/CD pipeline.

The purpose of a CI/CD pipeline is to regularly run a set of tasks that help to improve your software’s quality. Most commonly, tests and static analysis are run on your code and a new version of your app is being built.

This way you will quickly see if there are problems with your app.

There are multiple providers that offer CI/CD pipelines for Flutter: CodeMagic, Bitrise or Appcircle.

Summary

There are many questions you should ask yourself before beginning a new flutter project. What platforms do you target? Which languages do you need to support? Do you need a dark theme? Should you use Bloc, or maybe Riverpod?

Going through this list before starting a new Flutter project helps you to make sure you do not forget an important aspect of your app. Many things become more and more difficult to add the further you progress within your project.

Is there anything missing in this list? Let me know by writing a comment below.

Built with Hugo
Theme based on Stack designed by Jimmy