手势检测器在三指滑动时抛出异常

时间:2019-03-06 12:15:21

标签: flutter

我使用的mi设备的设置是在用三根手指滑动时拍摄屏幕截图。 因此,在我的应用程序中,当我用三根手指滑动屏幕上的Draggable按钮时,mi接管手势并截取屏幕截图,并且我的应用程序抛出异常,导致按钮卡在UI中。

那么关于如何处理异常的任何想法?

异常日志:

D/ViewRootImpl( 8546): cancle motionEvent because of threeGesture detecting
D/ViewRootImpl( 8546): cancle motionEvent because of threeGesture detecting
D/ViewRootImpl( 8546): cancle motionEvent because of threeGesture detecting
E/flutter ( 8546): [ERROR:flutter/shell/common/shell.cc(184)] Dart Error: Unhandled exception:
E/flutter ( 8546): 'package:flutter/src/gestures/converter.dart': Failed assertion: line 250 pos 18: 'state.down': is not true.
E/flutter ( 8546): #0 _AssertionError._doThrowNew (dart:core/runtime/liberrors_patch.dart:40:39)
E/flutter ( 8546): #1 _AssertionError._throwNew (dart:core/runtime/liberrors_patch.dart:36:5)
E/flutter ( 8546): #2 PointerEventConverter.expand (package:flutter/src/gestures/converter.dart:250:18)
E/flutter ( 8546): #3 _SyncIterator.moveNext (dart:core/runtime/libcore_patch.dart:151:12)
E/flutter ( 8546): #4 ListQueue.addAll (dart:collection/queue.dart:715:25)
E/flutter ( 8546): #5 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:83:27)
E/flutter ( 8546): #6 _invoke1 (dart:ui/hooks.dart:168:13)
E/flutter ( 8546): #7 _dispatchPointerDataPacket (dart:ui/hooks.dart:122:5)
D/ViewRootImpl( 8546): cancle motionEvent because of threeGesture detecting
I/chatty ( 8546): uid=10232(org.chimple.jamaica) identical 7 lines
D/ViewRootImpl( 8546): cancle motionEvent because of threeGesture detecting

0 个答案:

没有答案