Setter to reset the Gradient instance
set gradient(Gradient? gradient) { _gradient = gradient; _size = null; }