Skip to content

Commit e8d4c98

Browse files
Reverts "Add button semantics in list tile (flutter#151599)" (flutter#152425)
Reverts: 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: flutter#111960
1 parent 1794136 commit e8d4c98

File tree

7 files changed

+0
-11
lines changed

7 files changed

+0
-11
lines changed

packages/flutter/lib/src/material/list_tile.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,6 @@ class ListTile extends StatelessWidget {
910910
autofocus: autofocus,
911911
enableFeedback: enableFeedback ?? tileTheme.enableFeedback ?? true,
912912
child: Semantics(
913-
button: onTap != null || onLongPress != null,
914913
selected: selected,
915914
enabled: enabled,
916915
child: Ink(

packages/flutter/test/material/checkbox_list_tile_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,6 @@ void main() {
11841184
));
11851185

11861186
expect(tester.getSemantics(find.byType(CheckboxListTile)), matchesSemantics(
1187-
isButton: true,
11881187
hasCheckedState: true,
11891188
isChecked: true,
11901189
hasEnabledState: true,

packages/flutter/test/material/expansion_tile_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,6 @@ void main() {
727727
expect(
728728
tester.getSemantics(find.byType(ListTile).first),
729729
matchesSemantics(
730-
isButton: true,
731730
hasTapAction: true,
732731
hasFocusAction: true,
733732
hasEnabledState: true,
@@ -743,7 +742,6 @@ void main() {
743742
expect(
744743
tester.getSemantics(find.byType(ListTile).last),
745744
matchesSemantics(
746-
isButton: true,
747745
hasTapAction: true,
748746
hasFocusAction: true,
749747
hasEnabledState: true,

packages/flutter/test/material/list_tile_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,6 @@ void main() {
304304
),
305305
TestSemantics.rootChild(
306306
flags: <SemanticsFlag>[
307-
SemanticsFlag.isButton,
308307
SemanticsFlag.hasEnabledState,
309308
SemanticsFlag.isEnabled,
310309
SemanticsFlag.isFocusable,

packages/flutter/test/material/radio_list_tile_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,6 @@ void main() {
405405
TestSemantics(
406406
id: 1,
407407
flags: <SemanticsFlag>[
408-
SemanticsFlag.isButton,
409408
SemanticsFlag.hasCheckedState,
410409
SemanticsFlag.hasEnabledState,
411410
SemanticsFlag.isEnabled,
@@ -442,7 +441,6 @@ void main() {
442441
TestSemantics(
443442
id: 1,
444443
flags: <SemanticsFlag>[
445-
SemanticsFlag.isButton,
446444
SemanticsFlag.hasCheckedState,
447445
SemanticsFlag.isChecked,
448446
SemanticsFlag.hasEnabledState,

packages/flutter/test/material/reorderable_list_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,6 @@ void main() {
744744
return false;
745745
});
746746
expect(child, matchesSemantics(
747-
isButton: true,
748747
hasToggledState: true,
749748
isToggled: true,
750749
isEnabled: true,

packages/flutter/test/material/switch_list_tile_test.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ void main() {
7272
id: 1,
7373
rect: const Rect.fromLTWH(0.0, 0.0, 800.0, 56.0),
7474
flags: <SemanticsFlag>[
75-
SemanticsFlag.isButton,
7675
SemanticsFlag.hasEnabledState,
7776
SemanticsFlag.hasToggledState,
7877
SemanticsFlag.isEnabled,
@@ -87,7 +86,6 @@ void main() {
8786
rect: const Rect.fromLTWH(0.0, 0.0, 800.0, 56.0),
8887
transform: Matrix4.translationValues(0.0, 56.0, 0.0),
8988
flags: <SemanticsFlag>[
90-
SemanticsFlag.isButton,
9189
SemanticsFlag.hasCheckedState,
9290
SemanticsFlag.hasEnabledState,
9391
SemanticsFlag.isChecked,
@@ -102,7 +100,6 @@ void main() {
102100
rect: const Rect.fromLTWH(0.0, 0.0, 800.0, 56.0),
103101
transform: Matrix4.translationValues(0.0, 112.0, 0.0),
104102
flags: <SemanticsFlag>[
105-
SemanticsFlag.isButton,
106103
SemanticsFlag.hasCheckedState,
107104
SemanticsFlag.hasEnabledState,
108105
SemanticsFlag.isEnabled,

0 commit comments

Comments
 (0)