onShootingButtonMove method
Update the scale value while the user is shooting. 用户在录制时通过滑动更新缩放
Implementation
void onShootingButtonMove(
PointerMoveEvent event,
BoxConstraints constraints,
) {
lastShootingButtonPressedPosition ??= event.position;
if (controller.value.isRecordingVideo) {
// First calculate relative offset.
final Offset offset = event.position - lastShootingButtonPressedPosition!;
// Then turn negative,
// multiply double with 10 * 1.5 - 1 = 14,
// plus 1 to ensure always scale.
final double scale = offset.dy / constraints.maxHeight * -14 + 1;
zoom(scale);
}
}