跨平台构建与集成
Flutter enables you to build, test, and deploy beautiful, natively compiled, multi-platform applications from a single codebase.
Overview
#Flutter and its core packages often automatically support and integrate with Flutter's officially supported platforms. Some platforms require you to set up additional tooling, but once your development environment is set up, Flutter apps are usually functional across platforms out of the box.
Occasionally you need to integrate with platform-specific functionality. For example, you might want to use a native library that's only available on iOS and iPadOS. For many use cases, you can find and use one of the many Flutter plugins provided by the Flutter team and the amazing Flutter community. If none of them meet your needs, you can write platform-specific code and even create your own plugin.
Set up platform development
#While Flutter apps can be built for a variety of supported platforms with little to no modifications to your code, your development environment might require additional setup when targeting a new platform.
To set up development for an additional platform, select the platform from the following:
Set up your development environment to build Flutter apps for Android.
Set up your development environment to build Flutter apps for iOS.
Set up your development environment to build Flutter apps for the web.
Set up your development environment to build Flutter apps for Windows.
Set up your development environment to build Flutter apps for macOS.
Set up your development environment to build Flutter apps for Linux.
Integrate with each platform
#If the situation you're trying to solve is not covered by an existing Flutter plugin, check out the following guides to learn how to integrate with each of the supported platforms.
Integrate with Android
#Learn how to add custom integrations with Android to your Flutter app.
Learn how to add a splash screen to your app on Android.
Learn how to add the predictive back gesture to your app on Android.
Learn how the latest Android APIs in your app from Dart.
Learn how to bind to native C code from your app on Android.
Learn how to host native Android views in your app.
Learn how to launch a Jetpack Compose activity from your app.
Integrate with iOS
#Learn how to add custom integrations with iOS to your Flutter app.
Learn how to add a launch screen to your app on iOS.
Learn about plugins that support functionality from native iOS frameworks.
Learn how to bind to native C, Objective-C, and Swift code from your app.
Learn how to host native iOS views in your app.
Learn how to add an iOS app extension to your app.
Learn about Flutter's support for new or upcoming iOS features.
Integrate with the web
#Learn how to add custom integrations with the web platform to your Flutter app.
Customize how your Flutter app is initialized on the web.
Learn how to bind to native C code from your app on Android.
Learn how to embed native web content in your app.
Learn how to embed your Flutter app in another web app.
Learn how to take advantage of WebAssembly in your Flutter web app.
Learn how to integrate with JavaScript from your Dart code.
Integrate with Windows
#Learn how to add custom integrations with Windows to your Flutter app.
Learn how to bind to native C code from your app on Windows.
Learn about different options for distributing your app on Windows.
Learn different techniques to integrate with the Windows look and feel.
Integrate with macOS
#Learn how to add custom integrations with macOS to your Flutter app.
Learn how to bind to native C, Objective-C, and Swift code from your app.
Learn how to host native macOS views in your app.
Learn how to enable specific capabilities and services for your app.
Learn different techniques to integrate with the macOS look and feel.
Integrate with Linux
#Learn how to add custom integrations with Linux to your Flutter app.
Learn how to use and bind to native Linux libraries and code.
Prepare your Flutter app for distributing to Linux users.
Learn how to deploy your Linux desktop app to the Snap Store.
除非另有说明,本文档之所提及适用于 Flutter 的最新稳定版本,本页面最后更新时间: 2025-08-04。 查看文档源码 或者 为本页面内容提出建议.