跪拜 Guibai
← All articles
Frontend · Android · Flutter

Flutter 3.50 Splits Material/Cupertino into Packages, Cuts iOS Touch Latency by a Full Frame, and Stabilizes Direct Native Calls

By 恋猫de小郭 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Every existing Flutter app must move to the new Material/Cupertino packages on 3.50, and the payoff is a full frame less iOS touch latency, stable direct native calls without third-party plugins, and a ~31% smaller Web download. Teams on CocoaPods face a hard December 2026 deadline to switch to Swift Package Manager; Intel Mac users have a one-time warning now and loss of support later.

Summary

The big breaking change: `package:flutter/material.dart` and `package:flutter/cupertino.dart` are deprecated inside the Flutter SDK. New projects default to the standalone `material_ui` and `cupertino_ui` packages; existing projects can run `dart fix --apply --code=migrate_design_widgets` to rewrite imports, add dependencies, and sync localization setup. Any team that hasn't migrated will hit compile errors on 3.50.

The release also delivers a major iOS performance win. Touch events used to be buffered and delayed until the next VSync, adding up to a frame of latency. The engine now runs the event dispatch and `CADisplayLink` callback synchronously in the same runloop turn, so 60Hz devices shave 16ms and 120Hz devices shave 8ms. iOS 27 startup crashes are fixed, and `flutter screenshot` works again on physical devices.

For Web, Safari 26.2+ and Firefox 147+ join Chrome in running Flutter Wasm, with frame rates at least 2x the JS fallback. The new `WebParagraph` delegates font shaping to the browser's TextMetrics API, cutting CanvasKit from ~5.46 MB to ~3.75 MB and eliminating tofu blocks for rare characters and emoji. Native interop goes stable: `FFIgen` and `JNIgen` now generate direct Dart bindings for Apple and Android native APIs, and Pigeon uses them under the hood. Dart 3.14 adds `dart migrate` for breaking changes, speeds up analysis and formatting, and includes the first visual deprecations for `dart:html` and friends. Deprecations also hit the platform side: CocoaPods becomes read-only by December 2026, and Intel Mac support is being dropped.

Takeaways
— Material and Cupertino are no longer part of the Flutter SDK; they move to `material_ui` and `cupertino_ui` on pub.dev, and `dart fix --apply --code=migrate_design_widgets` migrates existing projects automatically.
— iOS touch latency drops by a full frame: 16ms at 60Hz and 8ms at 120Hz, thanks to removing async buffers and making the touch-to-render pipeline synchronous.
— Android release builds now block external Intent extras for custom routes, entrypoints, cached engines, and dart-flags, while normal deep links still work.
— Hybrid Composition++ (HCPP) reaches full form on Android 14+ with Impeller Vulkan, aligning native views with the system compositor and enabling blur over PlatformViews and stretch effects during overscroll.
— `ListView.separated` finally supports `itemExtentBuilder`, letting you compute both item and separator heights for lists with thousands of rows.
— `ScrollPhysics.shouldUpdate` lets scroll physics change without rebuilding the scroll view, enabling dynamic damping or `allowImplicitScrolling` changes.
— `Navigator.popUntilWithResult` adds return values to popUntil, closing an issue open since 2019; `pushNamed<T>()` now supports explicit generic returns.
— FFIgen and JNIgen are stable for generating Dart bindings to Apple and Android native APIs; Pigeon now uses both under the hood.
— WebParagraph uses the browser's Enhanced TextMetrics API for font shaping, cutting CanvasKit from ~5.46 MB to ~3.75 MB and removing fallback font requests.
— Safari 26.2+ and Firefox 147+ are now whitelisted for Flutter Wasm builds, delivering over 2x frame rates in heavy widget tests compared to JS.
— Dart 3.14 introduces `dart migrate` for breaking changes and speeds up `pub get`, Find References, and analyzer startup, with plugin scoping tightened.
— CocoaPods becomes read-only in December 2026; Flutter warns at build time now, and Intel Mac support is being phased out.
Conclusions

Moving Material and Cupertino out of the SDK is a long-overdue decoupling that lets both style systems evolve on independent release cycles, but it forces every existing app through a migration and will break CI pipelines that haven't planned for it.

The iOS touch latency win comes from simplifying the threading model, not from micro-optimizing individual callbacks; that's a structural change that benefits every interaction, not just one code path.

WebParagraph's trade-off is telling: giving up fine-grained control over text shaping to let the browser do it shrinks the download and removes tofu blocks, but it also means Flutter Web's rendering is now more dependent on each browser's text metrics implementation, so behavior could vary across engines.

Making FFIgen and JNIgen stable while forcing plugins to AGP built-in Kotlin signals that Flutter is betting on generated bindings over hand-maintained platform channels, which should reduce maintenance burden but will make plugin migration mandatory for the ecosystem.

Concepts & terms
Hybrid Composition++ (HCPP)
Flutter's approach for rendering Android native views (maps, WebView, etc.) by handing off composition to the system's SurfaceFlinger/SurfaceControl, so Flutter layers and native views align at the system compositor level instead of being stitched together in Flutter's own raster thread.
FFIgen / JNIgen
Tools that scan platform headers (Apple's Objective-C/C and Android's Java/Kotlin classes) and automatically generate Dart bindings for direct native API calls, eliminating the need for hand-written plugin channels.
WebParagraph
A new Flutter Web text renderer that delegates font shaping and measurement to the browser's Enhanced TextMetrics API instead of bundling a C++ font engine into CanvasKit. It cuts CanvasKit download size by ~31% and removes fallback font requests for rare characters and emoji.
UberSDF
Impeller's unified signed-distance-field shader used to draw lines, thin rectangles, rounded rectangles, gradients, and shadows. On macOS it can use Shader Storage Buffer Objects to reduce GPU cost for gradients.
From the discussion
Featured comments
清扬婉兮

HarmonyOS hasn't adapted material_ui yet 🙄

See top comments, translated →
Source: juejin.cn ↗ Google Translate ↗ Backup ↗