sharedInstance static method

Future<TRTCCloud?> sharedInstance()

创建一个 TRTCCloud 单例,用于实现进房、预览、推流、拉流等功能

Implementation

static Future<TRTCCloud?> sharedInstance() async {
  if (_trtcCloud == null) {
    _trtcCloud = new TRTCCloud();
    await _cloudChannel.invokeMethod('sharedInstance');
  }
  return _trtcCloud;
}