@override Map<String, Object?> toJson() => { "min": encodeValue(min), if (max != null) "max": encodeValue(max), };