Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,20 +167,23 @@
{ "source": "/learn/learning-resources", "destination": "/reference/learning-resources", "type": 301 },
{ "source": "/material-3-migration", "destination": "/release/breaking-changes/material-3-migration", "type": 301 },
{ "source": "/packages-and-plugins/androidx-compatibility", "destination": "/platform-integration/android/androidx-migration", "type": 301 },
{ "source": "/packages-and-plugins/c-interop", "destination": "/platform-integration/android/c-interop", "type": 301 },
{ "source": "/packages-and-plugins/c-interop", "destination": "/platform-integration/legacy-ffi-plugin", "type": 301 },
{ "source": "/packages-and-plugins/plugins-in-tests", "destination": "/testing/plugins-in-tests", "type": 301 },
{ "source": "/packages-and-plugins/plugin-api-migration", "destination": "/release/breaking-changes/plugin-api-migration", "type": 301 },
{ "source": "/platform-integration/android/androidx-migration", "destination": "/release/breaking-changes/androidx-migration", "type": 301 },
{ "source": "/platform-integration/android/c-interop", "destination": "/platform-integration/legacy-ffi-plugin", "type": 301 },
{ "source": "/platform-integration/android/install-android", "destination": "/platform-integration/android/setup", "type": 301 },
{ "source": "/platform-integration/android/install-android/:rest*", "destination": "/platform-integration/android/setup", "type": 301 },
{ "source": "/platform-integration/android/splash-screen-migration", "destination": "/release/breaking-changes/splash-screen-migration", "type": 301 },
{ "source": "/platform-integration/c-interop", "destination": "/platform-integration", "type": 301 },
{ "source": "/platform-integration/c-interop", "destination": "/platform-integration/legacy-ffi-plugin", "type": 301 },
{ "source": "/platform-integration/ios-app-clip", "destination": "/platform-integration/ios/ios-app-clip", "type": 301 },
{ "source": "/platform-integration/ios/c-interop", "destination": "/platform-integration/legacy-ffi-plugin", "type": 301 },
{ "source": "/platform-integration/ios/install-ios", "destination": "/platform-integration/ios/setup", "type": 301 },
{ "source": "/platform-integration/ios/install-ios/:rest*", "destination": "/platform-integration/ios/setup", "type": 301 },
{ "source": "/platform-integration/ios/splash-screen", "destination": "/platform-integration/ios/launch-screen", "type": 301 },
{ "source": "/platform-integration/linux/install-linux", "destination": "/platform-integration/linux/setup", "type": 301 },
{ "source": "/platform-integration/linux/install-linux/:rest*", "destination": "/platform-integration/linux/setup", "type": 301 },
{ "source": "/platform-integration/macos/c-interop", "destination": "/platform-integration/legacy-ffi-plugin", "type": 301 },
{ "source": "/platform-integration/macos/install-macos", "destination": "/platform-integration/macos/setup", "type": 301 },
{ "source": "/platform-integration/macos/install-macos/:rest*", "destination": "/platform-integration/macos/setup", "type": 301 },
{ "source": "/platform-integration/platform-adaptations", "destination": "/ui/adaptive-responsive/platform-adaptations", "type": 301 },
Expand Down Expand Up @@ -809,7 +812,7 @@
{ "source": "/to/add-to-app", "destination": "/add-to-app", "type": 301 },
{ "source": "/to/add-swift-package-manager-manually", "destination": "/packages-and-plugins/swift-package-manager/for-app-developers#add-to-a-flutter-app-manually", "type": 301 },
{ "source": "/to/add-web-support", "destination": "/platform-integration/web/building#add-web-support-to-an-existing-app", "type": 301 },
{ "source": "/to/android-ffi", "destination": "/platform-integration/android/c-interop", "type": 301 },
{ "source": "/to/android-ffi", "destination": "/platform-integration/legacy-ffi-plugin", "type": 301 },
{ "source": "/to/android-setup", "destination": "/platform-integration/android/setup", "type": 301 },
{ "source": "/to/android-supported-architectures", "destination": "/deployment/android#what-are-the-supported-target-architectures", "type": 301 },
{ "source": "/to/asset-from-package", "destination": "/ui/assets/assets-and-images#from-packages", "type": 301 },
Expand Down Expand Up @@ -860,16 +863,15 @@
{ "source": "/to/ios-create-flutter-engine", "destination": "/add-to-app/ios/add-flutter-screen#create-a-flutterengine", "type": 301 },
{ "source": "/to/ios-deploy", "destination": "/deployment/ios", "type": 301 },
{ "source": "/to/ios-development-team", "destination": "/deployment/ios#review-xcode-project-settings", "type": 301 },
{ "source": "/to/ios-ffi", "destination": "/platform-integration/ios/c-interop", "type": 301 },
{ "source": "/platform-integration/ios/c-interop", "destination": "/platform-integration/bind-native-code", "type": 301 },
{ "source": "/to/ios-ffi", "destination": "/platform-integration/legacy-ffi-plugin", "type": 301 },
{ "source": "/to/ios-minimum-target", "destination": "/deployment/ios#review-xcode-project-settings", "type": 301 },
{ "source": "/to/to/java-gradle-incompatibility", "destination": "/release/breaking-changes/android-java-gradle-migration-guide", "type": 301 },
{ "source": "/to/java-gradle-incompatibility", "destination": "/release/breaking-changes/android-java-gradle-migration-guide", "type": 301 },
{ "source": "/to/linux-android-setup", "destination": "/platform-integration/android/setup", "type": 301 },
{ "source": "/to/macos-android-setup", "destination": "/platform-integration/android/setup", "type": 301 },
{ "source": "/to/macos-deploy", "destination": "/deployment/macos", "type": 301 },
{ "source": "/to/macos-entitlements", "destination": "/platform-integration/macos/building#entitlements-and-the-app-sandbox", "type": 301 },
{ "source": "/to/macos-ffi", "destination": "/platform-integration/macos/c-interop", "type": 301 },
{ "source": "/to/macos-ffi", "destination": "/platform-integration/legacy-ffi-plugin", "type": 301 },
{ "source": "/to/macos-ios-setup", "destination": "/platform-integration/ios/setup", "type": 301 },
{ "source": "/to/macos-minimum-target", "destination": "/deployment/ios#review-xcode-project-settings", "type": 301 },
{ "source": "/to/minimize-layout-passes", "destination": "/perf/best-practices#minimize-layout-passes-caused-by-intrinsic-operations", "type": 301 },
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -1026,8 +1026,6 @@ file, like any other Dart package.
[Effective Dart Documentation]: {{site.dart-site}}/guides/language/effective-dart/documentation
[federated plugins]: #federated-plugins
[ffigen docs]: {{site.pub-pkg}}/ffigen/install
[Android]: /platform-integration/android/c-interop
[macOS]: /platform-integration/macos/c-interop
[`fluro`]: {{site.pub}}/packages/fluro
[Flutter editor]: /tools/editors
[Flutter Favorites]: {{site.pub}}/flutter/favorites
Expand Down
210 changes: 0 additions & 210 deletions sites/docs/src/content/platform-integration/android/c-interop.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ or begin improving integration with Android.
<a class="text-button" href="/deployment/android">Build and deploy to Android</a>
</li>
<li>
<a class="text-button" href="/platform-integration/android/c-interop">Bind to native Android code</a>
<a class="text-button" href="/platform-integration/bind-native-code">Bind to native Android code</a>
</li>
<li>
<a class="text-button" href="/platform-integration/android/splash-screen">Add a splash screen</a>
Expand Down
14 changes: 14 additions & 0 deletions sites/docs/src/content/platform-integration/bind-native-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ If you need to use the Flutter Plugin API, or if you need to configure a Google
Play services runtime on Android, use the standard plugin template (`flutter create
--template=plugin`).

:::note
Looking for the previous FFI plugin workflow? See
[Bind to native code using the legacy FFI plugin template](/platform-integration/legacy-ffi-plugin),
which documents the `plugin_ffi` template and OS-specific build files.
:::

[build hooks]: https://dart.dev/tools/hooks
[dart:ffi]: {{site.dart.api}}/dart-ffi/dart-ffi-library.html
[FFI]: https://en.wikipedia.org/wiki/Foreign_function_interface
Expand Down Expand Up @@ -107,6 +113,14 @@ For many system libraries on Android, iOS, Linux, and macOS, you can use
For Windows, you often use `DynamicLoadingSystem()` and provide the name of the
DLL.

:::note
For desktop-specific guidance on calling system APIs&mdash;including wrapper
packages like [`package:win32`]({{site.pub-pkg}}/win32) and
[Canonical's Linux packages]({{site.pub}}/publishers/canonical.com/packages)&mdash;see
[Integrating with Windows](/platform-integration/windows/building#integrating-with-windows)
and [Integrate with Linux](/platform-integration/linux/building#integrate-with-linux).
:::

Here is an example `build.dart` that links against system libraries to get the
host name:

Expand Down
24 changes: 12 additions & 12 deletions sites/docs/src/content/platform-integration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ Learn how to add custom integrations with Android to your Flutter app.
<p>Learn how the latest Android APIs in your app from Dart.</p>
</div>
</a>
<a class="card outlined-card" href="/platform-integration/android/c-interop">
<a class="card outlined-card" href="/platform-integration/bind-native-code">
<div class="card-header">
<span class="card-title">Bind to native code</span>
</div>
<div class="card-content">
<p>Learn how to bind to native C code from your app on Android.</p>
<p>Learn how to bind to native code from your app on Android.</p>
</div>
</a>
<a class="card outlined-card" href="/platform-integration/android/platform-views">
Expand Down Expand Up @@ -188,6 +188,14 @@ Learn how to add custom integrations with iOS to your Flutter app.
<p>Learn about plugins that support functionality from native iOS frameworks.</p>
</div>
</a>
<a class="card outlined-card" href="/platform-integration/bind-native-code">
<div class="card-header">
<span class="card-title">Bind to native code</span>
</div>
<div class="card-content">
<p>Learn how to bind to native code from your app on iOS.</p>
</div>
</a>
<a class="card outlined-card" href="/platform-integration/ios/platform-views">
<div class="card-header">
<span class="card-title">Embed an iOS view</span>
Expand Down Expand Up @@ -228,14 +236,6 @@ web platform to your Flutter app.
<p>Customize how your Flutter app is initialized on the web.</p>
</div>
</a>
<a class="card outlined-card" href="/platform-integration/android/c-interop">
<div class="card-header">
<span class="card-title">Bind to native code</span>
</div>
<div class="card-content">
<p>Learn how to bind to native C code from your app on Android.</p>
</div>
</a>
<a class="card outlined-card" href="/platform-integration/web/web-content-in-flutter">
<div class="card-header">
<span class="card-title">Embed web content</span>
Expand Down Expand Up @@ -309,12 +309,12 @@ Learn how to add custom integrations with Windows to your Flutter app.
Learn how to add custom integrations with macOS to your Flutter app.

<div class="card-grid">
<a class="card outlined-card" href="/platform-integration/macos/c-interop">
<a class="card outlined-card" href="/platform-integration/bind-native-code">
<div class="card-header">
<span class="card-title">Bind to native code</span>
</div>
<div class="card-content">
<p>Learn how to bind to native C, Objective-C, and Swift code from your app.</p>
<p>Learn how to bind to native code from your app on macOS.</p>
</div>
</a>
<a class="card outlined-card" href="/platform-integration/macos/platform-views">
Expand Down
3 changes: 3 additions & 0 deletions sites/docs/src/content/platform-integration/ios/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,9 @@ or begin improving integration with iOS.
<li>
<a class="text-button" href="/deployment/ios">Build and deploy to iOS</a>
</li>
<li>
<a class="text-button" href="/platform-integration/bind-native-code">Bind to native iOS code</a>
</li>
<li>
<a class="text-button" href="/platform-integration/ios/apple-frameworks">Leverage system frameworks</a>
</li>
Expand Down
Loading
Loading