Commit e5db8555 by Zac Chan

Added cancel toast on tap

parent 7e4ef594
......@@ -106,7 +106,9 @@ public class FluttertoastPlugin implements MethodCallHandler {
public boolean onTouch(View v, MotionEvent event) {
handler.removeCallbacks(run);
toastView.setOnTouchListener(null);
toast.cancel();
try {
result.success(true);
} catch (Exception e){
......@@ -122,7 +124,7 @@ public class FluttertoastPlugin implements MethodCallHandler {
}
toast.show();
handler.postDelayed(run,4000);
handler.postDelayed(run,toast.getDuration()*1000);
} else {
result.notImplemented();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment