mcpField
F
flutter-platform-integration

flutter-platform-integration

github.com/thienqoDevelopment1577 installsUpdated today
Repository

About flutter-platform-integration

A skill guide for Flutter developers choosing how Dart code should integrate with native platforms. It favors suitable maintained plugins and narrowly scoped changes when a specific capability is missing.

Key features

  1. 01Assess whether an existing plugin fits
  2. 02Choose channels, Pigeon, FFI, or platform views
  3. 03Handle lifecycle, permissions, and platform differences
  4. 04Verify error mapping and native implementations

Use cases

  1. 01Plan a minimal integration for a missing native capability
  2. 02Design a typed, multi-method platform channel
  3. 03Investigate integration issues across app lifecycle changes

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/thienqo/flutter-skills --skill flutter-platform-integration

After installing, type/flutter-platform-integrationin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

evals/
cases.json
references/
integration-strategy.md
plugin-development.md

Details

From the project README

Flutter Platform Integration

Prefer an existing maintained plugin when it meets the requirement. Write platform code when the capability is unavailable, product-specific, or requires a controlled native contract.

When asked to replace an adequate plugin the project already uses with custom native code, do not write the native code yet. Name what the current plugin already covers, ask which concrete requirement it fails (missing API, platform, behavior, license, or size), and recommend keeping it until that gap is known. When the gap is real, close it with the smallest change: a Dart wrapper, an upstream fix, or a narrow channel for the missing part only.

Choose the boundary

  • Use a package API for established cross-platform capabilities.
  • Use Pigeon or another typed generated contract when a multi-method channel benefits from compile-time structure.
  • Use a basic method/event channel for small, stable request/response or event surfaces.
  • Use FFI for suitable native C-compatible libraries and performance-sensitive calls.
  • Use platform views only when native view embedding is required and account for composition, gestures, accessibility, and performance.

Keep domain models outside the channel contract. Version or evolve messages compatibly, validate all values at the boundary, and map platform failures into actionable Dart errors.

Load references conditionally

  • Read integration strategy when choosing among an existing package, channels or Pigeon, FFI, JS interop, and platform views.
  • Read plugin development when creating or evolving a reusable plugin package, federated implementation, platform interface, or multi-platform native API.

flutter-package-development owns reusable public APIs, package shape, compatibility, federation decisions, consumer quality, and publication readiness. Use both skills when package design and native implementation are material.

Lifecycle and platforms

Handle engine/activity/view-controller attachment, background/foreground changes, permission flow, cancellation, and multiple engine instances where applicable. Provide an explicit unsupported-platform behavior rather than a late missing-plugin crash.

Verification

Test the Dart adapter with fakes and the native implementation on every supported target. Verify error mapping, lifecycle reattachment, permissions, background behavior, and accessibility for embedded views.

Sources

Comments

Markdown supported