flutter-building-plugins

Creates Flutter plugins bridging Dart code with platform-specific native APIs.

1|Updated Apr 30, 2026
One-click install
npx skills add https://github.com/Wishtohear/bucket-water-oms --skill flutter-building-plugins-wishtohear
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: flutter-building-plugins
Source: https://github.com/Wishtohear/bucket-water-oms/tree/main/bucket-water-oms-admin-mobile/skills/flutter-building-plugins
Command: npx skills add https://github.com/Wishtohear/bucket-water-oms --skill flutter-building-plugins-wishtohear

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building Flutter plugins that expose native platform functionality to Dart requires navigating federated plugin architecture, Method Channels, FFI templates, and platform-specific build systems, which is error-prone without a structured workflow. ## Core Features & Use Cases - Plugin Scaffolding: Initialize standard Method Channel plugins or FFI plugins with the correct flutter create template and platform flags. - Platform Implementation Workflows: Step-by-step guidance for Android (V2 embedding, FlutterPlugin, ActivityAware) and Windows (C++ via Visual Studio) platform code. - Federated Plugin Architecture: Split plugins into app-facing, platform interface, and platform implementation packages for independent team development. - Use Case: You need to expose a native Android SDK to your Flutter app. Follow the workflow to scaffold a standard plugin, implement FlutterPlugin with legacy registerWith compatibility, and validate it in Android Studio. ## Quick Start Create a new Flutter plugin named battery_info that supports Android and iOS and implements the Android platform code using the V2 embedding.

Frequently Asked Questions about flutter-building-plugins

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Flutter plugin for Android and iOS?▼

Run flutter create with --template=plugin, specify platforms with --platforms=android,ios, set your organization with --org, and choose languages via -i and -a flags. This generates the plugin structure with Dart API code and platform-specific source directories.

What is the difference between Flutter FFI plugins and standard plugins?▼

Standard plugins use Method Channels to call platform APIs like the Android SDK, while FFI plugins use dart:ffi to call C/C++ native libraries directly. FFI plugins cannot contain Method Channels themselves, so use the standard template if you need both.

How do I implement FlutterPlugin with Android V2 embedding?▼

Implement the FlutterPlugin interface with a public constructor, set up your MethodChannel in onAttachedToEngine, and extract shared logic into a private method also called by the legacy registerWith method. Implement ActivityAware if your plugin needs an Activity reference.

Can I add new platforms to an existing Flutter plugin?▼

Yes. Run flutter create --template=plugin --platforms=<new-platforms> from the plugin root directory to generate the new platform scaffolding. For iOS or macOS, also update the generated .podspec file with dependencies and deployment targets.

Why are my Flutter plugin changes not reflected on Windows?▼

Windows plugin C++ code must be rebuilt in Visual Studio before running the app, otherwise the outdated plugin binary is used. Open the generated solution in example/build/windows and rebuild after every change.