SemanticsProperties constructor
- bool? enabled,
- bool? checked,
- bool? mixed,
- bool? expanded,
- bool? selected,
- bool? toggled,
- bool? button,
- bool? link,
- bool? header,
- int? headingLevel,
- bool? textField,
- bool? slider,
- bool? keyboardKey,
- bool? readOnly,
- bool? focusable,
- bool? focused,
- bool? inMutuallyExclusiveGroup,
- bool? obscured,
- bool? multiline,
- bool? scopesRoute,
- bool? namesRoute,
- bool? image,
- bool? liveRegion,
- int? maxValueLength,
- int? currentValueLength,
- String? identifier,
- String? label,
- AttributedString? attributedLabel,
- String? value,
- AttributedString? attributedValue,
- String? increasedValue,
- AttributedString? attributedIncreasedValue,
- String? decreasedValue,
- AttributedString? attributedDecreasedValue,
- String? hint,
- String? tooltip,
- AttributedString? attributedHint,
- SemanticsHintOverrides? hintOverrides,
- 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,
- MoveCursorHandler? onMoveCursorForwardByCharacter,
- MoveCursorHandler? onMoveCursorBackwardByCharacter,
- MoveCursorHandler? onMoveCursorForwardByWord,
- MoveCursorHandler? onMoveCursorBackwardByWord,
- SetSelectionHandler? onSetSelection,
- SetTextHandler? onSetText,
- VoidCallback? onDidGainAccessibilityFocus,
- VoidCallback? onDidLoseAccessibilityFocus,
- VoidCallback? onFocus,
- VoidCallback? onDismiss,
- 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.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');