DEV Community

Cover image for How To Create a Flutter Project
Stephen Michael
Stephen Michael

Posted on • Originally published at axxellanceblog.com

How To Create a Flutter Project

Introduction

Flutter is one of the most popular frameworks used in building cross-platform applications for the web, android, ios, mac, Windows, and even Linux. It has most of all the plugins you might need to build a full-blown app, that is to say, if your app will not use too much native hardware and so. In this article, I will show you how to create a simple flutter project and what all the available folder structures are used and meant for.

The original source of this article can be found here.

What is Flutter

Based on the flutter website available at flutter.dev :

Flutter is an open-source framework by Google for building beautiful, natively compiled, multi-platform applications from a single codebase.

By the time of this writing, the latest version of flutter is v3.3, and it's able to build native applications for all popular systems and hardware, like web, android, ios, mac, windows, and even Linux, in fact, an unofficial ubuntu software app is currently built using flutter and lots of people are already saying it is better than the official one. As of 2020 over 500,000 developers already use Flutter for their everyday dev langs. So I believe you have seen now how much flutter is worthwhile, tho just like I said, it's one of many popular cross-platform frameworks out there, so do your research before venturing into one.

Without much talk let me get right to the point of making this article.

I do believe by now you must have had flutter installed on your operating system if not please do read through my article on How to install flutter without android studio, or alternatively you can search online for a better report on how to do so for your specific OS.

Creating a Flutter Project

Creating a flutter project is quite easy, just make sure your flutter installation does not have any error that might prevent your project from running or from creating, you can do so by running this command below on your terminal:

flutter doctor
Enter fullscreen mode Exit fullscreen mode

The output should be similar to this:

Windows Terminal

If it shows all green then you are good to go, though sometimes it does not need to be all green base on your current project need.

Now open your window terminal by typing this command below, do so in a folder you want to create your flutter project, mine is in c:/all-things-flutter/flutter-project/

flutter create projectName
Enter fullscreen mode Exit fullscreen mode

The output should be similar to this:

Windows Terminal

ProjectName above means the name you want to name the project, after that move into your project folder using your terminal by typing this command below:

cd projectName
Enter fullscreen mode Exit fullscreen mode

The output should be similar to this:

Windows Terminal

Note: in this article i assume that your OS is windows if not so please do check online for your OS terminal command

After changing the directory into your project folder, type this code below to open your project on vs code:

code .
Enter fullscreen mode Exit fullscreen mode

The outcome should be similar to this:

Code

Alternatively, if your OS ain't window and your code editor ain't vs code, then you can simple double click on your code editor and drag your newly created flutter project to your code editor, I believe this show work on any type of OS, by the way, all flutter command listed here are the same on all OS

From here you can choose to do whatever you like, it is up to you now.

Conclusion

We have come to the end of this short article, due to it not requiring much effort but somehow I do believe someone somewhere might find it worth reading even though it seems like a silly article to write on, so if you kinda find it useful to you, do help us share it on your social media account or on your blog and also don't forget to comment on this, Thanks for reading 💓.

Top comments (0)