Things You Need to Know After Flutter Engage.
On 3rd of march 2021, Flutter Engage took place virtually via Flutter YouTube channel due to the current state of the world. The theme of this year’s event is to highlight the flexibility and portability of flutter as a complete UI toolkit for building beautiful apps for any platform. Flutter Engage is an event organized by Google to celebrate the arrival of the new version of Flutter. The flutter Engage kicked off with a One-hour long keynote where numerous interesting and big announcements were made by Tim Sneath (Director for Flutter and Dart) and his team.
This year’s flutter event is key milestone for Flutter with the launch of Flutter 2. In keynote they talk about flutter on Android and IOS as well as web desktop and etc. This article will explain some information about Flutter version 2.0 what are breaking changes it brings and how they affect your current apps and future projects. And all those changes mean for the future of Flutter dev.
Flutter 2 Support for 6+ platforms
Using Flutter 2 now the developers target 6 platforms there are Android ,IOS, windows, macOS, Linux and the web. Flutter is native support for 6 different platforms and ability to tailor the experience for each platform without compromising performance. Flutter is perfectly suited to both rapid integration and high-quality results. Other thing is Flutter can be embedded in cars, TVs, and smart home appliances. Because of these things I think Flutter brings cross-platform development to a next level.
Accourding to the keynote there are already over 150,000 Flutter apps out there on the Play Store alone, and every app gets a free upgrade with Flutter 2 because they can now grow to target desktop and web without a rewrite.
Over a thousand of engineers at Google are using Dart and flutter to develop apps today. GPay, Stadia, Google One, and the Google Nest Hub are the good examples for flutter apps by google.
In this event they shared their experiences with flutter.
Flutter Web features
Flutter discovered that CanvasKit can deliver superior performance, fidelity, and correctness.
Demo of flutter plasma
2. Web-specific features and widgets
A Flutter app running in the browser should feel like a web app. So flutter dev team added features to Flutter that help you use the best of the web.
Desktop announced in stable
- Produces standalone executables for each platform
- Microsoft contributed PRs to use the latest Windows Runtime APIS, while running on Windows 10
- Canonical share their experience with Flutter
Most mobile application developers monetize their apps through adds and having support for native ads and inline banners was key. Now, flutter developes have a Google Mobile Ads SDK (plugin) This plugin unifies support for Ad Manager and Admob, so no matter what size publisher you are, this plugin can be tailored to your scenarios.That provides open beta access to these capabilities for developer experimentation and feedback!
Sound Null Safety in Dart!
Null safety in Dart means a couple of things. First, it makes every variable you declare a non-nullable type unless you explicitly indicate that it can be null. This is a very important fact because it makes your current code non-nullable by default. However, such a change has an extremely large impact on the present codebase because it’s a major pivot in how things work. That’s why your code is probably not going to compile when using this new feature. Fortunately, Flutter team was aware of that issue and prepared solutions for migrating to null safety. There is an official migration guide on Flutter docs. Also, Dart team has decided not to enable null safety automatically yet, it will happen when most of the package ecosystem is migrated successfully. If you want to use null safety now, use `dart migrate` and check the guide for details.
Another great thing about null safety is being a very valuable constraint for the Dart compiler. Compiler can optimize your code much better if it doesn’t need to check for nulls all over the place. That means your app is even faster than before while using null safety in the code. The optimizations can be also visible in decreased app size. Google Pay app’s code size was reduced by 14% when using the `flutter-sizeopt` tool for optimizing Flutter application size.
Null safety not only embraces developer experience and app performance but it implies a lot of possibilities for Dart in the future. There are a few features that have been awaited by the community for a long time like data classes. With this critical null-safety feature, Dart team can approach those proposals in a better way. Also, as Bob Nystrom said during the keynote, the team looks for improving metaprogramming features that now are mainly resolved by using code generation (e.g. freezed or json_serializable). The official roadmap mentions type aliases, static meta-programming (like in Rust or Swift) and generic metadata annotations.
New Dart update brings also some minor improvements like the new UTF-8 decoder that is up to 20x faster than before.
My highlight was the four new tooling highlights showcased in the keynote: Flutter Fix to help you deal gracefully with breaking changes, Dart Migrate to help you refactor to leverage null safety support, Flutter Debugging updates where DevTools embed in the IDE of your choice (enabling seamless transition from error message to Flutter inspector view), and new Tooling features like App Size debugging and more.
Microsoft ♥ Flutter
There were multiple instances during the keynote where Microsoft got shout-outs for not just partnering on an application, but contributing core functionality to the Flutter engine. The Guy marin (Lead of Microsoft Surface Developer Experience Engineering)Feature in Flutter Engage event.
- Flutter For Windows — a snapshot of Flutter Desktop in the stable channel should allow developer to compile Flutter source code to a native Windows app!
- Flutter For Foldables — the same Flutter 2 announcement also highlights this collaboration with the Microsoft Surface Duo Dev team.
- Flutter & VS Code — Visual Studio Code has always been a first class IDE option for Flutter. Now, by installing and running DevTools from VS Code, we can explore the new debugging features and tooling support right within VS Code IDE.
- GSkinner — showing off the Flutter Folio “signature” open source multi-platform app for Flutter v2.
- iRobot Education — showing Flutter in the browser, with their education web app migration.
- Canonical — showing Flutter in the desktop (Linux), and committing to Flutter for future mobile/desktop apps.
- Toyota — showing Flutter in embedded environments, with their in-vehicle infotainment use case.
This is a breaf and small article about Flutter Engage event . I invite to watch full event and experience flutter 😁
You can also watch this 8-minute recap from the Flutter team.
Happy Coding with Flutter ✌️❤️