We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class RenderPointerDownListener extends RenderProxyBox { PointerDownEventListener? onPointerDown;
@OverRide bool hitTestSelf(Offset position) => true; //始终通过命中测试
@OverRide void handleEvent(PointerEvent event, covariant HitTestEntry entry) { //事件分发时处理事件 if (event is PointerDownEvent) onPointerDown?.call(event); } }
class PointerDownListenerRoute extends StatelessWidget { const PointerDownListenerRoute({Key? key}) : super(key: key);
@OverRide Widget build(BuildContext context) { return PointerDownListener( child: const Text('Click me'), onPointerDown: (e) => print('down'), ); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
class RenderPointerDownListener extends RenderProxyBox {
PointerDownEventListener? onPointerDown;
@OverRide
bool hitTestSelf(Offset position) => true; //始终通过命中测试
@OverRide
void handleEvent(PointerEvent event, covariant HitTestEntry entry) {
//事件分发时处理事件
if (event is PointerDownEvent) onPointerDown?.call(event);
}
}
class PointerDownListenerRoute extends StatelessWidget {
const PointerDownListenerRoute({Key? key}) : super(key: key);
@OverRide
Widget build(BuildContext context) {
return PointerDownListener(
child: const Text('Click me'),
onPointerDown: (e) => print('down'),
);
}
}
The text was updated successfully, but these errors were encountered: