跪拜 Guibai
← All articles
Frontend

Flutter 3.50 and Dart 3.14 Ship Faster iOS Touch, Stable Native Interop, and Wasm on Safari and Firefox

By JarvanMo ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

A free 16ms touch latency cut on iOS and a security fix on Android are concrete reasons to upgrade, and the Material/Cupertino deprecation will force a migration eventually; doing it now via one command is far cheaper than untangling mixed imports later.

Summary

Flutter 3.50 and Dart 3.14 land with a clear focus on shedding legacy. The SDK's Material and Cupertino libraries are officially deprecated, with material_ui and cupertino_ui taking over as standalone packages; a single `dart fix` command migrates existing projects. iOS gets a full-frame touch latency reduction by removing outdated buffering layers, and the engine now handles touch events in the same refresh cycle, saving 16ms on 60Hz devices and 8ms on ProMotion displays. Android release builds stop accepting runtime configuration from external Intent extras, closing a security hole, and HCPP expands for hybrid native views.

Native interop goes stable with FFIgen for Objective-C and JNIgen for Java/Kotlin, making direct API calls without platform channels a production option. WebAssembly support extends to Safari and Firefox, with content-hashed builds solving the stale-JS caching problem. Desktop gets a slew of improvements: Impeller's SDF renderer takes over shapes on GPU, Windows handles non-ASCII paths, and Linux gains more window control. The multi-window API is renamed and restructured, though still experimental.

The toolchain adds `dart migrate` for breaking changes and speeds up Analysis Server renames. The article's own advice: upgrade for the iOS latency win, but check a few migration gotchas first—external Intent dependencies, removed `ignoringSemantics`, and SPM settings.

Takeaways
— The SDK's Material and Cupertino libraries are deprecated in favor of material_ui and cupertino_ui; flutter create now imports material_ui by default.
— One command migrates existing projects: dart fix --apply --code=migrate_design_widgets.
— iOS touch handling now renders in the same frame, cutting latency by 16ms on 60Hz devices and 8ms on 120Hz ProMotion.
— Android release builds ignore external Intent extras for route, dart_entrypoint, and cached_engine_id, and reject --dart-flags.
— Hybrid Composition++ requires Android 14+ and Impeller on Vulkan, and is manual on stable via flutter config --enable-hcpp.
— Plugins must use Built-in Kotlin or face pub.dev score penalties and compile failure at AGP 10.
— Native interop via FFIgen (Objective-C) and JNIgen (Java/Kotlin) reaches stable; Pigeon's new mode is preview.
— WebAssembly runs on Safari 26.2+ and Firefox 147+ via allowlist, with frame rates over 2x JS in widget-heavy scenes.
— --web-content-hash adds content hashes to JS, Wasm, and assets for safe long-term caching.
— WebParagraph experimental with Chrome team reduces CanvasKit from 5.46MB to 3.75MB.
— New framework additions: SliverClipRect, SliverClipRRect, showDialog barrierBuilder, Navigator.popUntilWithResult.
— Windows now loads resources from paths with non-ASCII characters.
— Multi-window API renames: RegularWindow to Window, sizedToContent to shrinkWrap, and WindowManager moves above WidgetsApp.
Conclusions

The iOS touch latency fix comes from deleting cross-thread buffering that was left over from when touch events and rendering lived on different threads; it's a textbook example of how architectural debt quietly degrades performance.

Deprecating Material and Cupertino from the SDK is a bigger break than a typical deprecation list; it tells plugin owners and app teams that the design libraries now move at their own pace, outside the engine's release cycle.

Native interop reaching stable is the payoff of a long bet: FFIgen and JNIgen let Flutter apps call platform APIs directly, which for many use cases makes platform channels optional rather than mandatory.

The Wasm expansion to Safari and Firefox closes the last major browser gap for Flutter web, but the allowlist and manual configuration mean it's not yet friction-free.

Concepts & terms
Hybrid Composition++ (HCPP)
An Android rendering mode where native views are composited by the system rather than Flutter, reducing tearing and input glitches in platform views.
FFIgen
A Dart tool that generates bindings for Objective-C APIs for direct native interop.
JNIgen
A Dart tool that generates bindings for Java/Kotlin APIs for direct native interop.
WebParagraph
An experimental Flutter web feature that uses the browser's own text layout engine instead of CanvasKit's font parser, reducing download size.
SDF renderer
Signed distance field rendering in Impeller, used to draw shapes like lines and rounded corners directly on the GPU.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗