简体   繁体   中英

Flutter. How to disable "Double tap to activate, double tap and hold to long press" hint in accessibility mode

Currently, I'm working with Accessibility in Flutter and on android devices it's pronouncing this hint: "double tap to activate, double tap and hold to long press" . As far as I know this hint pronounced if widget is clickable, so I tried wrapping child of this widget with BlockSemantics (didn't work), also wrapped this clickable widget with Semantics and set property button: false but that also didn't help. This how my widget looks.

  return GestureDetector(
        behavior: HitTestBehavior.opaque,
        onTap: () => widget.onItemSelect(),
        onLongPress: () => widget.onItemLongPress(),
        child: childWidget,
       );

How can I disable this?

GestureDetector has a excludeSemantics property, so I set it to true . It will NOT block child widget's semantics, it will just disable semantics for GestureDetector widget itself, and as a result Android accessibility hint also turn off

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM