DomainA11yExploreBehavior<D> constructor
DomainA11yExploreBehavior<D> ({
- VocalizationCallback? vocalizationCallback,
- ExploreModeTrigger? exploreModeTrigger,
- double? minimumWidth,
- String? exploreModeEnabledAnnouncement,
- String? exploreModeDisabledAnnouncement,
Implementation
factory DomainA11yExploreBehavior({
common.VocalizationCallback? vocalizationCallback,
common.ExploreModeTrigger? exploreModeTrigger,
double? minimumWidth,
String? exploreModeEnabledAnnouncement,
String? exploreModeDisabledAnnouncement,
}) {
final desiredGestures = new Set<GestureType>();
exploreModeTrigger ??= common.ExploreModeTrigger.pressHold;
switch (exploreModeTrigger) {
case common.ExploreModeTrigger.pressHold:
desiredGestures..add(GestureType.onLongPress);
break;
case common.ExploreModeTrigger.tap:
desiredGestures..add(GestureType.onTap);
break;
}
return new DomainA11yExploreBehavior._internal(
vocalizationCallback: vocalizationCallback,
desiredGestures: desiredGestures,
exploreModeTrigger: exploreModeTrigger,
minimumWidth: minimumWidth,
exploreModeEnabledAnnouncement: exploreModeEnabledAnnouncement,
exploreModeDisabledAnnouncement: exploreModeDisabledAnnouncement,
);
}