This article is produced by The Whisper Team, a startup team that focuses on audio and music technology. We are deeply using Flutter to build cross-platform applications. We hope to explore the possibilities of Flutter on the desktop and mobile.

background

We are planning to develop a fully functional cross-platform music production platform (DAW). From the beginning of the project, we have defined the support plan for all platforms (Windows/MacOS/Linux/iOS/Android), so we are also looking for technical solutions with this goal in mind. After a period of research and learning, several options have been roughly determined, and the internal research results are as follows (the results only represent the internal cognition of the team, please forgive any differences) :

Technical solution performance R&d efficiency Cross-platform compatibility Ability to scale Native code interaction
HTML5 low high high low low
QT high Very low high high high
React Native In the high low In the In the
Flutter high high high In the high

Why not use a technology stack built on HTML5?

HTML5 is known as the most easy-to-use cross-platform UI solution, and the industry is mature, with many optional frameworks and open source components available for direct use. However, as a professional productivity tool, DAW is not suitable to run completely in the browser environment, such as third-party plug-in system browsers cannot support, and the use of memory resources is not very convenient. Usually, a music project may occupy several GIGABytes of memory, and tens of thousands of objects need to be maintained. This is a serious burden for Javascript as well as browsers. On the other hand, even if we needed to support the Web in an emasculated form, WASM technology was the better choice. Therefore, we are not considering a technical solution based on HTML5.

Why not an old native high-performance framework like QT & GTK?

In terms of traditional technology, QT is the most suitable technical solution for our needs, and many old tool manufacturers are also based on QT technology stack. QT is definitely the best choice in terms of running efficiency. Our main concern is the ability to control CPP and development efficiency. One of the fundamental differences between UI development and engine development is that engine development usually uses unit tests to complete logic verification, while UI is difficult to use unit tests to verify UI effects. It’s also rare to see a team that actually relies on unit testing for UI development, and QT doesn’t have hot Reload technology like Webpack, so UI validation is very inefficient, and we can’t even afford it as a small team. CPP is also a very high barrier to entry, and we had our doubts about the QT solution, but we didn’t give up completely.

What features of Flutter attract us

  • Flutter uses the Skia based drawing engine to build components directly. The OPERATING system only needs to provide pixel-level drawing capabilities, thus ensuring cross-platform UI consistency. Jokes about React Native compatibility have been flooding the community.
  • Dart is also very comfortable with UI development.
    • Object is passed by default.
    • HOT Reload is supported. This brings about a substantial improvement in development efficiency, making Flutter development no less efficient than HTML5
    • AOT support, production-grade code performance skyrocketed, as well as native application performance.
    • FFI support. You can interact directly with native C & Cpp code with almost no performance penalty.
    • Web support. Flutter compiles directly to the Web, making it possible to provide Web services.

These properties of Flutter hit our target, so we decided to try to build our platform using Flutter.

conclusion

If you are also looking for a technical solution that combines r&d efficiency with runtime efficiency, Flutter should be a good choice.