File tree Expand file tree Collapse file tree 4 files changed +8
-18
lines changed Expand file tree Collapse file tree 4 files changed +8
-18
lines changed Original file line number Diff line number Diff line change @@ -139,11 +139,8 @@ class _LongPressScreenState extends State<LongPressScreen> {
139
139
),
140
140
Padding (
141
141
padding: const EdgeInsets .all (18.0 ),
142
- child: Semantics (
143
- label: "long_press_button" ,
144
- explicitChildNodes: true ,
145
- container: true ,
146
142
child: InkWell (
143
+ key: const ValueKey ("long_press_button" ),
147
144
onLongPress: () async {
148
145
await _showLongPressPopup ();
149
146
},
@@ -160,7 +157,6 @@ class _LongPressScreenState extends State<LongPressScreen> {
160
157
),
161
158
),
162
159
),
163
- ),
164
160
)
165
161
],
166
162
),
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ class _DragAndDropScreenState extends State<DragAndDropScreen> {
47
47
width: 100.0 ,
48
48
color: Colors .cyan,
49
49
child: const Center (
50
+ key: ValueKey ("drop_zone" ),
50
51
child: Text ('Drop here' ),
51
52
),
52
53
);
@@ -80,11 +81,8 @@ class _DragAndDropScreenState extends State<DragAndDropScreen> {
80
81
curve: Curves .fastOutSlowIn,
81
82
child: GestureDetector (
82
83
onTap: () {},
83
- child: Semantics (
84
- label: "drag_me" ,
85
- explicitChildNodes: true ,
86
- container: true ,
87
84
child: Draggable <int >(
85
+ key: const ValueKey ("drag_me" ),
88
86
onDragStarted: () {},
89
87
onDragUpdate: (details) => {
90
88
setState (() {
@@ -123,7 +121,6 @@ class _DragAndDropScreenState extends State<DragAndDropScreen> {
123
121
),
124
122
),
125
123
),
126
- ),
127
124
),
128
125
),
129
126
],
Original file line number Diff line number Diff line change @@ -44,19 +44,17 @@ class _LazyLoadingScreenState extends State<LazyLoadingScreen> {
44
44
// textField: true,
45
45
explicitChildNodes: true ,
46
46
container: true ,
47
- child: const Text ("Hello world" ),
47
+ child: const Text ("Hello world" ,
48
+ key: ValueKey ("message_field" )),
48
49
)
49
50
],
50
51
const SizedBox (
51
52
height: 30 ,
52
53
),
53
54
Padding (
54
55
padding: const EdgeInsets .all (18.0 ),
55
- child: Semantics (
56
- label: "toggle_button" ,
57
- explicitChildNodes: true ,
58
- container: true ,
59
- child: InkWell (
56
+ child: InkWell (
57
+ key: const ValueKey ("toggle_button" ),
60
58
onTap: ! isLoading
61
59
? () async {
62
60
toggleMessage ();
@@ -74,7 +72,6 @@ class _LazyLoadingScreenState extends State<LazyLoadingScreen> {
74
72
)),
75
73
),
76
74
),
77
- ),
78
75
),
79
76
const SizedBox (
80
77
height: 100 ,
Original file line number Diff line number Diff line change @@ -79,10 +79,10 @@ class _LoginScreenState extends State<LoginScreen> {
79
79
width: double .infinity,
80
80
child: Semantics (
81
81
label: "login_button" ,
82
- key: const Key ("login_button" ),
83
82
explicitChildNodes: true ,
84
83
container: true ,
85
84
child: ElevatedButton (
85
+ key: const ValueKey ("LoginButton" ),
86
86
onPressed: () {
87
87
_validateCredentials ();
88
88
},
You can’t perform that action at this time.
0 commit comments