semantics method

Widget semantics(
  1. {Key? key,
  2. bool container = false,
  3. bool explicitChildNodes = false,
  4. bool excludeSemantics = false,
  5. bool? enabled,
  6. bool? checked,
  7. bool? selected,
  8. bool? toggled,
  9. bool? button,
  10. bool? slider,
  11. bool? keyboardKey,
  12. bool? link,
  13. bool? header,
  14. bool? textField,
  15. bool? readOnly,
  16. bool? focusable,
  17. bool? focused,
  18. bool? inMutuallyExclusiveGroup,
  19. bool? obscured,
  20. bool? multiline,
  21. bool? scopesRoute,
  22. bool? namesRoute,
  23. bool? hidden,
  24. bool? image,
  25. bool? liveRegion,
  26. int? maxValueLength,
  27. int? currentValueLength,
  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. AttributedString? attributedHint,
  38. String? onTapHint,
  39. String? onLongPressHint,
  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. VoidCallback? onDismiss,
  55. MoveCursorHandler? onMoveCursorForwardByCharacter,
  56. MoveCursorHandler? onMoveCursorBackwardByCharacter,
  57. SetSelectionHandler? onSetSelection,
  58. SetTextHandler? onSetText,
  59. VoidCallback? onDidGainAccessibilityFocus,
  60. VoidCallback? onDidLoseAccessibilityFocus,
  61. Map<CustomSemanticsAction, VoidCallback>? customSemanticsActions}
)

Include Semantics with label this widget.

Implementation

Widget semantics({
  Key? key,
  bool container = false,
  bool explicitChildNodes = false,
  bool excludeSemantics = false,
  bool? enabled,
  bool? checked,
  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? 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.fromProperties(
    key: key,
    container: container,
    explicitChildNodes: explicitChildNodes,
    excludeSemantics: excludeSemantics,
    properties: SemanticsProperties(
      enabled: enabled,
      checked: checked,
      toggled: toggled,
      selected: selected,
      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,
      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,
      onMoveCursorForwardByCharacter: onMoveCursorForwardByCharacter,
      onMoveCursorBackwardByCharacter: onMoveCursorBackwardByCharacter,
      onDidGainAccessibilityFocus: onDidGainAccessibilityFocus,
      onDidLoseAccessibilityFocus: onDidLoseAccessibilityFocus,
      onDismiss: onDismiss,
      onSetSelection: onSetSelection,
      onSetText: onSetText,
      customSemanticsActions: customSemanticsActions,
      hintOverrides: onTapHint != null || onLongPressHint != null
          ? SemanticsHintOverrides(
              onTapHint: onTapHint,
              onLongPressHint: onLongPressHint,
            )
          : null,
    ),
    child: this,
  );
}