@override Object toJson() { return { if (min.isNotDefault) 'min': encodeDouble(min), if (max.isNotDefault) 'max': encodeDouble(max), }; }