跪拜 Guibai
← All articles
Flutter · Client · AI Programming

Flutter 3.50 Lays the Foundation: Stable Native Interop, Broader Wasm, and Material/Cupertino Decoupling

By 程序员老刘 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Dart and native code can now talk synchronously over FFIgen/JNIgen, and Web Wasm doubles frame rates on Safari and Firefox, but the deprecation of dart:html and package:js gives every Flutter Web project a migration deadline, while the Material/Cupertino split changes how component upgrades are tested and shipped.

Summary

Flutter 3.50 lands with Dart 3.14 and a mandate to build for the next decade. The headline changes: Direct Native Interop is stable, so Dart can call Objective-C, Java, and Kotlin without the serialization overhead of Platform Channels; Flutter Web's Wasm target now runs on Safari and Firefox with frame rates reaching 2x or more on the official benchmark; and the Material and Cupertino widget sets have been formally split into standalone packages, decoupled from the SDK's release cycle.

The release also deprecates the old web interop libraries (dart:html, dart:js, dart:js_util, package:js) in favor of dart:js_interop and package:web, and introduces a --no-deprecated-js-interop flag to surface legacy dependencies during builds. Pigeon adds a preview native interop mode built on FFIgen and JNIgen.

The author's practical guidance: Platform Channel isn't dead, existing plugins shouldn't be rewritten, and production projects should wait about two months before upgrading. Focus first on third-party plugin compatibility and test branches across Android, iOS, and Web.

Takeaways
— 188 contributors, 69 first-time, over 1200 commits in the Flutter 3.50 release.
— Direct Native Interop is stable for Objective-C via FFIgen, Java/Kotlin via JNIgen, and C; supports synchronous calls and background isolates.
— Pigeon adds a preview native interop mode using FFIgen/JNIgen for type-safe bindings on iOS, macOS, and Android.
— Platform Channel remains supported; existing plugins do not need rewrites.
— Flutter Web Wasm supports Chrome/Edge 137+, Safari 26.2+, and Firefox 147+; older browsers fall back to JavaScript.
— Safari and Firefox require manual wasmAllowList in flutter_bootstrap.js; future stable versions will enable by default.
— Official heavy-widget benchmark shows 2x+ frame rates on Safari/Firefox, but results vary by application.
— dart:html, dart:js, dart:js_util, and package:js are deprecated, replaced by dart:js_interop and package:web.
— Use the --no-deprecated-js-interop flag on build/run/test commands to detect old libraries.
— Material and Cupertino SDK packages are deprecated; new projects default to material_ui and cupertino_ui packages.
— Migration command: dart fix --apply --code=migrate_design_widgets.
— Recommended upgrade strategy: wait two months, check third-party plugin adaptation, and run tests on Android, iOS, and Web.
Conclusions

The release prioritizes infrastructure over visible features; the author argues that official investment in native interop, web runtime, and decoupling directly affects a project's maintenance cost over years, even though it doesn't make demo videos flashier.

The deprecation of legacy web interop libraries forces a migration, but the --no-deprecated-js-interop flag offers a way to surface hidden dependencies before the official removal, which is a low-risk way to de-risk a future Wasm migration.

The Material/Cupertino decoupling splits version upgrades from the SDK, but it also forces plugin authors to test against more version combinations; the author's advice to run the migration command on a separate branch and review diffs is a practical guard against silent breakage.

Concepts & terms
Direct Native Interop
A stable mechanism in Flutter 3.50 that lets Dart call Objective-C, Java, Kotlin, and C directly without serializing messages through Platform Channels, supporting synchronous calls and background isolates.
Platform Channel
The previous method for Dart-native communication, which serializes messages and typically uses async channels; it remains supported but adds overhead for high-frequency calls.
Pigeon
A code generation tool for type-safe messaging between Dart and native code; in 3.50 it adds a native interop mode that generates bindings via FFIgen and JNIgen.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗