listenLocation method
set stream event callback, 设置StreamChannel的回调方法
onEvent
: 接收到StreamChannel发送来事件的处理方法, onError
:接收到StreamChannel发送来错误事件的处理方法
Implementation
static listenLocation(EventHandler onEvent, EventHandler onError) {
_stream.receiveBroadcastStream().listen(onEvent, onError: onError);
}