Reverts "Add button semantics in list tile (#151599)" (#152425)

Reverts: flutter/flutter#151599
Initiated by: chingjun
Reason for reverting: broke an internal test.
Original PR Author: hangyujin

Reviewed By: {chunhtai}

This change reverts the following previous change:
fixes: https://github.com/flutter/flutter/issues/111960
This commit is contained in:
auto-submit[bot]
2024-07-27 04:40:17 +00:00
committed by GitHub
parent 17941362cc
commit e8d4c98b07
7 changed files with 0 additions and 11 deletions

View File

@@ -910,7 +910,6 @@ class ListTile extends StatelessWidget {
autofocus: autofocus,
enableFeedback: enableFeedback ?? tileTheme.enableFeedback ?? true,
child: Semantics(
button: onTap != null || onLongPress != null,
selected: selected,
enabled: enabled,
child: Ink(

View File

@@ -1184,7 +1184,6 @@ void main() {
));
expect(tester.getSemantics(find.byType(CheckboxListTile)), matchesSemantics(
isButton: true,
hasCheckedState: true,
isChecked: true,
hasEnabledState: true,

View File

@@ -727,7 +727,6 @@ void main() {
expect(
tester.getSemantics(find.byType(ListTile).first),
matchesSemantics(
isButton: true,
hasTapAction: true,
hasFocusAction: true,
hasEnabledState: true,
@@ -743,7 +742,6 @@ void main() {
expect(
tester.getSemantics(find.byType(ListTile).last),
matchesSemantics(
isButton: true,
hasTapAction: true,
hasFocusAction: true,
hasEnabledState: true,

View File

@@ -304,7 +304,6 @@ void main() {
),
TestSemantics.rootChild(
flags: <SemanticsFlag>[
SemanticsFlag.isButton,
SemanticsFlag.hasEnabledState,
SemanticsFlag.isEnabled,
SemanticsFlag.isFocusable,

View File

@@ -405,7 +405,6 @@ void main() {
TestSemantics(
id: 1,
flags: <SemanticsFlag>[
SemanticsFlag.isButton,
SemanticsFlag.hasCheckedState,
SemanticsFlag.hasEnabledState,
SemanticsFlag.isEnabled,
@@ -442,7 +441,6 @@ void main() {
TestSemantics(
id: 1,
flags: <SemanticsFlag>[
SemanticsFlag.isButton,
SemanticsFlag.hasCheckedState,
SemanticsFlag.isChecked,
SemanticsFlag.hasEnabledState,

View File

@@ -744,7 +744,6 @@ void main() {
return false;
});
expect(child, matchesSemantics(
isButton: true,
hasToggledState: true,
isToggled: true,
isEnabled: true,

View File

@@ -72,7 +72,6 @@ void main() {
id: 1,
rect: const Rect.fromLTWH(0.0, 0.0, 800.0, 56.0),
flags: <SemanticsFlag>[
SemanticsFlag.isButton,
SemanticsFlag.hasEnabledState,
SemanticsFlag.hasToggledState,
SemanticsFlag.isEnabled,
@@ -87,7 +86,6 @@ void main() {
rect: const Rect.fromLTWH(0.0, 0.0, 800.0, 56.0),
transform: Matrix4.translationValues(0.0, 56.0, 0.0),
flags: <SemanticsFlag>[
SemanticsFlag.isButton,
SemanticsFlag.hasCheckedState,
SemanticsFlag.hasEnabledState,
SemanticsFlag.isChecked,
@@ -102,7 +100,6 @@ void main() {
rect: const Rect.fromLTWH(0.0, 0.0, 800.0, 56.0),
transform: Matrix4.translationValues(0.0, 112.0, 0.0),
flags: <SemanticsFlag>[
SemanticsFlag.isButton,
SemanticsFlag.hasCheckedState,
SemanticsFlag.hasEnabledState,
SemanticsFlag.isEnabled,