Community코딩 & 개발github.com

flutter/flutter-building-plugins

Flutter 플러그인을 빌드하여 다른 앱이 네이티브 상호 운용성을 사용할 수 있도록 합니다. Flutter와 플랫폼별 기능을 연결하는 재사용 가능한 패키지를 만들 때 사용하세요.

flutter-building-plugins란 무엇인가요?

이 스킬은 Flutter 플러그인을 개발하여 Flutter 앱과 네이티브 플랫폼(Android, iOS 등) 코드 간의 브리지 역할을 수행합니다. 플러그인은 MethodChannel, EventChannel, BasicMessageChannel과 같은 Flutter의 플랫폼 채널 메커니즘을 사용하여 네이티브 기능을 Dart 코드에 노출시킵니다. 이 스킬은 플러그인 프로젝트 생성, 네이티브 코드 작성, 채널 통신 설정 및 패키지 배포 전반을 지원합니다. 개발자는 이 스킬을 통해 기존 네이티브 라이브러리를 래핑하거나 Flutter에서 접근할 수 없는 플랫폼별 API(예: 블루투스, 센서, 파일 시스템)를 사용할 수 있는 재사용 가능한 패키지를 만들 수 있습니다. 주로 flutter create --template=plugin 또는 mason을 통한 템플릿 기반 프로젝트 구조를 가정하며, Android(Kotlin/Java)와 iOS(Swift/Objective-C) 네이티브 코드를 포함합니다. 이 스킬은 플러그인 아키텍처 이해, 채널 통신 패턴, 네이티브 코드 통합, 테스트 및 게시 방법을 포괄적으로 설명합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/flutter/skills/tree/main/skills/flutter-building-plugins

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

flutter-building-plugins은(는) 무엇을 하나요?

다른 앱이 네이티브 상호 운용성을 사용할 수 있도록 Flutter 플러그인을 빌드합니다. Flutter와 플랫폼별 기능을 연결하는 재사용 가능한 패키지를 만들 때 사용하세요.

플러그인 생성

flutter create --template=plugin --platforms=android,ios <plugin_name>

주요 구성 요소

  • MethodChannel: Dart에서 네이티브 메서드 호출 및 결과 반환
  • EventChannel: 네이티브에서 Dart로 이벤트 스트리밍
  • BasicMessageChannel: 양방향 문자열/이진 메시지 전송

플러그인 구조

<plugin_name>/
  lib/
    <plugin_name>.dart
  android/
    src/main/kotlin/
      <plugin_name>.kt
  ios/
    Classes/
      <plugin_name>.swift

채널 통신 예제

Dart 측

static const _channel = MethodChannel('com.example/plugin');

static Future<String?> getPlatformVersion() async {
  return await _channel.invokeMethod('getPlatformVersion');
}

Android 측 (Kotlin)

class MyPlugin: FlutterPlugin, MethodCallHandler {
  override fun onMethodCall(call: MethodCall, result: Result) {
    if (call.method == "getPlatformVersion") {
      result.success("Android ${Build.VERSION.RELEASE}")
    } else {
      result.notImplemented()
    }
  }
}

iOS 측 (Swift)

class MyPlugin: NSObject, FlutterPlugin {
  func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
    if call.method == "getPlatformVersion" {
      result("iOS \(UIDevice.current.systemVersion)")
    } else {
      result(FlutterMethodNotImplemented)
    }
  }
}

게시

flutter pub publish

자세한 내용은 Flutter 플러그인 개발 문서를 참조하세요.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

flutter/flutter-accessibility

Configure your Flutter app to support assistive technologies like Screen Readers

flutter/flutter-accessibility-audit

Triggers an accessibility scan through the widget_inspector and automatically adds Semantics widgets or missing labels to the source code.

flutter/flutter-adding-home-screen-widgets

Adds home screen widgets to a Flutter app for Android and iOS. Use when providing glanceable app information or quick actions on the device home screen.

flutter/flutter-add-integration-test

Configures Flutter Driver for app interaction and converts MCP actions into permanent integration tests. Use when adding integration testing to a project, exploring UI components via MCP, or automating user flows with the integration_test package.

flutter/flutter-add-widget-preview

Adds interactive widget previews to the project using the previews.dart system. Use when creating new UI components or updating existing screens to ensure consistent design and interactive testing.

flutter/flutter-add-widget-test

Implement a component-level test using `WidgetTester` to verify UI rendering and user interactions (tapping, scrolling, entering text). Use when validating that a specific widget displays correct data and responds to events as expected.

flutter/flutter-animating-apps

Implements animated effects, transitions, and motion in a Flutter app. Use when adding visual feedback, shared element transitions, or physics-based animations.

flutter/flutter-animation

Add animated effects to your Flutter app

flutter/flutter-apply-architecture-best-practices

Architects a Flutter application using the recommended layered approach (UI, Logic, Data). Use when structuring a new project or refactoring for scalability.

flutter/flutter-app-size

Measure and reduce the size of the Flutter app bundle, APK, or IPA

flutter/flutter-architecting-apps

Architects a Flutter application using the recommended layered approach (UI, Logic, Data). Use when structuring a new project or refactoring for scalability.

flutter/flutter-architecture

Use the Flutter team's recommended app architecture

flutter/flutter-building-forms

Builds Flutter forms with validation and user input handling. Use when creating login screens, data entry forms, or any multi-field user input.

flutter/flutter-building-layouts

Builds Flutter layouts using the constraint system and layout widgets. Use when creating or refining the UI structure of a Flutter application.

flutter/flutter-build-responsive-layout

Use `LayoutBuilder`, `MediaQuery`, or `Expanded/Flexible` to create a layout that adapts to different screen sizes. Use when you need the UI to look good on both mobile and tablet/desktop form factors.

flutter/flutter-caching

Cache data in a Flutter app

flutter/flutter-caching-data

Implements caching strategies for Flutter apps to improve performance and offline support. Use when retaining app data locally to reduce network requests or speed up startup.

flutter/flutter-concurrency

Execute long-running tasks in a background thread in Flutter

flutter/flutter-databases

Work with databases in a Flutter app

flutter/flutter-embedding-native-views

Embeds native Android, iOS, or macOS views into a Flutter app. Use when integrating complex native components like maps or web views.

관련 스킬