Map<String, dynamic> toMap() => { 'threshold': threshold, 'smoothRatio': smoothRatio, 'velocityRange': velocityRange, 'pressureRatio': pressureRatio, if (args != null) 'args': args, };