sharedInstance static method

Future<TRTCCloud?> sharedInstance()

Create a TRTCCloud singleton for room entry, preview, push stream, pull stream, etc.

Implementation

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