eventListener method
void
eventListener(
- dynamic event
Handle video frame changes
Implementation
void eventListener(dynamic event) {
final Map<dynamic, dynamic> map = event;
switch (map['event']) {
case 'didTextureChangeRotation':
value = value.copyWith(rotation: map['rotation'], hasTexture: hasTexture);
onResize?.call();
break;
case 'didTextureChangeVideoSize':
value = value.copyWith(
width: 0.0 + map['width'],
height: 0.0 + map['height'],
hasTexture: hasTexture);
onResize?.call();
break;
}
}