网页
综合
更新时间 2026-11-14 05:03:24
What's new in Flutter 3.50 | The Flutter Blog
自动蜘蛛
flutter.dev
正文约 6000 字
Investing in Flutter's next decade
Flutter 3.50 is fully baked and ready to serve alongside Dart 3.14. This release brings a set of updates that showcase where Flutter is headed next. Direct native interop is now stable, letting you call between Dart and native platform APIs. Faster WebAssembly across Safari and Firefox, alongside browser-native text layout, gives Flutter web apps a major speed boost. We've also expanded our platform embedder APIs for custom hardware, and now the standalone material_ui and cupertino_ui packages are the default for new projects.
As always, we couldn't do any of this without the Flutter community and all of your contributions across the framework and ecosystem. In this release cycle alone, 188 contributors, including 69 first-time contributors, landed over 1,200 commits. So, run flutter upgrade in your terminal to get the latest release, or read on to explore what's new.
Last year, we shared our vision for direct native interoperability to eliminate the serialization overhead, string-based plumbing, and mandatory async latency of traditional platform channels. In Flutter 3.50, that multi-year investment reaches production readiness: FFIgen for Objective-C and JNIgen for Java and Kotlin join FFIgen's long-standing C support as stable. You can also preview Pigeon's new native interop mode, which uses both generators to create type-safe bindings under the hood.
For any native integration, you can now skip platform-channel message passing and call between Dart and platform code directly, including synchronously or from background isolates. Use FFIgen to bind C and Objective-C APIs, or use JNIgen to bind Android system APIs and custom Java or Kotlin libraries in your Flutter and Dart apps. When building multi-platform plugins, Pigeon's native interop mode handles data conversion and native lifetimes automatically on iOS, macOS, and Android.
Thank you to all the package authors, contributors, and Early Access Program participants, especially Jon Holtan, Rody Davis, Dominik Roszkowski, Alexander Thiele, and Morgan McKenzie. These community members tested early builds, reviewed documentation, and helped shape these APIs. Stay tuned for a dedicated post on direct native interop.
Learn more: Native interop documentation
On the web, Flutter 3.50 pairs faster cross-browser WebAssembly execution with built-in asset cache busting, modern JS interop checks, and smaller, browser-native text rendering.
Running flutter build web --wasm compiles your app to both WebAssembly and JavaScript, falling back to JavaScript automatically on older browsers. Chromium-based browsers (Chrome and Edge 137+) already run WebAssembly by default. In Flutter 3.50, Safari 26.2+ (macOS and iOS) and Firefox 147+ deliver over 2x the frame rate of JavaScript on heavy widget benchmarks, and you can opt in today using web/flutter_bootstrap.js before they become enabled by default in a future stable release:
Learn more: Support for WebAssembly (Wasm)
Deploying an updated Flutter web app can leave returning users with stale JavaScript or mismatched assets cached in their browser. Passing --web-content-hash to flutter build web solves this by embedding content hashes into your compiled JavaScript, WebAssembly, and build/web/assets/** filenames and updating flutter_bootstrap.js automatically. That lets you cache hashed app bundles and assets for up to a year (Cache-Control: public, max-age=31536000, immutable) while keeping index.html and flutter_bootstrap.js on no-cache so every deploy loads cleanly. The flag also generates build/web/precache_manifest.json for custom service workers and Workbox pipelines, replacing the deprecated flutter_service_worker.js tokens.
Learn more: Web content hashing and HTTP caching
Flutter web apps and plugins use JS interop libraries to access browser features like local storage or wrap third-party JavaScript SDKs. Dart's older JS-only libraries (dart:html, dart:js, dart:js_util, and package:js) are now deprecated in favor of dart:js_interop and package:web. These modern replacements work across both JavaScript and WebAssembly builds, and the legacy libraries will be removed in a future Dart release. Pass --no-deprecated-js-interop to flutter build web, flutter run, or flutter test --platform chrome to catch outdated JS imports. This fails the build early if your app or any of its packages still depend on legacy browser libraries, helping you prepare for WebAssembly.
Learn more: Using compatible JS interop libraries and Announcing Dart 3.14
Built in collaboration with the Chrome team on Chrome's experimental Enhanced TextMetrics API, WebParagraph lets the browser shape operating-system fonts directly on the canvas instead of bundling C++ font parsers. Delegating text layout to the browser shrinks the CanvasKit download (to roughly 3.75 MB, down from 5.46 MB), eliminates network requests for fallback fonts, prevents missing-character tofu boxes across international scripts, and renders native color emojis.
Learn more: WebParagraph experimental preview (#172561)
Following up on our Google I/O Pluggable Platforms announcement, we're continuing to make Flutter easier to port to new operating systems and hardware. In Flutter 3.50, we closed two key gaps in the underlying Impeller and Vulkan embedder APIs. Community contributor xiaowei-guan added Vulkan external texture support so custom embedders can pass textures directly to the engine for sampling across Impeller and Skia backends. Custom embedders can now invoke FlutterEngineNotifyLowMemoryWarning to purge Impeller's offscreen render target cache immediately under memory pressure.
Following the 1.0 launch of standalone material_ui and cupertino_ui in Flutter 3.47, Flutter 3.50 formally deprecates the coupled package:flutter/material.dart and package:flutter/cupertino.dart libraries alongside their localization delegates in package:flutter_localizations. New projects created with flutter create now import package:material_ui
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。