sendEvent method Null safety

Future<bool> sendEvent(
  1. dynamic arguments
)

调用原生方法 发送消息 Call native methods to send messages

Implementation

Future<bool> sendEvent(dynamic arguments) async {
  assert(_channel != null, 'You must call setMethodChannel() first');
  if (!_supportPlatform ||
      _eventChannel == null ||
      _streamSubscription == null ||
      _channel == null ||
      _streamSubscription!.isPaused) return false;
  final bool? state =
      await _channel!.invokeMethod<bool?>('sendEvent', arguments);
  return state ?? false;
}