byOrientation method
Returns a Size with the width and height swapped for Orientation
Implementation
Size byOrientation(Orientation? orientation) {
if (orientation == null) return this;
switch (orientation) {
case Orientation.portrait:
return Size(shortestSide, longestSide);
case Orientation.landscape:
return Size(longestSide, shortestSide);
}
}