Platform channels คือกลไกของ Flutter สำหรับการสื่อสารระหว่าง โค้ด Dart และโค้ดเนทีฟของแพลตฟอร์ม (iOS/Android) — ช่วยให้ Flutter เข้าถึงฟีเจอร์เนทีฟหรือโค้ดเนทีฟที่มีอยู่ซึ่งไม่สามารถใช้งานผ่าน Dart packages พวกมันเชื่อม Flutter เข้ากับแพลตฟอร์มที่อยู่เบื้องล่าง
ทำไม platform channels จึงมีอยู่
Flutter (Dart) can't directly access every native platform feature. Platform channels
let Dart call NATIVE code (Kotlin/Java on Android, Swift/Objective-C on iOS):
→ access native APIs/SDKs not covered by existing plugins
→ use existing native libraries or platform-specific functionality
→ integrate with native code in a hybrid app
→ The bridge between Flutter and the native platform.
