touchY method
- int index
Returns the y coordinate of the finger on a touch screen device.
The index is the order of the touches that have been made. The first finger that touches the screen will be assigned index 0. The next finger will be assigned 1 and so on.
Implementation
double touchY(int index) {
if (index == 0 && _touchState.isEmpty) {
return y;
}
if (index < 0 || index >= _touchState.length) {
return 0;
}
return _touchState[index].y;
}