I've been in the tech world for a while. The scratchy sound of a phone dial to access the World Wide Web, WebMonkey to learn HTML 1.0, and Ask Jeeves to search the Internet. Yes, that's when I started. Ancient, arguably. In all my years plugged in, there's been one constant: tech wars.
- Mac vs. Windows
- Chrome vs. Firefox
- Android vs. iOS
As a developer, all these wars meant you needed to know lots of workarounds so your code would work on all systems, browsers, and screens. Sometimes, you had to develop the same app twice for different technologies. As a business, this meant you either needed more developers or your current developers needed to spend more time on each app/website. Not great.
And so came the idea of a single app codebase that could be used across all platforms with very little effort. The dream. Over the years, many frameworks proclaimed to deliver on this dream – Flash, JVM, PhoneGap, Xamarin – but they all suffered from severe compromises in performance or utility.
Until Flutter came along. While not fully perfect, it's as close to the dream as we've ever come. It covers Android, iOS, Mac, Windows, Linux, and web. The Flutter team has been working hard to fulfill on their promise of a universal, agnostic framework for apps that can run anywhere.
Recently, the team released Flutter 2.8, which has turned Flutter into an even more promising, mature, and stable framework. In this blog post, we will look at Flutter's performance, flexibility, and ecosystem.
The Flutter team worked a lot on improving the start time and memory usage of Flutter apps, both for mobile and web.
For one, when testing Flutter's performance improvements against Google Pay (over a million lines of code), the team saw a 50% reduction in startup latency when running the app on a low-end Android device. They saw a 10% improvement on high-end devices. Not bad.
Second, WebView 3.0 fixes a major problem with Flutter's preview version, turning it into a much better user experience.
Third, Flutter 2.8 also received many devtools updates, including an
Enhance Tracingfeature to diagnose UI jank from expensive Build, Layout, and Paint operations.
Four, the team now lets the memory footprint of the Dart VM load in two parts. This saves apps 40MB until the isolated services are needed and helps developers target devices that don't have much memory.
If you want to test Flutter on the web, Flutter Dartpad supports a large number of packages. 23 packages are available for import, from several Firebase services to popular packages such as
flutter_riverpod. Check the Dart wiki for the team's plans to add more packages.
Flutter now also supports 2D games through Flame 1.0, which provides whatever you need to build games quickly: A game loop, primitives, sprites, images, collision detection, a world camera, an effects system, and gesture/input support. The Flame engine can also be used with bridge packages that can integrate, in turn, with other libraries.
Google is betting hard on Flutter, so it's no surprise that Flutter is a first-class citizen in many of its biggest products. Google Mobile Ads, for example, now has a Flutter SDK so Flutter apps can make money without extra steps or new things to learn.
Google's Firebase now also has stable Flutter plugins and a new, nice UI kit that makes regular tasks extremely easy for Flutter.
For example, the flutterfire_ui package can create basic authentication with only a small amount of code.
At the beginning of this post, I said that Flutter is as close to the dream of a universal codebase as we've ever come. Its performance is only getting better, it's becoming increasingly flexible, and its ecosystem is expanding rapidly.
But what's tech without a tech war? Flutter is battling React Native for dominance, and React Native is a top-notch framework too. Whichever one wins, it'll be great for both developers and users. Developers are getting increasingly mature frameworks while users are getting better, faster, and more stable apps. What's not to like about that?