How to detect direction for flick gesture

How to detect direction for flick gesture