engine static method
Creating an RtcEngineKit
object.
Parameter config
RtcEngineConfig object.
Returns
RtcEngineKit
object.
Note If the object creation fails, an null object is returned.
创建一个 RtcEngineKit
对象。
Parameter config
RtcEngineConfig 对象.
Returns
RtcEngineKit
对象
Note 如果对象创建失败,将返回空对象。
Implementation
static Future<RtcEngineKit?> engine(RtcEngineConfig config) async {
if (_engine != null) return _engine;
await _methodChannel.invokeMethod('create', {'config': config.toJson()});
_engine = RtcEngineKit._();
await _engine!.setParameters(jsonEncode({
'pano_sdk': {'sdk_type': 'flutter', 'dart': Platform.version}
}));
return _engine;
}