@override Object toJson() => { if (mode.isNotDefault) 'mode': mode.toJson(), if (dynamicThreshold != null) 'dynamicThreshold': encodeDouble(dynamicThreshold), };