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. bool? focusable,
  17. bool? focused,
  18. bool? inMutuallyExclusiveGroup,
  19. bool? hidden,
  20. bool? obscured,
  21. bool? multiline,
  22. bool? scopesRoute,
  23. bool? namesRoute,
  24. bool? image,
  25. bool? liveRegion,
  26. int? maxValueLength,
  27. int? currentValueLength,
  28. String? identifier,
  29. String? label,
  30. AttributedString? attributedLabel,
  31. String? value,
  32. AttributedString? attributedValue,
  33. String? increasedValue,
  34. AttributedString? attributedIncreasedValue,
  35. String? decreasedValue,
  36. AttributedString? attributedDecreasedValue,
  37. String? hint,
  38. String? tooltip,
  39. AttributedString? attributedHint,
  40. SemanticsHintOverrides? hintOverrides,
  41. TextDirection? textDirection,
  42. SemanticsSortKey? sortKey,
  43. SemanticsTag? tagForChildren,
  44. VoidCallback? onTap,
  45. VoidCallback? onLongPress,
  46. VoidCallback? onScrollLeft,
  47. VoidCallback? onScrollRight,
  48. VoidCallback? onScrollUp,
  49. VoidCallback? onScrollDown,
  50. VoidCallback? onIncrease,
  51. VoidCallback? onDecrease,
  52. VoidCallback? onCopy,
  53. VoidCallback? onCut,
  54. VoidCallback? onPaste,
  55. MoveCursorHandler? onMoveCursorForwardByCharacter,
  56. MoveCursorHandler? onMoveCursorBackwardByCharacter,
  57. MoveCursorHandler? onMoveCursorForwardByWord,
  58. MoveCursorHandler? onMoveCursorBackwardByWord,
  59. SetSelectionHandler? onSetSelection,
  60. SetTextHandler? onSetText,
  61. VoidCallback? onDidGainAccessibilityFocus,
  62. VoidCallback? onDidLoseAccessibilityFocus,
  63. VoidCallback? onFocus,
  64. VoidCallback? onDismiss,
  65. 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.linkUrl,
  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'),
     assert(linkUrl == null || (link ?? false), 'If linkUrl is set then link must be true');