pause method

bool pause()

暂停消息流监听 Pause message flow listening

Implementation

bool pause() {
  assert(_channel != null, 'You must call setMethodChannel() first');
  if (!_supportPlatform || _channel == null) return false;
  if (_streamSubscription != null && !_streamSubscription!.isPaused) {
    _streamSubscription!.pause();
    return true;
  }
  return false;
}