Flutter Desktop Apps: Getting Started

Mar 28 2023 · Dart 2.19, Flutter 3.7, Android Studio 2021.3.1 or higher, Visual Studo Code 1.7.4 or higher

Part 1: Flutter Desktop Apps

01. Learn About Flutter Desktop

Episode complete

Play next episode

Next
About this episode
Leave a rating/review
See forum comments
Cinema mode Mark complete Download course materials
Next episode: 02. Installing Flutter
Transcript: 01. Learn About Flutter Desktop

Flutter can now create desktop apps.

Desktop support now includes the Mac, Windows and Linux platforms. Desktop apps are different from mobile in that windows are usually in landscape. Desktop now supports the keyboard. Keycodes are important on desktop to support keyboard combinations like Ctrl-C or Command-C and can even use raw key codes. The mouse is supported along with right-click and scroll wheel. Right-clicking a mouse is useful for things like popup menus. You can also check which platform you are on.

You can now create “Federated” Plugins that allow different authors to work on the platform they are comfortable with. Federated plugins allow you to target each platform separately with platform specific code, but bring them together into one dart plugin file that the user will see.

Todo App

In this course you will be building a Todo app for the Mac and Windows that looks like this. You will be building a desktop app that will allow the user to add Todo lists that are shown as tabs. Something like “Personal”, “Work”, or “projects”. Each tab will then have a column for each category. Inside of that column, the user can add a todo shown as a card widget. This widget will show the todo name and notes.

This is an advanced desktop app that uses Riverpod (a Reactive caching and data-binding framework) as well as Drift for SQL database work.

Clicking on the card will take you to the todo editor where the user will be able to mark the todo as finished and add notes. This is a pretty simple app but shows the power of Flutter.

All todos are stored in an internal sqlite database so that the app persists the data. The user will also be able to import and export those todos. We will not go into detail about how to build and use the database but all of the code is in the starter project for you to review.

You will build the final mac and windows applications that can be run outside of the IDE and distributed to users.

These apps will have their own icons.

If you have used Flutter for iOS and Android, there are some differences between mobile & desktop that you should think about. While you can use all of the widgets that Flutter provides, you may not need all of them.

For example, the AppBar in mobile apps is very common but not really used for Desktop apps. We will not be using it in our app.

Desktop apps also have menus, so our app will use a plugin for providing menus.

There are special considerations for the Mac when it comes to dealing with the file system. These are called Entitlements, and we will cover that as well.

And finally, you will see how to fix the minimum window size so that the user cannot shrink the window so small that it causes rendering issues.