subtract method
Returns the difference between this and other, using width and height:
the minimum of width - other.width and height - other.height.
maximumDifferences (positional) If true returns the maximum of the
two differences, instead of the minimum (the default).
Implementation
int subtract(Dimension other, [bool maximumDifferences = false]) {
var dw = width - other.width;
var dh = height - other.height;
var d = maximumDifferences ? Math.max(dw, dh) : Math.min(dw, dh);
return d;
}