containsSemantics function
- @Deprecated('Migrate to isSemantics instead. ' 'This feature was deprecated after v3.40.0-1.0.pre.')
- String? identifier,
- String? traversalParentIdentifier,
- String? traversalChildIdentifier,
- String? label,
- AttributedString? attributedLabel,
- String? hint,
- AttributedString? attributedHint,
- String? value,
- AttributedString? attributedValue,
- String? increasedValue,
- AttributedString? attributedIncreasedValue,
- String? decreasedValue,
- AttributedString? attributedDecreasedValue,
- String? tooltip,
- TextDirection? textDirection,
- Rect? rect,
- Size? size,
- double? elevation,
- double? thickness,
- int? platformViewId,
- int? maxValueLength,
- int? currentValueLength,
- SemanticsValidationResult? validationResult,
- SemanticsInputType? inputType,
- String? maxValue,
- String? minValue,
- bool? hasCheckedState,
- bool? isChecked,
- bool? isCheckStateMixed,
- bool? isSelected,
- bool? hasSelectedState,
- bool? isButton,
- bool? isSlider,
- bool? isKeyboardKey,
- bool? isLink,
- bool? isFocused,
- bool? isFocusable,
- bool? isTextField,
- bool? isReadOnly,
- bool? hasEnabledState,
- bool? isEnabled,
- bool? isInMutuallyExclusiveGroup,
- bool? isHeader,
- bool? isObscured,
- bool? isMultiline,
- bool? namesRoute,
- bool? scopesRoute,
- bool? isHidden,
- bool? isImage,
- bool? isLiveRegion,
- bool? hasToggledState,
- bool? isToggled,
- bool? hasImplicitScrolling,
- bool? hasExpandedState,
- bool? isExpanded,
- bool? hasRequiredState,
- bool? isRequired,
- bool? hasTapAction,
- bool? hasFocusAction,
- bool? hasLongPressAction,
- bool? hasScrollLeftAction,
- bool? hasScrollRightAction,
- bool? hasScrollUpAction,
- bool? hasScrollDownAction,
- bool? hasIncreaseAction,
- bool? hasDecreaseAction,
- bool? hasShowOnScreenAction,
- bool? hasMoveCursorForwardByCharacterAction,
- bool? hasMoveCursorBackwardByCharacterAction,
- bool? hasMoveCursorForwardByWordAction,
- bool? hasMoveCursorBackwardByWordAction,
- bool? hasSetTextAction,
- bool? hasSetSelectionAction,
- bool? hasCopyAction,
- bool? hasCutAction,
- bool? hasPasteAction,
- bool? hasDidGainAccessibilityFocusAction,
- bool? hasDidLoseAccessibilityFocusAction,
- bool? hasDismissAction,
- String? onTapHint,
- String? onLongPressHint,
- List<
CustomSemanticsAction> ? customActions, - List<
Matcher> ? children,
Asserts that a SemanticsNode contains the specified information.
There are no default expected values, so no unspecified values will be validated.
To find a SemanticsNode directly, use CommonFinders.semantics. These methods will search the semantics tree directly and avoid the edge cases that SemanticsController.find sometimes runs into.
To retrieve the semantics data of a widget, use SemanticsController.find with a FinderBase that returns a single widget. Semantics must be enabled in order to use this method.
See also:
- SemanticsController.find under WidgetTester.semantics, the tester method which retrieves semantics.
- matchesSemantics, a similar matcher with default values for flags and actions.
Implementation
@Deprecated(
'Migrate to isSemantics instead. '
'This feature was deprecated after v3.40.0-1.0.pre.',
)
Matcher containsSemantics({
String? identifier,
String? traversalParentIdentifier,
String? traversalChildIdentifier,
String? label,
AttributedString? attributedLabel,
String? hint,
AttributedString? attributedHint,
String? value,
AttributedString? attributedValue,
String? increasedValue,
AttributedString? attributedIncreasedValue,
String? decreasedValue,
AttributedString? attributedDecreasedValue,
String? tooltip,
TextDirection? textDirection,
Rect? rect,
Size? size,
double? elevation,
double? thickness,
int? platformViewId,
int? maxValueLength,
int? currentValueLength,
SemanticsValidationResult? validationResult,
ui.SemanticsInputType? inputType,
String? maxValue,
String? minValue,
// Flags
bool? hasCheckedState,
bool? isChecked,
bool? isCheckStateMixed,
bool? isSelected,
bool? hasSelectedState,
bool? isButton,
bool? isSlider,
bool? isKeyboardKey,
bool? isLink,
bool? isFocused,
bool? isFocusable,
bool? isTextField,
bool? isReadOnly,
bool? hasEnabledState,
bool? isEnabled,
bool? isInMutuallyExclusiveGroup,
bool? isHeader,
bool? isObscured,
bool? isMultiline,
bool? namesRoute,
bool? scopesRoute,
bool? isHidden,
bool? isImage,
bool? isLiveRegion,
bool? hasToggledState,
bool? isToggled,
bool? hasImplicitScrolling,
bool? hasExpandedState,
bool? isExpanded,
bool? hasRequiredState,
bool? isRequired,
// Actions
bool? hasTapAction,
bool? hasFocusAction,
bool? hasLongPressAction,
bool? hasScrollLeftAction,
bool? hasScrollRightAction,
bool? hasScrollUpAction,
bool? hasScrollDownAction,
bool? hasIncreaseAction,
bool? hasDecreaseAction,
bool? hasShowOnScreenAction,
bool? hasMoveCursorForwardByCharacterAction,
bool? hasMoveCursorBackwardByCharacterAction,
bool? hasMoveCursorForwardByWordAction,
bool? hasMoveCursorBackwardByWordAction,
bool? hasSetTextAction,
bool? hasSetSelectionAction,
bool? hasCopyAction,
bool? hasCutAction,
bool? hasPasteAction,
bool? hasDidGainAccessibilityFocusAction,
bool? hasDidLoseAccessibilityFocusAction,
bool? hasDismissAction,
// Custom actions and overrides
String? onTapHint,
String? onLongPressHint,
List<CustomSemanticsAction>? customActions,
List<Matcher>? children,
}) => isSemantics(
identifier: identifier,
traversalParentIdentifier: traversalParentIdentifier,
traversalChildIdentifier: traversalChildIdentifier,
label: label,
attributedLabel: attributedLabel,
hint: hint,
attributedHint: attributedHint,
value: value,
attributedValue: attributedValue,
increasedValue: increasedValue,
attributedIncreasedValue: attributedIncreasedValue,
decreasedValue: decreasedValue,
attributedDecreasedValue: attributedDecreasedValue,
tooltip: tooltip,
textDirection: textDirection,
rect: rect,
size: size,
elevation: elevation,
thickness: thickness,
platformViewId: platformViewId,
maxValueLength: maxValueLength,
currentValueLength: currentValueLength,
validationResult: validationResult,
inputType: inputType,
maxValue: maxValue,
minValue: minValue,
// Flags
hasCheckedState: hasCheckedState,
isChecked: isChecked,
isCheckStateMixed: isCheckStateMixed,
isSelected: isSelected,
hasSelectedState: hasSelectedState,
isButton: isButton,
isSlider: isSlider,
isKeyboardKey: isKeyboardKey,
isLink: isLink,
isFocused: isFocused,
isFocusable: isFocusable,
isTextField: isTextField,
isReadOnly: isReadOnly,
hasEnabledState: hasEnabledState,
isEnabled: isEnabled,
isInMutuallyExclusiveGroup: isInMutuallyExclusiveGroup,
isHeader: isHeader,
isObscured: isObscured,
isMultiline: isMultiline,
namesRoute: namesRoute,
scopesRoute: scopesRoute,
isHidden: isHidden,
isImage: isImage,
isLiveRegion: isLiveRegion,
hasToggledState: hasToggledState,
isToggled: isToggled,
hasImplicitScrolling: hasImplicitScrolling,
hasExpandedState: hasExpandedState,
isExpanded: isExpanded,
hasRequiredState: hasRequiredState,
isRequired: isRequired,
// Actions
hasTapAction: hasTapAction,
hasFocusAction: hasFocusAction,
hasLongPressAction: hasLongPressAction,
hasScrollLeftAction: hasScrollLeftAction,
hasScrollRightAction: hasScrollRightAction,
hasScrollUpAction: hasScrollUpAction,
hasScrollDownAction: hasScrollDownAction,
hasIncreaseAction: hasIncreaseAction,
hasDecreaseAction: hasDecreaseAction,
hasShowOnScreenAction: hasShowOnScreenAction,
hasMoveCursorForwardByCharacterAction: hasMoveCursorForwardByCharacterAction,
hasMoveCursorBackwardByCharacterAction: hasMoveCursorBackwardByCharacterAction,
hasMoveCursorForwardByWordAction: hasMoveCursorForwardByWordAction,
hasMoveCursorBackwardByWordAction: hasMoveCursorBackwardByWordAction,
hasSetTextAction: hasSetTextAction,
hasSetSelectionAction: hasSetSelectionAction,
hasCopyAction: hasCopyAction,
hasCutAction: hasCutAction,
hasPasteAction: hasPasteAction,
hasDidGainAccessibilityFocusAction: hasDidGainAccessibilityFocusAction,
hasDidLoseAccessibilityFocusAction: hasDidLoseAccessibilityFocusAction,
hasDismissAction: hasDismissAction,
// Custom actions and overrides
onTapHint: onTapHint,
onLongPressHint: onLongPressHint,
customActions: customActions,
children: children,
);