copyWith method

SemanticsFlags copyWith({
  1. CheckedState? isChecked,
  2. Tristate? isSelected,
  3. Tristate? isEnabled,
  4. Tristate? isToggled,
  5. Tristate? isExpanded,
  6. Tristate? isRequired,
  7. Tristate? isFocused,
  8. bool? isButton,
  9. bool? isTextField,
  10. bool? isInMutuallyExclusiveGroup,
  11. bool? isHeader,
  12. bool? isObscured,
  13. bool? scopesRoute,
  14. bool? namesRoute,
  15. bool? isHidden,
  16. bool? isImage,
  17. bool? isLiveRegion,
  18. bool? hasImplicitScrolling,
  19. bool? isMultiline,
  20. bool? isReadOnly,
  21. bool? isLink,
  22. bool? isSlider,
  23. bool? isKeyboardKey,
})

Copy the semantics flags, with some of them optionally replaced.

Implementation

SemanticsFlags copyWith({
  CheckedState? isChecked,
  Tristate? isSelected,
  Tristate? isEnabled,
  Tristate? isToggled,
  Tristate? isExpanded,
  Tristate? isRequired,
  Tristate? isFocused,
  bool? isButton,
  bool? isTextField,
  bool? isInMutuallyExclusiveGroup,
  bool? isHeader,
  bool? isObscured,
  bool? scopesRoute,
  bool? namesRoute,
  bool? isHidden,
  bool? isImage,
  bool? isLiveRegion,
  bool? hasImplicitScrolling,
  bool? isMultiline,
  bool? isReadOnly,
  bool? isLink,
  bool? isSlider,
  bool? isKeyboardKey,
}) {
  return SemanticsFlags(
    isChecked: isChecked ?? this.isChecked,
    isSelected: isSelected ?? this.isSelected,
    isButton: isButton ?? this.isButton,
    isTextField: isTextField ?? this.isTextField,
    isFocused: isFocused ?? this.isFocused,
    isEnabled: isEnabled ?? this.isEnabled,
    isInMutuallyExclusiveGroup: isInMutuallyExclusiveGroup ?? this.isInMutuallyExclusiveGroup,
    isHeader: isHeader ?? this.isHeader,
    isObscured: isObscured ?? this.isObscured,
    scopesRoute: scopesRoute ?? this.scopesRoute,
    namesRoute: namesRoute ?? this.namesRoute,
    isHidden: isHidden ?? this.isHidden,
    isImage: isImage ?? this.isImage,
    isLiveRegion: isLiveRegion ?? this.isLiveRegion,
    isToggled: isToggled ?? this.isToggled,
    hasImplicitScrolling: hasImplicitScrolling ?? this.hasImplicitScrolling,
    isMultiline: isMultiline ?? this.isMultiline,
    isReadOnly: isReadOnly ?? this.isReadOnly,
    isLink: isLink ?? this.isLink,
    isSlider: isSlider ?? this.isSlider,
    isKeyboardKey: isKeyboardKey ?? this.isKeyboardKey,
    isExpanded: isExpanded ?? this.isExpanded,
    isRequired: isRequired ?? this.isRequired,
  );
}