eventListener method

void eventListener(
  1. dynamic event
)

Implementation

void eventListener(dynamic event) {
  final Map<dynamic, dynamic> map = event;
  switch (map['event']) {
    case 'didTextureChangeRotation':
      value =
          value.copyWith(rotation: map['rotation'], renderVideo: renderVideo);
      onResize?.call();
      break;
    case 'didTextureChangeVideoSize':
      value = value.copyWith(
          width: 0.0 + map['width'],
          height: 0.0 + map['height'],
          renderVideo: renderVideo);
      onResize?.call();
      break;
    case 'didFirstFrameRendered':
      value = value.copyWith(renderVideo: renderVideo);
      break;
  }
}