onHalfEnd method
void
onHalfEnd()
Implementation
void onHalfEnd() {
showHalf = false;
if (xPosition < ScreenUtil().screenWidth / 2 - ScreenUtil().setWidth(40)) {
xPosition = ScreenUtil().setWidth(12);
if (widget.half && widget.width != 0) {
onHalf(true);
}
} else {
xPosition = x;
if (widget.half && widget.width != 0) {
onHalf(false);
}
}
if (!mounted) return;
setState(() {});
}