unwrap method
Returns the relative offset given a cross position, main position, and size.
Implementation
SliverOffset unwrap(double cross, double main, Size size) {
switch (axis) {
case Axis.horizontal:
if (growsReverse) {
main = size.width - main;
}
return SliverOffset(main, cross, cross, main);
case Axis.vertical:
if (growsReverse) {
main = size.height - main;
}
return SliverOffset(cross, main, cross, main);
}
}