listener static method
Implementation
static void listener(Function eventHandle, {Function? error}) {
_subscription = _eventChannel.receiveBroadcastStream().listen(eventHandle as void Function(dynamic)?,
onError: error ??
(Object error) {
print(error.toString());
});
}