Back to Flutter Boost

sendEventToNative method

doc/api/boost_channel/BoostChannel/sendEventToNative.html

5.0.2560 B
Original Source

sendEventToNative method

voidsendEventToNative(

  1. String key,
  2. Map args

)

Send a custom event to native with key and args Calls when flutter(here) wants to send event to native side

Implementation

void sendEventToNative(String key, Map args) {
  assert(key != null);

  args ??= {};

  var params = CommonParams()
    ..key = key
    ..arguments = args;
  _appState.nativeRouterApi.sendEventToNative(params);
}