Skip to content

Commit 627fcfa

Browse files
committed
Add tooUpdate example to showcase tooltip and clickable feature of highlight group
1 parent f6ba9b9 commit 627fcfa

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

example/lib/main.dart

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,22 @@ class _MyHomePageState extends State<MyHomePage> {
260260
),
261261
HighlightGroup(
262262
dates: [DateTime(2024, 5, 10)],
263-
builder: (context, size) => Container(
264-
width: 10,
265-
height: 10,
266-
color: Colors.blue.withOpacity(0.3),
263+
builder: (context, size) => Tooltip(
264+
message: 'Special Date',
265+
child: InkWell(
266+
onTap: () {
267+
ScaffoldMessenger.of(context).showSnackBar(
268+
const SnackBar(
269+
content: Text('Special Date Tapped!'),
270+
),
271+
);
272+
},
273+
child: Container(
274+
width: 10,
275+
height: 10,
276+
color: Colors.blue.withOpacity(0.3),
277+
),
278+
),
267279
),
268280
),
269281
],

0 commit comments

Comments
 (0)