Semantics constructor
- Key? key,
- Widget? child,
- bool container = false,
- bool explicitChildNodes = false,
- bool excludeSemantics = false,
- bool blockUserActions = false,
- bool? enabled,
- bool? checked,
- bool? mixed,
- bool? selected,
- bool? toggled,
- bool? button,
- bool? slider,
- bool? keyboardKey,
- bool? link,
- Uri? linkUrl,
- bool? header,
- int? headingLevel,
- bool? textField,
- bool? readOnly,
- bool? focusable,
- bool? focused,
- bool? inMutuallyExclusiveGroup,
- bool? obscured,
- bool? multiline,
- bool? scopesRoute,
- bool? namesRoute,
- bool? image,
- bool? liveRegion,
- bool? expanded,
- bool? isRequired,
- int? maxValueLength,
- int? currentValueLength,
- String? identifier,
- 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,
- VoidCallback? onFocus,
- Map<
CustomSemanticsAction, VoidCallback> ? customSemanticsActions, - SemanticsRole? role,
- Set<
String> ? controlsNodes, - SemanticsValidationResult validationResult = SemanticsValidationResult.none,
- SemanticsInputType? inputType,
- Locale? localeForSubtree,
Creates a semantic annotation.
To create a const
instance of Semantics, use the
Semantics.fromProperties constructor.
Used by assistive technologies, search engines, and other semantic analysis software to determine the meaning of the application.
See also:
- SemanticsProperties, which contains a complete documentation for each of the constructor parameters that belongs to semantics properties.
- RenderObject.describeSemanticsConfiguration, the rendering library API through which the Semantics widget and SliverSemantics sliver are actually implemented.
- SemanticsNode, the object used by the rendering library to represent semantics in the semantics tree.
- SemanticsDebugger, an overlay to help visualize the semantics tree. Can be enabled using WidgetsApp.showSemanticsDebugger, MaterialApp.showSemanticsDebugger, or CupertinoApp.showSemanticsDebugger.
- MergeSemantics, a widget which marks a subtree as being a single node for accessibility purposes.
- ExcludeSemantics, a widget which excludes a subtree from the semantics tree (which might be useful if it is, e.g., totally decorative and not important to the user).
Implementation
Semantics({
super.key,
super.child,
super.container = false,
super.explicitChildNodes = false,
super.excludeSemantics = false,
super.blockUserActions = false,
super.enabled,
super.checked,
super.mixed,
super.selected,
super.toggled,
super.button,
super.slider,
super.keyboardKey,
super.link,
super.linkUrl,
super.header,
super.headingLevel,
super.textField,
super.readOnly,
super.focusable,
super.focused,
super.inMutuallyExclusiveGroup,
super.obscured,
super.multiline,
super.scopesRoute,
super.namesRoute,
super.hidden,
super.image,
super.liveRegion,
super.expanded,
super.isRequired,
super.maxValueLength,
super.currentValueLength,
super.identifier,
super.label,
super.attributedLabel,
super.value,
super.attributedValue,
super.increasedValue,
super.attributedIncreasedValue,
super.decreasedValue,
super.attributedDecreasedValue,
super.hint,
super.attributedHint,
super.tooltip,
super.onTapHint,
super.onLongPressHint,
super.textDirection,
super.sortKey,
super.tagForChildren,
super.onTap,
super.onLongPress,
super.onScrollLeft,
super.onScrollRight,
super.onScrollUp,
super.onScrollDown,
super.onIncrease,
super.onDecrease,
super.onCopy,
super.onCut,
super.onPaste,
super.onDismiss,
super.onMoveCursorForwardByCharacter,
super.onMoveCursorBackwardByCharacter,
super.onSetSelection,
super.onSetText,
super.onDidGainAccessibilityFocus,
super.onDidLoseAccessibilityFocus,
super.onFocus,
super.customSemanticsActions,
super.role,
super.controlsNodes,
super.validationResult = SemanticsValidationResult.none,
super.inputType,
super.localeForSubtree,
});