Practice of Flutter Desktop
Contents
Practice of Flutter Desktop
Background
We were going to build a cross-platform desktop app, there are two choices: native and electron. Because I have used Flutter before, I remember that Flutter can also build cross-platform desktop apps, so I want to have a try.
The introduce and practice of flutter can be found in the article:
Demo
I have already compiled a flutter desktop example, you can download and have an experience.
macOS:
windows:
Experience
Very smooth and the interactive experience comparable to a mobile APP.
Development efficiency
Needed to be written in Dart language.
Most of the Flutter UI frameworks are currently designed for the mobile. If you want to use it on the desktop, you need to modify some style codes. We cannot use web UI frameworks such as Ant Design directly.
But if in the future your mobile app is also written in flutter, lots of code reuse can be achieved. Taking “xuegao” as an example, the original app flutter code can directly generate a desktop app without any change.
Progress
project is still under development, the mac version has been merged into the main branch. Windows or Linux platforms, which are in technical preview. You can try Windows and Linux platform support by reading the Desktop shells page in the Flutter wiki.
Ecology
The current flutter ecology is not as good as npm, and the desktop version has not been used by large companies. There are few third-party packages, but some basic packages can be found, For example, the stock chart
Package size
The empty project generation package is about 60M, the “xuegao” installation package is 67M, and after zip compression is 20M
Menu bar settings
https://github.com/google/flutter-desktop-embedding/tree/master/plugins/menubar
Currently supports mac navigation bar settings and shortcut keys.
Windows is still under development:
https://github.com/google/flutter-desktop-embedding/issues/105
System notification
Not found
File operations
Support, need permission
Auto update
Not provided by the official, you need to set up on your own.
https://github.com/google/flutter-desktop-embedding/issues/469