setInvocationHandler method
Installs the callback the native side routes invocations to.
background selects the isolate this binds to. The headless engine has
its own binary messenger, so it needs its own channel — a channel created
in one isolate is invisible to the other.
Implementation
@override
void setInvocationHandler(
IntentInvocationHandler handler, {
bool background = false,
}) {
if (background) {
_backgroundInvocations = handler;
} else {
_invocations = handler;
}
}