flutter-building-plugins
Originally fromflutter/skills
Installation
SKILL.md
Developing Flutter Plugins
Contents
- Architecture & Design Patterns
- Workflow: Creating a New Plugin
- Workflow: Implementing Android Platform Code
- Workflow: Implementing Windows Platform Code
- Workflow: Adding Platforms to an Existing Plugin
- Examples
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:
- App-facing interface: The primary package users depend on. It exports the public API.
- Platform interface: The package defining the common interface that all platform implementations must implement.
- Platform implementations: Independent packages containing platform-specific code (e.g.,
my_plugin_android,my_plugin_windows).