It’s no secret that our mission for Flutter is to target a broad variety of devices— including iOS, Android, Windows, Linux, macOS, and web — from a single codebase, with native compilation and game-quality visuals. Within Google Flutter is used by projects from Assistant to Stadia, from Cloud Search to Blogger. And outside of Google, Flutter has been adopted by companies from ByteDance to Grab, from Nubank to MGM Resorts, all of whom benefit from the productivity and flexibility of Flutter.
Many of you are interested in progress on desktop operating systems including Windows, macOS, and Linux: in surveys and on GitHub, desktop is repeatedly one of the most popular new features. Over the coming weeks, we’re going to show off more of our work here, and we thought we’d start by surveying some of the work from various feature teams that contribute towards the overall project. While desktop support is currently a technical preview, there’s been plenty of work going on.
Recently we checked in profile and release mode for Windows and Linux, in addition to the existing support for macOS. For example, if you’re running the latest builds of Flutter, you can now compile a Flutter application to a Windows executable with flutter build windows
. This uses our production AOT compiler to create native x64 machine code that can be distributed to a machine without Flutter installed.
Whether you’re building standalone executables or web apps, there are unique attributes to building desktop-class experiences. Desktop windows are usually in landscape mode and resizable; input usually comes from a physical keyboard and mouse rather than an on-screen keyboard and touch; and controls are optimized for a different screen density.
At the framework level, we’ve made various changes to Flutter to support desktop-class experiences.
[visualDensity](https://api.flutter.dev/flutter/material/ThemeData/visualDensity.html)
property, which allows controls to adapt their density based on the platform they are targeting, with more compact spacing on desktop platforms. An example of how this is used is [TextField](https://api.flutter.dev/flutter/material/TextField-class.html)
, which now offers compact, comfortable, and standard spacing depending on the specified density.Platform
class) and Windows, macOS, and Linux all provide the appropriate results.[NavigationRail](https://api.flutter.dev/flutter/material/NavigationRail-class.html)
widget that is specifically designed for desktop-class experiences on desktop and tablet.#flutter #mobile-apps #web-development #developer