Dart 3.0 and Flutter 3.10: What’s new?
Time to explore the exciting updates to Dart 3.0 and Flutter 3.10. These releases introduce significant improvements in code security, web development capabilities and other exciting features. From enhanced code reliability to optimised web performance, join us as we dive into the improvements brought by Dart 3.0 and Flutter 3.10. Let's take a look at how these updates enable our developers to create even more robust, efficient and visually stunning applications.
Dart 3.0: A big leap forward
Dart is a client-optimised language for developing fast apps on any platform.
With the recent announcement during Google I/O this year, Dart has taken another big step. The transition to Dart 3.0 is finally here, after about two years in the making.
Sound null-safety for improved code safety
The introduction of sound null-safety in Dart 2.12 was an important step in ensuring code safety and reducing errors. With sound null-safety, the compiler can guarantee that a variable is not null when it is expected not to be null. This reduces errors during runtime by providing upfront warnings even before the application is built. With Dart 3.0, the legacy unsound mode is no longer supported, reducing overall application size and simplifying code maintenance.
Exciting improvements in usability
Dart 3.0 brings several exciting features to the language. One of the most notable additions is “Records”, allowing multiple values to be bundled into a dynamically shaped object in a type-safe manner. Records permit developers to combine unrelated values and pass them together. It provides a convenient way to treat multiple related values as a single unit.
Another powerful feature introduced in Dart 3.0 is Pattern Matching. Pattern Matching enables more flexible expressions while maintaining type safety. Developers can now have multiple return types, assign variables using a switch-case and enhance JSON decoding using patterns. It adds more expressive capabilities to the language and opens doors to new possibilities in code organisation and readability.
Flutter 3.10: Enhancements for web development
Flutter is an open source framework for building natively compiled, multi-platform applications from a single codebase.
Alongside Dart 3.0, Flutter 3.10 brings exciting enhancements for web development. One of the major improvements is a reduction in bundle size for web applications. Flutter now provides a scaled-down version of CanvasKit for Chromium-based browsers, using existing browser features. This optimisation reduces the size of CanvasKit by about 30%-50%, depending on the browser.
In Flutter 3.10, icon tree-shaking is now supported on the web. This feature removes unused icons from an icon font, making web applications even smaller. By eliminating unnecessary icons, developers can ensure a more optimised and efficient user experience.
Better graphics and seamless integration
Flutter 3.10 introduces support for Fragment Shaders (written in OpenGL Shading Language, or GLSL) on the web. Fragment Shaders add visual effects and post-processing capabilities to Flutter web applications. This addition brings enhanced graphics and animation possibilities for web developers using Flutter.
Another significant improvement is the production-ready Element Embedding feature. With Element Embedding, developers can now embed their Flutter web applications into other web applications using a regular <div> element. This provides bidirectional communication between the embedded Flutter app and the hosting web application. Element Embedding ensures seamless integration and offers more flexibility when integrating Flutter into existing web projects.
The releases of Dart 3.0 and Flutter 3.10 mark significant advancements in code safety, performance and flexibility for developers. These updates further solidify Dart and Flutter as powerful tools for creating cross-platform applications and web experiences. Developers can now take advantage of these latest releases to build even more robust and high-performance applications.
Book a meeting
Discuss your idea directly with one of our experts. Pick a slot that fits your schedule!