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. Uri? linkUrl,
  10. bool? header,
  11. int? headingLevel,
  12. bool? textField,
  13. bool? slider,
  14. bool? keyboardKey,
  15. bool? readOnly,
  16. @Deprecated('Use focused instead. ' 'Setting focused automatically set focusable. ' 'This feature was deprecated after v3.36.0-0.0.pre.') bool? focusable,
  17. bool? focused,
  18. AccessibilityFocusBlockType? accessibilityFocusBlockType,
  19. bool? inMutuallyExclusiveGroup,
  20. bool? hidden,
  21. bool? obscured,
  22. bool? multiline,
  23. bool? scopesRoute,
  24. bool? namesRoute,
  25. bool? image,
  26. bool? liveRegion,
  27. bool? isRequired,
  28. int? maxValueLength,
  29. int? currentValueLength,
  30. String? identifier,
  31. Object? traversalParentIdentifier,
  32. Object? traversalChildIdentifier,
  33. String? label,
  34. AttributedString? attributedLabel,
  35. String? value,
  36. AttributedString? attributedValue,
  37. String? increasedValue,
  38. AttributedString? attributedIncreasedValue,
  39. String? decreasedValue,
  40. AttributedString? attributedDecreasedValue,
  41. String? hint,
  42. String? tooltip,
  43. AttributedString? attributedHint,
  44. SemanticsHintOverrides? hintOverrides,
  45. TextDirection? textDirection,
  46. SemanticsSortKey? sortKey,
  47. SemanticsTag? tagForChildren,
  48. SemanticsRole? role,
  49. Set<String>? controlsNodes,
  50. SemanticsInputType? inputType,
  51. SemanticsValidationResult validationResult = SemanticsValidationResult.none,
  52. SemanticsHitTestBehavior? hitTestBehavior,
  53. VoidCallback? onTap,
  54. VoidCallback? onLongPress,
  55. VoidCallback? onScrollLeft,
  56. VoidCallback? onScrollRight,
  57. VoidCallback? onScrollUp,
  58. VoidCallback? onScrollDown,
  59. VoidCallback? onIncrease,
  60. VoidCallback? onDecrease,
  61. VoidCallback? onCopy,
  62. VoidCallback? onCut,
  63. VoidCallback? onPaste,
  64. MoveCursorHandler? onMoveCursorForwardByCharacter,
  65. MoveCursorHandler? onMoveCursorBackwardByCharacter,
  66. MoveCursorHandler? onMoveCursorForwardByWord,
  67. MoveCursorHandler? onMoveCursorBackwardByWord,
  68. SetSelectionHandler? onSetSelection,
  69. SetTextHandler? onSetText,
  70. VoidCallback? onDidGainAccessibilityFocus,
  71. VoidCallback? onDidLoseAccessibilityFocus,
  72. VoidCallback? onFocus,
  73. VoidCallback? onDismiss,
  74. VoidCallback? onExpand,
  75. VoidCallback? onCollapse,
  76. Map<CustomSemanticsAction, VoidCallback>? customSemanticsActions,
  77. String? minValue,
  78. String? maxValue,
})

Creates a semantic annotation.

Implementation

const SemanticsProperties({
  this.enabled,
  this.checked,
  this.mixed,
  this.expanded,
  this.selected,
  this.toggled,
  this.button,
  this.link,
  this.linkUrl,
  this.header,
  this.headingLevel,
  this.textField,
  this.slider,
  this.keyboardKey,
  this.readOnly,
  @Deprecated(
    'Use focused instead. '
    'Setting focused automatically set focusable. '
    'This feature was deprecated after v3.36.0-0.0.pre.',
  )
  this.focusable,
  this.focused,
  this.accessibilityFocusBlockType,
  this.inMutuallyExclusiveGroup,
  this.hidden,
  this.obscured,
  this.multiline,
  this.scopesRoute,
  this.namesRoute,
  this.image,
  this.liveRegion,
  this.isRequired,
  this.maxValueLength,
  this.currentValueLength,
  this.identifier,
  this.traversalParentIdentifier,
  this.traversalChildIdentifier,
  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.role,
  this.controlsNodes,
  this.inputType,
  this.validationResult = SemanticsValidationResult.none,
  this.hitTestBehavior,
  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.onExpand,
  this.onCollapse,
  this.customSemanticsActions,
  this.minValue,
  this.maxValue,
}) : 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',
     ),
     assert(linkUrl == null || (link ?? false), 'If linkUrl is set then link must be true');