initialize method
Implementation
Future<void> initialize({
required SubscriptionHandler onNewSubscriptionHandler,
}) {
_onNewSubscriptionHandler = onNewSubscriptionHandler;
CommonChannel.setMethodCallHandler(_handleChannelMethodCallback);
return CommonChannel.invokeMethod<void>(
method: ChannelMethod.initialize,
arguments: options
).catchError(
(error) {
if (error is! TimeoutException) throw error;
},
);
}