automaticValuePosition method
Implementation
@override
ValuePosition automaticValuePosition(
PdfPoint point,
PdfPoint size,
PdfPoint? previous,
PdfPoint? next,
) {
if (point.y - size.y - delta < box!.bottom) {
return ValuePosition.top;
}
if (previous != null &&
previous.y > point.y &&
next != null &&
next.y > point.y) {
return ValuePosition.bottom;
}
if (previous != null &&
previous.y < point.y &&
next != null &&
next.y > point.y) {
return ValuePosition.left;
}
if (previous != null &&
previous.y > point.y &&
next != null &&
next.y < point.y) {
return ValuePosition.right;
}
return super.automaticValuePosition(point, size, previous, next);
}