NERtcVideoView.withInternalRenderer constructor

const NERtcVideoView.withInternalRenderer({
  1. Key? key,
  2. int? uid,
  3. bool subStream = false,
  4. ValueListenable<bool>? mirrorListenable,
  5. NERtcVideoRendererEventListener? rendererEventLister,
  6. NERtcVideoViewFitType fitType = NERtcVideoViewFitType.cover,
  7. WidgetBuilder? placeholderBuilder,
  8. Color backgroundColor = const Color(0xFF292933),
})

创建用户视频渲染组件。

在该模式下渲染所需的画布对象不需要外部传入,组件内部在使用时会自动创建,不再使用时会自动销毁,不会造成内存泄漏。 推荐使用该模式创建视频渲染组件。

Implementation

const NERtcVideoView.withInternalRenderer({
  Key? key,
  this.uid,
  this.subStream = false,
  this.mirrorListenable,
  this.rendererEventLister,
  this.fitType = NERtcVideoViewFitType.cover,
  this.placeholderBuilder,
  this.backgroundColor = const Color(0xFF292933),
})  : renderer = null,
      autoAttach = true,
      super(key: key);