IgnorePointer设置为不响应事件时(即ignoring = true),IgnorePointer的child不响应事件,但是事件会传递到下一层;
而 AbsorbPointer 设为不响应事件时(即absorbing = true),事件不会透传到下一层
AbsorbPointer
AbsorbPointer(
absorbing: false,
child: RaisedButton(
child: Text("button01"),
onPressed: () {
print("onclick");
}),
);
关键属性absorbing,默认值true,表示不响应事件,为false时,响应事件
IgnorePointer
IgnorePointer({
Key? key,
this.ignoring = true,
this.ignoringSemantics,
Widget? child,
})
关键属性ignoring,默认值true,表示不响应事件,为false时,响应事件