3종류에 대한 기능을 간략히 볼 수 있는 예시자료

Working with native elements in Flutter: Platform Channel vs Pigeon vs Foreign Function Interface (FFI) | Codemagic Blog

Method Channel이란?

Writing custom platform-specific code

플러터에서 사용할 수 있는 메서드 채널 언어는 다음과 같다.

일반적으로 메서드 채널은 다음과 같이 채널을 개통하면서 시작한다.

static const _methodChannel =
      MethodChannel("com.example.text_editors/action");

//구현부
const MethodChannel(this.name, [this.codec = const StandardMethodCodec(), BinaryMessenger? binaryMessenger ])
      : _binaryMessenger = binaryMessenger;

메서드 채널 객체는 3가지 파라미터를 가진다.