flutter-building-plugins

Installation
Summary

Scaffold and implement cross-platform Flutter plugins with native interop for Android, iOS, Windows, and web.

  • Supports both standard plugins (Method Channels for platform APIs) and FFI plugins (C/C++ native libraries); choose based on whether you need platform-specific SDK access or direct native code binding
  • Federated plugin architecture splits API across app-facing, platform interface, and independent platform implementation packages for team-based development
  • Includes step-by-step workflows for Android V2 embedding with lifecycle awareness, Windows C++ implementation via Visual Studio, and retrofitting existing plugins with new platforms
  • Provides code examples for Android plugin structure, Gradle setup, and legacy compatibility patterns
SKILL.md

Developing Flutter Plugins

Contents

Architecture & Design Patterns

Federated Plugins

Implement federated plugins to split a plugin's API across multiple packages, allowing independent teams to build platform-specific implementations. Structure federated plugins into three distinct components:

  1. App-facing interface: The primary package users depend on. It exports the public API.
  2. Platform interface: The package defining the common interface that all platform implementations must implement.
  3. Platform implementations: Independent packages containing platform-specific code (e.g., my_plugin_android, my_plugin_windows).

FFI vs. Standard Plugins

Choose the correct plugin template based on your native interoperability requirements:

Related skills
Installs
8.2K
Repository
flutter/skills
GitHub Stars
1.9K
First Seen
Mar 13, 2026