Posts

Showing posts with the label platform channels in flutter

Native Platform Support using Platform Channels

Image
  So, How does native platform support be done by using Platform channels? We will read about it in this blog. Basically,  Flutter  has its own supple system that allows users to call platform-specific APIs which might be in Java code on Android, or in Kotlin or in Swift or Objective-C code on iOS. Dart code has no direct access to the platform-specific APIs of the Android SDK and iOS Cocoa Touch. What are Platform Channels? Platform channels are a simple mechanism that provides communication between the Dart code and the platform-specific code of a host app. This means you can show a platform service in your host app code and have it invoked from the Dart end. Or vice versa. It will be possible with plugins to create a Dart API backed by an iOS implementation which is written in Objective-C or Swift and an Android implementation which is written in Java or Kotlin and then it will be packaged up as a Flutter or Android or iOS triple stick together using platform channels....