semantics method

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

Annotates the widget tree with a description of the meaning of the widgets.

Used by assistive technologies, search engines, and other semantic analysis software to determine the meaning of the application.

Implementation

Widget semantics({
  Key? key,
  Widget? child,
  bool container = false,
  bool explicitChildNodes = false,
  bool excludeSemantics = false,
  bool? enabled,
  bool? checked,
  bool? mixed,
  bool? selected,
  bool? toggled,
  bool? button,
  bool? slider,
  bool? keyboardKey,
  bool? link,
  bool? header,
  bool? textField,
  bool? readOnly,
  bool? focusable,
  bool? focused,
  bool? inMutuallyExclusiveGroup,
  bool? obscured,
  bool? multiline,
  bool? scopesRoute,
  bool? namesRoute,
  bool? hidden,
  bool? image,
  bool? liveRegion,
  int? maxValueLength,
  int? currentValueLength,
  String? label,
  AttributedString? attributedLabel,
  String? value,
  AttributedString? attributedValue,
  String? increasedValue,
  AttributedString? attributedIncreasedValue,
  String? decreasedValue,
  AttributedString? attributedDecreasedValue,
  String? hint,
  AttributedString? attributedHint,
  String? tooltip,
  String? onTapHint,
  String? onLongPressHint,
  TextDirection? textDirection,
  SemanticsSortKey? sortKey,
  SemanticsTag? tagForChildren,
  VoidCallback? onTap,
  VoidCallback? onLongPress,
  VoidCallback? onScrollLeft,
  VoidCallback? onScrollRight,
  VoidCallback? onScrollUp,
  VoidCallback? onScrollDown,
  VoidCallback? onIncrease,
  VoidCallback? onDecrease,
  VoidCallback? onCopy,
  VoidCallback? onCut,
  VoidCallback? onPaste,
  VoidCallback? onDismiss,
  MoveCursorHandler? onMoveCursorForwardByCharacter,
  MoveCursorHandler? onMoveCursorBackwardByCharacter,
  SetSelectionHandler? onSetSelection,
  SetTextHandler? onSetText,
  VoidCallback? onDidGainAccessibilityFocus,
  VoidCallback? onDidLoseAccessibilityFocus,
  Map<CustomSemanticsAction, VoidCallback>? customSemanticsActions,
}) {
  return Semantics(
    key: key,
    enabled: enabled,
    checked: checked,
    mixed: mixed,
    selected: selected,
    toggled: toggled,
    button: button,
    slider: slider,
    keyboardKey: keyboardKey,
    link: link,
    header: header,
    textField: textField,
    readOnly: readOnly,
    focusable: focusable,
    focused: focused,
    inMutuallyExclusiveGroup: inMutuallyExclusiveGroup,
    obscured: obscured,
    multiline: multiline,
    scopesRoute: scopesRoute,
    namesRoute: namesRoute,
    hidden: hidden,
    image: image,
    liveRegion: liveRegion,
    maxValueLength: maxValueLength,
    currentValueLength: currentValueLength,
    label: label,
    attributedLabel: attributedLabel,
    value: value,
    attributedValue: attributedValue,
    increasedValue: increasedValue,
    attributedIncreasedValue: attributedIncreasedValue,
    decreasedValue: decreasedValue,
    attributedDecreasedValue: attributedDecreasedValue,
    hint: hint,
    attributedHint: attributedHint,
    tooltip: tooltip,
    onTapHint: onTapHint,
    onLongPressHint: onLongPressHint,
    textDirection: textDirection,
    sortKey: sortKey,
    tagForChildren: tagForChildren,
    onTap: onTap,
    onLongPress: onLongPress,
    onScrollLeft: onScrollLeft,
    onScrollRight: onScrollRight,
    onScrollUp: onScrollUp,
    onScrollDown: onScrollDown,
    onIncrease: onIncrease,
    onDecrease: onDecrease,
    onCopy: onCopy,
    onCut: onCut,
    onPaste: onPaste,
    onDismiss: onDismiss,
    onMoveCursorForwardByCharacter: onMoveCursorForwardByCharacter,
    onMoveCursorBackwardByCharacter: onMoveCursorBackwardByCharacter,
    onSetSelection: onSetSelection,
    onSetText: onSetText,
    onDidGainAccessibilityFocus: onDidGainAccessibilityFocus,
    onDidLoseAccessibilityFocus: onDidLoseAccessibilityFocus,
    customSemanticsActions: customSemanticsActions,
    child: this,
  );
}