merge method

SemanticsFlags merge(
  1. SemanticsFlags other
)

Combines two sets of flags, such that if a flag it set to true in any of the two sets, the resulting set contains that flag set to true.

Implementation

SemanticsFlags merge(SemanticsFlags other) {
  return SemanticsFlags(
    isChecked: isChecked.merge(other.isChecked),
    isSelected: isSelected.merge(other.isSelected),
    isEnabled: isEnabled.merge(other.isEnabled),
    isToggled: isToggled.merge(other.isToggled),
    isExpanded: isExpanded.merge(other.isExpanded),
    isRequired: isRequired.merge(other.isRequired),
    isFocused: isFocused.merge(other.isFocused),
    isButton: isButton || other.isButton,
    isTextField: isTextField || other.isTextField,
    isInMutuallyExclusiveGroup: isInMutuallyExclusiveGroup || other.isInMutuallyExclusiveGroup,
    isHeader: isHeader || other.isHeader,
    isObscured: isObscured || other.isObscured,
    scopesRoute: scopesRoute || other.scopesRoute,
    namesRoute: namesRoute || other.namesRoute,
    isHidden: isHidden || other.isHidden,
    isImage: isImage || other.isImage,
    isLiveRegion: isLiveRegion || other.isLiveRegion,
    hasImplicitScrolling: hasImplicitScrolling || other.hasImplicitScrolling,
    isMultiline: isMultiline || other.isMultiline,
    isReadOnly: isReadOnly || other.isReadOnly,
    isLink: isLink || other.isLink,
    isSlider: isSlider || other.isSlider,
    isKeyboardKey: isKeyboardKey || other.isKeyboardKey,
  );
}