📱 Flutter
Advanced
What is EventChannel in Flutter?
Answer
EventChannel is used for continuous, streaming communication from native platform code to Dart — unlike MethodChannel which is a one-shot request/response. The native side uses a StreamHandler to push events (sensor readings, Bluetooth states, connectivity changes) into an event sink. On the Dart side, you listen to the channel as a Stream: EventChannel("my_channel").receiveBroadcastStream().listen((event) { ... }). EventChannel is the correct choice for any native data that updates continuously over time.
Previous
What is the difference between debug, profile, and release build modes in Flutter?
Next
What is build_runner in Flutter?