buildTouchReader method
support touch event
Implementation
Widget buildTouchReader(child) {
return GestureDetector(
onVerticalDragEnd: handleDragEnd,
onTap: widget.onTap,
onTapDown: (event) {
disposeSelectLineDelay();
disposeFiling();
isDrag = true;
},
onTapUp: (event) {
isDrag = false;
resumeSelectLineOffset();
},
onVerticalDragStart: (event) {
disposeFiling();
disposeSelectLineDelay();
setSelectLine(true);
},
onVerticalDragUpdate: (event) =>
{lyricPaint.lyricOffset += event.primaryDelta ?? 0},
child: child,
);
}