flutter-plugins
Installation
SKILL.md
flutter-plugin-generator
Goal
Scaffolds and configures Flutter plugin packages, handling standard method channels, FFI integrations, and federated plugin architectures. It configures platform-specific native code environments, implements Android v2 embedding lifecycle interfaces, and establishes platform interface packages.
Decision Logic
Use the following decision tree to determine the plugin architecture and template:
- Does the plugin require C/C++ native code via
dart:ffi?- Yes: Use
--template=plugin_ffi.- Note: FFI plugins support bundling native code and method channel registration, but not method channels themselves.
- No: Proceed to step 2.
- Yes: Use
- Does the plugin require BOTH
dart:ffiand Method Channels?- Yes: Use
--template=plugin(Non-FFI). You must configure FFI manually within the standard plugin structure. - No: Proceed to step 3.
- Yes: Use
- Will the plugin be developed by multiple teams or require highly decoupled platform implementations?
- Yes: Implement a Package-Separated Federated Plugin (App-facing package, Platform Interface package, Platform Implementation packages).
- No: Implement a standard monolithic plugin.