The latest Sharing Café at Plansoft was an opportunity to dive deeper into Flutter, an exciting tool from Google introduced to us by our colleague Iacopo Ciao.
A brief introduction: Google Play and Apple Store are the two largest app distribution platforms for mobile devices, and any respectable app is available on at least one of them. As long as we are developing for just one platform, choosing the best technology is easy; but what can we do when the client wants to target both iOS and Android?
The first thing that comes to mind—unless we are developing a video game—is to go for a hybrid solution, primarily to avoid writing the same code twice.
Depending on our needs, there are alternatives available on the market and suitable products to successfully build our application. The question is: at what cost?
Challenges can vary depending on the chosen product: the application might be slow, fail to look native, have components behaving differently across operating systems, or, worse yet, encounter version-specific conflicts.
The solution presented at Plansoft was Flutter, a UI toolkit in Dart created by Google to develop natively compiled applications for mobile, web, and desktop from a single codebase.
What is Dart?
Dart is a fully open-source, object-oriented programming language developed by Google, designed to replace JavaScript as the lingua franca for web development on the open web platform.
Its C-like syntax ensures rapid learning, offers native support for reactive programming, and includes numerous optimizations for managing graphical interfaces.
Dart’s compiler enables the creation of programs for the web, desktop, and servers through two platforms: Dart Native and Dart Web. As a result, Dart delivers better performance, easier development for large-scale projects, and enhanced security features.
What Makes Flutter Stand Out?
First and foremost, it is platform-independent. The most widely used frameworks implement an intermediate layer, known as a “bridge,” to communicate with native APIs. From a user experience perspective, this intermediary results in a loss of fluidity, while from a development perspective, maintenance costs rise as components can vary across platforms.
Flutter addresses this issue with a widget system that directly renders on the canvas using Skia, a powerful 2D graphics engine written in C++.
By remaining independent of the platform, Flutter ensures the interface consistently functions for the user.
By using its own components instead of OEM ones, Flutter guarantees that the final product remains identical regardless of the target platform.
Unlike other SDKs, Flutter’s toolkit is built on composable APIs accessible at every level, scalable with declarative styling, and designed for building reactive components. Additionally, Flutter offers two major widget families for layout management: Material Design and Cupertino.
Another standout feature is hot reload: this functionality allows developers to modify the UI, fix bugs, or add features while the app is running. Every time the source code is updated, the Dart Virtual Machine refreshes the application in real-time without requiring a restart.
Who Uses Flutter?
Here are some of the most prominent users of Flutter:
- The New York Times
- Google Assistant
- Groupon
- Alibaba Group
- BMW
- SQUARE
- eBay
- NuBank
- Dream11
Conclusion
In conclusion, Flutter stands out among other mobile app development solutions by not using WebView or OEM widgets. It also has only a thin layer of C/C++ code, ensuring significantly better performance compared to its competitors.
Flutter has a relatively fast learning curve, offers numerous well-documented libraries, and is a winning solution as it enables developers, with proper training, to produce native apps for both major mobile ecosystems without the need for expensive porting.
Credits
- This article was initially written for plansoft.it. You can find the original article on Archive.org.
- Text review by Martino Spighi ❤️