DomainA11yExploreBehavior<D> constructor

DomainA11yExploreBehavior<D>({
  1. VocalizationCallback? vocalizationCallback,
  2. ExploreModeTrigger? exploreModeTrigger,
  3. double? minimumWidth,
  4. String? exploreModeEnabledAnnouncement,
  5. 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,
  );
}