defaultCallbackDispatcher method

void defaultCallbackDispatcher (EchoCallbackFunction echoFunction)

A helper function so you only need to implement a EchoCallbackFunction

Implementation

static void defaultCallbackDispatcher(
    final EchoCallbackFunction echoFunction) {
  WidgetsFlutterBinding.ensureInitialized();
  _backgroundChannel
      .setMethodCallHandler((call) async => echoFunction(call.arguments));
  _backgroundChannel.invokeMethod("backgroundChannelInitialized");
}