r/FlutterDev • • Oct 16 '26

Discussion Building a full-featured desktop application with Flutter

Flutter is obviously a mobile-first platform due its origins, but I've spent 18 months using it to build a full-featured desktop application for Windows and macOS, with Linux planned.

I'm a developer with 20 years of experience, including desktop software development. This isn't a "build a todo list!" demo or a vibe-coded experiment: it's a substantial application approaching public release, and I thought Flutter developers might be interested in seeing what's involved in taking Flutter beyond mobile.

So what kind of desktop experience can Flutter build today? Here's one example. [See below for a link to get and run it yourself if you're interested. Free and open to anyone.]

The application is Fractal Outliner, a desktop outliner in the same general category as OmniOutliner for Mac, but focused for people who live mainly in plain-text ecosystems (e.g. sofware developers).

This is a desktop-only application. There is no mobile version. The goal is to provide a proper desktop editing experience with all that implies, integrated with the operating system rather than simply presenting a mobile-ported interface in a desktop window.

Flutter as a development platform was good for some parts of this, less good at others.

What the application is:

  • Outliner with topics, subtopics; create, move, rearrange, hide to collapse, expand to drill down, move topic trees between documents, etc.
  • Full keyboard support, with configurable shortcuts
  • Integration with OS file handling, including file-type associations and opening documents from Finder/Explorer
  • Drag and drop
  • Document themes, including a custom theme editor
  • PDF, HTML, Markdown, OPML, and plain-text import/export
  • Multi-pane editing and tabbed documents
  • Native desktop file operations and clipboard integration

What Flutter provided

Most of the application is built using Flutter's standard capabilities:

  • Widgets and layout -- the main window content
  • Keyboard event handling
  • Shortcut registration and management
  • Resizable windows and responsive layouts
  • Drag and drop
  • Context menus and right-click interaction
  • Localization (English, Spanish, German, Japanese)

An effort was made to adapt the application to Mac and windows UI sytles; the experience is a little different on each platform (how dialogs work, what buttons and checkboxes look like, how settings are laid out, what menu items exist, etc).

What packages provided

Pub.dev packages filled in some of the functional gaps to extend Flutter's rending core:

  • Markdown, XML, and HTML support
  • Path handling
  • PDF export
  • Windows Store MSIX packaging
  • macOS menu bar integration (with limitations)
  • File pickers
  • ZIP archive support
  • OS and version detection
  • Split view widget for multi-pane editor, etc
  • Various other utilities (application uses 23 pub.dev packages total)

What flutter provides that works less well on desktop

  • Keyboard event support: the model is there, everything technically works, but managing complex input focus and keyboard-based navigation using Flutter's FocusNode system is full of problematic edge cases
  • Mac menu support, and general integration of menus + shortcut keys: the Mac menu integration is primitive, and windows and Mac use completely different menu+shortcut systems in flutter
  • Printing: there's a pub.dev package for printing, but it requires exporting to PDF (challenging in itself with anything but simple font handling) and flutter provides no direct integration or visibility with the host printing system
  • Undo/redo support: flutter's undo/redo implementation is self-contained inside each TextField, and there is no support at all for integrating text editing undo events with application-level events into one undo stream

What I implemented myself with native code

Flutter is just not a complete desktop development framework. It does great at drawing content in a desktop window. It does considerably less well at being a well-behaved and full-featured citizen in the desktop environment. A large number of things people expect from any desktop "document editor" application simply don't exist (or exist only in limited/problematic pub.dev packages) and have to be implemented with native code to get the best version:

  • Remembering and restoring the window position and size, including enforcing a minimum window size
  • Opening documents through the OS, such as double-clicking a file in Finder or Explorer
  • Handling the file reference when the application is launched by double-clicking a document
  • Document icons and file-type registration for the application's .frac files
  • Spellchecking in text fields (available in Flutter's mobile text fields, but not built in to the desktop experience in the same way)
  • macOS App Store sandboxing and file-access permissions
  • An in-app command to show a document in Finder or Explorer
  • Serious multi-format clipboard integration (vs basic plain-text copying and pasting flutter provides)
  • Handling read-only files
  • Various other OS integration details

The macOS App Store sandboxing and file-access work, in particular, is a lovely little nightmare. So are the limitations of the mac menu bar system integration, and the behaviors of Flutter's keyboard event handling and input-focus systems, dealing with international fonts in the PDF package, ... but those are stories for another day.

Other factors

  • Internationalization
  • Help files, etc

Internationalization to German Spanish and Japanese took far longer than for a mobile app, due to the larger set of "outside the application UI" resources used by the application (example files, templates, website content, video captions, etc). Also the usual trade-offs of "localize as you go" vs "localize at the end": early lets you see the impact of different text lengths in design (especially German/Spanish) which can be more severe with the wider range of window sizes on desktop, but usually means multiple re-do's of localization as UI and terminology evolve.

Help files and such are also more challenging on desktop, where applications can tend to be more complex and require more extensive help and reference materials as a baseline user expectation

Try it yourself

The application is now in its third beta release and nearing public release (latest version: 0.9.3 for Mac, 0.9.5 Windows). The public beta is open, free to use, and includes all application features. No registration or account is required.

If you're curious about Flutter on the desktop, you can try it on Windows or macOS and see how it works in practice.

Website and beta access: https://fractaloutliner.app

I'm interested in discussion with other Flutter developers about desktop development: what Flutter handles well, where its abstractions stop being sufficient, and what you've found necessary to implement through native platform code.

[Edits: typos]

29 Upvotes

7 comments sorted by

4

u/krush_62 Oct 18 '26

Thanks for sharing your experience. I had/have a very similar journey. I am a very experienced developer too and I also created a Desktop-first application (having a port/version for Android tablets too). I experienced many of the same issues:

  • Shortcuts/Hotkeys with the FocusNode are not very intuitive and need a lot of tuning
  • Advanced handling of native windows is also challenging
  • UI with Material needs a lot of work to match known Desktop philosophies

My application is not that strongly integrated into the OS as yours, though. I do not regret it since the performance and look and feel are great.

2

u/driftwood_studio Oct 18 '26

It's good to hear that others run into some of the same issues.

How workable did you find it to translate the user experience into Android in terms of converting between an assumption of precision-mouse as a pointer device vs the lower-precision touch model? Was that a concern with your interaction model and layout?

The lack of hover is a small issue, but a bigger issue for me is that I have a sort of information-dense layout model, and pieces of that are hard to replicate in a model where, for example, the default padding around a checkbox on mobile in Flutter is HUGE compared to what's reasonable padding for desktop. [An issue I filed about that prompted a change in the defaults, and I had some other issues picked up and changed with regard to PlatformMenu bar, etc... but I don't have the bandwidth to submit proper fixes and pull request myself so I'm dependent on the kindness of strangers who are willing to pick the issues up once filed.]

2

u/krush_62 Oct 18 '26

Since my application is not data driven at all, I did not have a lot of your issues. But I had the problem with the checkboxes though. I solved a lot of the issues with a heavily customized theme. My use case (it is a drawing application) regarding the precision of the cursor did not really exist since the preferred input method on Android is a stylus (which led to other problems I had to tackle). I had to find some sizing "in between" for the buttons.

2

u/driftwood_studio Oct 18 '26

Interesting. Thanks for sharing your experience.

I don't want to make any promises about mobile versions until I see how the public release for desktop goes, but all this kind of stuff is hovering around in the back of my mind as "how is that going to work...?"

> ... heavily customized theme

Yay... I heard that. Most any line of code in my application that has do with anything rendered on screen starts with `... = PlatformAwareThemeProxy.something()"

3

u/SpecialistServe3974 Oct 19 '26

We also made a desktop first application.
We started with Qt and migrated to Flutter.
Not sure I regret that. C++ is meh.. (tho there are rust bindings + QML)
anyways QML is not the best for data-oriented apps and I don't wanna do Qt-Widgets thanks 😄

we had issues with multi-window and video streams..
I'll prob write a post about the journey soon

6

u/[deleted] Oct 16 '26

[removed] — view removed comment

3

u/driftwood_studio Oct 16 '26

What I ended up doing with the shortcut system was essentially forking things heavily by platform, and making shortcut registration and menu updates essentially the same process. Every time the "windows menu renderer" runs, it also uses my ShortcutsManager to do updates (replacements really) of shortcut registrations. That windows menu system uses a menu widget system so the widget creation and shortcut registration and pretty clean as distinct steps. But for Mac, with the PlatformMenuBar widget, it's (as you say) terribly complicated by the fact that (a) macOS is involved in the shortcuts, and (b) PlatformMenuBar isn't really a widget in any real flutter sense -- it's a sort of Frankenstein hybrid link to a native API, essentially a remote procedure call to set up callbacks, all wrapped in a flutter "widget" package. For this, the shortcut key system is again separate, co-opted into my Mac menu rendering system with it's own custom shortcut setup code. So I have (a) my menu item/action definitions, (b) menu structure definitions (menu layout and item ordering), (c) menu renderers (build widgets for windows, PlatformMenuBar for Mac), and (D) ShortcutsManager responsible for all needed shortcut registration/deregistration.

As you say, it gets very messy, very fast.

And that's leaving aside issues like "platform menu bar can't add an icon or even a checkmark to menu" or the complete lack of any single "menu bar" object/system providing an abstraction.