Building Flutter app for windows

CodingWithTashi
5 min readMar 26, 2022

--

According to statistica, Windows is the most widely used computer operating system (OS) in the world with more than 70 percent of the market share.

Their closest competitors — Apple’s macOS and iOS — only hold a combined 18 percent of the market. That means there is hope for flutter developers like us to get filthy rich (😜 lol ).

Hello guys, This is CodingWithTashi, In this weekly post We are going to talk about flutter for windows and at the end, we will build a simple todo application from scratch for windows.

Note: By now you might have already known that flutter 2.10 brought a stable release of window support. This means we can start building ready-for-production apps on Windows. Check out my other post where I have to explain what are the changes and updates that flutter 2.10 has brought.

Promotion: If you are into flutter windows, I have made one crappy course on flutter for windows on udemy, feel free to check out from here

  • As I mentioned in another post, Having flutter as your skill comes with lots of benefits, and Platform support is one of them.
  • Building a flutter app for a desktop might seems scary especially if you have never touched on the desktop app but that is the beauty of flutter. You don’t have to know much about the window environment unless you are building a very complex application.
  • With that said let's start building your first window application

Alright, let’s not waste your precious time and gets our hand dirty.

Here is the content

  1. Upgrade your flutter version to 2.10 or later
  2. Create a new flutter project with window support turned checked.
  3. Start building a crappy todo app(😊)

1. Upgrade Flutter version

If you are reading this post then probably you might already use flutter 2.10 or a later version. If not please upgrade your flutter version to 2.10 or later by running flutter upgrade cmd.

flutter upgrade

2. Create a new flutter project for window

Once the version upgrade is done create a new flutter project with the window option check as the screenshot below.

Flutter for window

For some reason, if you are not able to check the option then continue without checking the option. We can enable it manually with a command.

flutter create .

To enable macOS and Linux, you can add the command below.

flutter config --enable-macos-desktop
flutter config --enable-linux-desktop

Alright if you run the app now, You should be able to get the old flutter starter counter application. If not you may need to fix issues related to visual studio etc.

Flutter for window

3. Building todo app

Before we start, let's talk about the library that we can use in any of your Windows apps.

UI: To get the window UI experience we are going to use fluent_ui which uses native window fluent UI.

Database: There are plenty of packages available in pub.dev but unfortunately, At the time I am writing this post, they are only a few database packages that support windows. I can only think of

  • NoSqldb (Support All Platform)
  • SQL DB (Support All Platforms)

I have already made a post on flutter moor/drift database. You can check it from here.

To make our post more simple I am not going to use any database in this window application. Please let me know if you need a tutorial based on this. But for now, we will just skip the database and use an in-memory object.

Alright here is what you will see when you run this project. I have decided not to post the code in the medium as there is not much explanation which is why I posted it on GitHub.

TL,DR: All I am doing in this project is that instead of using MaterialApp widget I am using FluentApp and same goes for other widget such as text,appbar etc I am importing fluent_ui.dart instead of material.dart

flutter window app

You can also find the source code, executable, and video tutorial here.

  1. Source code:

2. Executable File

3. I have already made a tutorial on this so you can check out the same.

4. Still reading?

If you want to explore more about flutter for desktops then definitely

You can also check out my recent flutter for window course in udemy.

Thanks, guys, I hope you like this shitty post. please make sure to give a clap 👏 and leave some engagement. let me know if you have anything on your mind. I would love to connect with you.

Check out more blogs from CodingWithTashi. Connect me on GitHub or Instagram or YouTube.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

CodingWithTashi
CodingWithTashi

Responses (1)

Write a response