Cross-platform: Flutter 2.10 is Windows-ready


As usual, Google rolled out fresh updates to the cross-platform framework Flutter and the programming language Dart at the same time. Flutter 2.10 – supported by Dart 2.16 – completes the final step on the Windows desktop platform and now allows developers to deploy production-ready applications on the Microsoft operating system.

In addition to the target platforms Android, iOS and the web, support for Windows, which is classified as stable in Flutter 2.10, is the first milestone for native adaptation to desktop operating systems – macOS and Linux are to follow in the coming months. Otherwise, the new Flutter release provides performance improvements, bug fixes and other new features. It also marks the start of the migration to Material 3, which can be used, among other things, to create complete color schemes based on a single color.

The new features in Flutter 2.10 include compressed pointers, which were introduced in Dart 2.15 and are now also intended to help apps for iOS 64-bit systems use less memory. Build errors in Android apps that hit the 64K limit for methods, i.e. that reference more than 65536 methods, should be prevented by Multidex support. While Flutter by default targets the latest Android version when building an app – currently version 12 (API level 31) – if the method limit is exceeded, you can use the --multidex-Flags over flutter build appbundle or flutter build apk also target API level 21 and below.

The new release of the programming language Dart does not offer any new functions, but the development team is migrating from the older CLI tools to a uniform one darttool set. Applicable with the release of Dart 2.16 dartdoc and dartanalyzer as deprecated and are expected to be completely eliminated in the next release. The two will be replaced by the new tools dart doc and dart analyze.

Although the Flutter and Dart duo is basically designed to always equip apps for as many platforms as possible, there are exceptional cases in which developers want to deliberately restrict the target platforms for their app. The reason for this can be a special API that is only available on individual operating systems or the library dart:ffi, which cannot be used on the web. With Dart 2.16, concrete target platforms can now be set via the platformstag in a package’s pubspec. The following listing shows an example of a pubspec.yaml file that only commits Windows and macOS to an app.

name: mypackage
version: 1.0.0
platforms:
  windows:
  macos:
dependencies:

A complete overview of all changes and further details on the new versions can be found in the respective blog entries for the cross-platform framework Flutter and the programming language Dart.


(map)

To home page



Source link -64