onDragUpdate method
- BuildContext context,
- DragUpdateDetails update
Implementation
void onDragUpdate(BuildContext context, DragUpdateDetails update) {
RenderBox getBox = context.findRenderObject() as RenderBox;
var local = getBox.globalToLocal(update.globalPosition);
double newChange = (mTouchStart - local.dx);
int newOffset = trap(state.mOffset + (newChange / (state.gridPreMin * 5)).truncate());
emit(state.copyWith(mOffset: newOffset));
}