Skip to content

Commit 54c2b68

Browse files
committed
sticky_header example: Enable ink splashes, to demo hit-testing
1 parent a143ab0 commit 54c2b68

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/example/sticky_header.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ class WideHeader extends StatelessWidget {
197197
return Material(
198198
color: Theme.of(context).colorScheme.primaryContainer,
199199
child: ListTile(
200+
onTap: () {}, // nop, but non-null so the ink splash appears
200201
title: Text("Section ${i + 1}",
201202
style: TextStyle(
202203
color: Theme.of(context).colorScheme.onPrimaryContainer))));
@@ -211,7 +212,9 @@ class WideItem extends StatelessWidget {
211212

212213
@override
213214
Widget build(BuildContext context) {
214-
return ListTile(title: Text("Item ${i + 1}.${j + 1}"));
215+
return ListTile(
216+
onTap: () {}, // nop, but non-null so the ink splash appears
217+
title: Text("Item ${i + 1}.${j + 1}"));
215218
}
216219
}
217220

0 commit comments

Comments
 (0)