fix deprecated method of GestureDetector class.