SemanticsProperties constructor

const SemanticsProperties({
  1. bool? enabled,
  2. bool? checked,
  3. bool? mixed,
  4. bool? expanded,
  5. bool? selected,
  6. bool? toggled,
  7. bool? button,
  8. bool? link,
  9. bool? header,
  10. int? headingLevel,
  11. bool? textField,
  12. bool? slider,
  13. bool? keyboardKey,
  14. bool? readOnly,
  15. bool? focusable,
  16. bool? focused,
  17. bool? inMutuallyExclusiveGroup,
  18. bool? hidden,
  19. bool? obscured,
  20. bool? multiline,
  21. bool? scopesRoute,
  22. bool? namesRoute,
  23. bool? image,
  24. bool? liveRegion,
  25. int? maxValueLength,
  26. int? currentValueLength,
  27. String? identifier,
  28. String? label,
  29. AttributedString? attributedLabel,
  30. String? value,
  31. AttributedString? attributedValue,
  32. String? increasedValue,
  33. AttributedString? attributedIncreasedValue,
  34. String? decreasedValue,
  35. AttributedString? attributedDecreasedValue,
  36. String? hint,
  37. String? tooltip,
  38. AttributedString? attributedHint,
  39. SemanticsHintOverrides? hintOverrides,
  40. TextDirection? textDirection,
  41. SemanticsSortKey? sortKey,
  42. SemanticsTag? tagForChildren,
  43. VoidCallback? onTap,
  44. VoidCallback? onLongPress,
  45. VoidCallback? onScrollLeft,
  46. VoidCallback? onScrollRight,
  47. VoidCallback? onScrollUp,
  48. VoidCallback? onScrollDown,
  49. VoidCallback? onIncrease,
  50. VoidCallback? onDecrease,
  51. VoidCallback? onCopy,
  52. VoidCallback? onCut,
  53. VoidCallback? onPaste,
  54. MoveCursorHandler? onMoveCursorForwardByCharacter,
  55. MoveCursorHandler? onMoveCursorBackwardByCharacter,
  56. MoveCursorHandler? onMoveCursorForwardByWord,
  57. MoveCursorHandler? onMoveCursorBackwardByWord,
  58. SetSelectionHandler? onSetSelection,
  59. SetTextHandler? onSetText,
  60. VoidCallback? onDidGainAccessibilityFocus,
  61. VoidCallback? onDidLoseAccessibilityFocus,
  62. VoidCallback? onFocus,
  63. VoidCallback? onDismiss,
  64. Map<CustomSemanticsAction, VoidCallback>? customSemanticsActions,
})

Creates a semantic annotation.

Implementation

const SemanticsProperties({
  this.enabled,
  this.checked,
  this.mixed,
  this.expanded,
  this.selected,
  this.toggled,
  this.button,
  this.link,
  this.header,
  this.headingLevel,
  this.textField,
  this.slider,
  this.keyboardKey,
  this.readOnly,
  this.focusable,
  this.focused,
  this.inMutuallyExclusiveGroup,
  this.hidden,
  this.obscured,
  this.multiline,
  this.scopesRoute,
  this.namesRoute,
  this.image,
  this.liveRegion,
  this.maxValueLength,
  this.currentValueLength,
  this.identifier,
  this.label,
  this.attributedLabel,
  this.value,
  this.attributedValue,
  this.increasedValue,
  this.attributedIncreasedValue,
  this.decreasedValue,
  this.attributedDecreasedValue,
  this.hint,
  this.tooltip,
  this.attributedHint,
  this.hintOverrides,
  this.textDirection,
  this.sortKey,
  this.tagForChildren,
  this.onTap,
  this.onLongPress,
  this.onScrollLeft,
  this.onScrollRight,
  this.onScrollUp,
  this.onScrollDown,
  this.onIncrease,
  this.onDecrease,
  this.onCopy,
  this.onCut,
  this.onPaste,
  this.onMoveCursorForwardByCharacter,
  this.onMoveCursorBackwardByCharacter,
  this.onMoveCursorForwardByWord,
  this.onMoveCursorBackwardByWord,
  this.onSetSelection,
  this.onSetText,
  this.onDidGainAccessibilityFocus,
  this.onDidLoseAccessibilityFocus,
  this.onFocus,
  this.onDismiss,
  this.customSemanticsActions,
}) : assert(label == null || attributedLabel == null, 'Only one of label or attributedLabel should be provided'),
     assert(value == null || attributedValue == null, 'Only one of value or attributedValue should be provided'),
     assert(increasedValue == null || attributedIncreasedValue == null, 'Only one of increasedValue or attributedIncreasedValue should be provided'),
     assert(decreasedValue == null || attributedDecreasedValue == null, 'Only one of decreasedValue or attributedDecreasedValue should be provided'),
     assert(hint == null || attributedHint == null, 'Only one of hint or attributedHint should be provided'),
     assert(headingLevel == null || (headingLevel > 0 && headingLevel <= 6), 'Heading level must be between 1 and 6');