@@ -39,7 +39,7 @@ class MyApp extends StatelessWidget {
39
39
builder: (context) => const MailPage (),
40
40
globalTooltipActionConfig: const TooltipActionConfig (
41
41
position: TooltipActionPosition .inside,
42
- alignment: TooltipActionAlignment .spread ,
42
+ alignment: MainAxisAlignment .spaceBetween ,
43
43
),
44
44
),
45
45
),
@@ -186,7 +186,7 @@ class _MailPageState extends State<MailPage> {
186
186
debugPrint ('Barrier clicked' ),
187
187
tooltipActionConfig:
188
188
const TooltipActionConfig (
189
- alignment: TooltipActionAlignment .right ,
189
+ alignment: MainAxisAlignment .end ,
190
190
position: TooltipActionPosition .outside,
191
191
gapBetweenContentAndAction: 10 ,
192
192
),
@@ -236,7 +236,20 @@ class _MailPageState extends State<MailPage> {
236
236
"Tap to see profile which contains user's name, profile picture, mobile number and country" ,
237
237
tooltipBackgroundColor: Theme .of (context).primaryColor,
238
238
textColor: Colors .white,
239
+ onTargetClick: () {
240
+ print ('target cliecked' );
241
+ },
242
+ disposeOnTap: false ,
243
+ onToolTipClick: () {
244
+ print ('clicked tool tip' );
245
+ },
246
+ disableDefaultTargetGestures: true ,
239
247
targetShapeBorder: const CircleBorder (),
248
+ tooltipActionConfig: const TooltipActionConfig (
249
+ alignment: MainAxisAlignment .spaceBetween,
250
+ gapBetweenContentAndAction: 10 ,
251
+ position: TooltipActionPosition .outside,
252
+ ),
240
253
tooltipActions: [
241
254
TooltipActionButton .withDefault (
242
255
backgroundColor: Colors .transparent,
@@ -249,7 +262,7 @@ class _MailPageState extends State<MailPage> {
249
262
textStyle: const TextStyle (
250
263
color: Colors .pinkAccent,
251
264
),
252
- )
265
+ ),
253
266
],
254
267
child: Container (
255
268
padding: const EdgeInsets .all (5 ),
@@ -308,8 +321,8 @@ class _MailPageState extends State<MailPage> {
308
321
targetShapeBorder: const CircleBorder (),
309
322
showArrow: false ,
310
323
tooltipActionConfig: const TooltipActionConfig (
311
- alignment: TooltipActionAlignment .spread ,
312
- actionGap: 15 ,
324
+ alignment: MainAxisAlignment .spaceBetween ,
325
+ actionGap: 12 ,
313
326
),
314
327
tooltipActions: [
315
328
TooltipActionButton .withDefault (
@@ -324,7 +337,7 @@ class _MailPageState extends State<MailPage> {
324
337
color: Colors .pink,
325
338
)),
326
339
TooltipActionButton .withDefault (
327
- type: TooltipDefaultActionType .next ,
340
+ type: TooltipDefaultActionType .skip ,
328
341
name: 'Close' ,
329
342
tailIcon: const ActionButtonIcon .withIcon (
330
343
icon: Icon (
@@ -333,10 +346,6 @@ class _MailPageState extends State<MailPage> {
333
346
size: 15 ,
334
347
),
335
348
),
336
- onTap: () {
337
- // Write your code on button tap
338
- ShowCaseWidget .of (context).next ();
339
- },
340
349
),
341
350
],
342
351
child: FloatingActionButton (
@@ -375,8 +384,37 @@ class _MailPageState extends State<MailPage> {
375
384
child: Showcase (
376
385
key: key,
377
386
description: 'Tap to check mail' ,
378
- tooltipPosition: TooltipPosition .top,
379
387
disposeOnTap: true ,
388
+ tooltipActionConfig: const TooltipActionConfig (
389
+ alignment: MainAxisAlignment .spaceBetween,
390
+ actionGap: 15 ,
391
+ position: TooltipActionPosition .outside,
392
+ gapBetweenContentAndAction: 16 ,
393
+ ),
394
+ tooltipActions: [
395
+ TooltipActionButton .withDefault (
396
+ type: TooltipDefaultActionType .previous,
397
+ name: 'Back' ,
398
+ onTap: () {
399
+ // Write your code on button tap
400
+ ShowCaseWidget .of (context).previous ();
401
+ },
402
+ backgroundColor: Colors .pink.shade50,
403
+ textStyle: const TextStyle (
404
+ color: Colors .pink,
405
+ )),
406
+ TooltipActionButton .withDefault (
407
+ type: TooltipDefaultActionType .skip,
408
+ name: 'Close' ,
409
+ tailIcon: const ActionButtonIcon .withIcon (
410
+ icon: Icon (
411
+ Icons .close,
412
+ color: Colors .white,
413
+ size: 15 ,
414
+ ),
415
+ ),
416
+ ),
417
+ ],
380
418
onTargetClick: () {
381
419
Navigator .push <void >(
382
420
context,
@@ -475,6 +513,24 @@ class MailTile extends StatelessWidget {
475
513
key: showCaseKey! ,
476
514
height: 50 ,
477
515
width: 140 ,
516
+ tooltipActionConfig: const TooltipActionConfig (
517
+ alignment: MainAxisAlignment .center,
518
+ crossAxisAlignment: CrossAxisAlignment .center,
519
+ ),
520
+ tooltipActions: [
521
+ TooltipActionButton .withDefault (
522
+ backgroundColor: Colors .transparent,
523
+ type: TooltipDefaultActionType .previous,
524
+ padding: EdgeInsets .zero,
525
+ ),
526
+ TooltipActionButton .withDefault (
527
+ type: TooltipDefaultActionType .next,
528
+ backgroundColor: Colors .white,
529
+ textStyle: const TextStyle (
530
+ color: Colors .pinkAccent,
531
+ ),
532
+ ),
533
+ ],
478
534
targetShapeBorder: const CircleBorder (),
479
535
targetBorderRadius: const BorderRadius .all (
480
536
Radius .circular (150 ),
0 commit comments