Google Flutter gains sound null safety, payments plug-in


Flutter 2.2, the latest release of Google’s UI toolkit for building natively compiled apps, has been fitted with capabilities ranging from better performance and reduced software errors to app monetization enhancements.

Unveiled on May 18, Flutter 2.2 is built on the foundation of Flutter 2, which debuted in March and extended Flutter from its mobile roots to add backing for web, desktop, and embedded apps.

New capabilities in Flutter 2.2 include the following:

  • Sound null safety is now the default for new projects, adding protection against null reference exceptions and enabling developers to express non-nullable types in their code. With the Dart language used with Flutter, the compiler can eliminate null checks at runtime to improve app performance.
  • The ads SDK has been updated with null safety and support for adaptive banner formats.
  • A payments plug-in, built with the Google Play team, enables payment for physical goods on both iOS and Android. The in-app purchase plug-in, still in beta, has been updated.
  • For web apps, background caching is offered using service workers.
  • Dart has been updated to version 2.13, which expands support for native interoperability by supporting arrays and packed structs in FFI (foreign function interface). Support for type aliases increases readability and provides a pathway for some refactoring scenarios.
  • Android apps support deferred components.
  • Tools have been added to understand memory allocation in apps.

Google also noted that tools to precompile shaders to eliminate or reduce first-run jank in iOS are in the works. To install Flutter, go to flutter.dev.

Copyright © 2021 IDG Communications, Inc.



Source link