flutter-interoperating-with-native-apis

Originally fromflutter/skills
Installation
SKILL.md

Integrating Platform-Specific Code in Flutter

Contents

Core Concepts & Terminology

  • FFI (Foreign Function Interface): The dart:ffi library used to bind Dart directly to native C/C++ APIs.
  • Platform Channel: The asynchronous message-passing system (MethodChannel, BasicMessageChannel) connecting the Dart client (UI) to the host platform (Kotlin/Java, Swift/Objective-C, C++).
  • Pigeon: A code-generation tool that creates type-safe Platform Channels.
  • Platform View: A mechanism to embed native UI components (e.g., Android View, iOS UIView) directly into the Flutter widget tree.
  • JS Interop: The modern, Wasm-compatible approach to interacting with JavaScript and DOM APIs using package:web and dart:js_interop.

Binding to Native C/C++ Code (FFI)

Use FFI to execute high-performance native code or utilize existing C/C++ libraries without the overhead of asynchronous Platform Channels.

Installs
20
First Seen
Apr 27, 2026
flutter-interoperating-with-native-apis — gsmlg-dev/code-agent