absOffsetOf method
Returns the absolute offset by a given normalized offset(0 ~ 1) and size.
Implementation
Offset absOffsetOf({
required Size size,
required Offset offset,
Offset spacing = Offset.zero
}) {
assert(offset.dx >= 0, "A given offset value must be between 0 and 1 or between.");
assert(offset.dx <= 1, "A given offset value must be between 0 and 1 or between.");
return Offset(
(constraint.left + (size.width - constraint.left - constraint.right) * offset.dx) + spacing.dx,
(constraint.top + (size.height - constraint.top - constraint.bottom) * offset.dy) + spacing.dy
);
}