applyPaddingInOffset method
Implementation
Offset applyPaddingInOffset(Offset offset) {
Offset newOffset = offset.copyWith();
if (paddingTop != null) {
newOffset = newOffset.copyWith(dy: newOffset.dy + paddingTop!);
}
if (paddingBottom != null) {
newOffset = newOffset.copyWith(dy: newOffset.dy - paddingBottom!);
}
if (paddingLeft != null) {
newOffset = newOffset.copyWith(dx: newOffset.dx + paddingLeft!);
}
if (paddingRight != null) {
newOffset = newOffset.copyWith(dx: newOffset.dx - paddingRight!);
}
return newOffset;
}