onLink method
Configures onLink listeners: it has two methods for success and failure.
Implementation
void onLink({
OnLinkSuccessCallback onSuccess,
OnLinkErrorCallback onError,
}) {
_onLinkSuccess = onSuccess;
_onLinkError = onError;
channel.setMethodCallHandler(_handleMethod);
}