Skip to content

Commit e8effb2

Browse files
committed
🩹Fix: Updated README.md. and demo
1 parent 648efac commit e8effb2

File tree

3 files changed

+16
-37
lines changed

3 files changed

+16
-37
lines changed

README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ A Flutter package allows you to Showcase/Highlight your widgets step by step.
1111

1212
![The example app running in Android](https://raw.githubusercontent.com/SimformSolutionsPvtLtd/flutter_showcaseview/master/preview/showcaseview.gif)
1313

14-
## Migration guide for release 4.0.0
14+
## Migration guide for release 4.0.0 (unreleased)
1515

1616
Renamed parameters `titleAlignment` to `titleTextAlign` and `descriptionAlignment`
1717
to `descriptionTextAlign` to correspond it more with the TextAlign property.`titleAlignment`
@@ -236,14 +236,6 @@ WidgetsBinding.instance.addPostFrameCallback((_) =>
236236
| position | TooltipActionPosition? | TooltipActionPosition.inside | Position of tooltip actionbar (inside, outside) |
237237
| gapBetweenContentAndAction | double? | 10 | Gap between tooltip content and actionbar |
238238

239-
## Properties of `ActionButtonIcon` and `ActionButtonIcon.withImageIcon`:
240-
241-
| Name | Type | Default Behaviour | Description | `ActionButtonIcon` | `ActionButtonIcon.withImageIcon` |
242-
|---------|-------------|-------------------|------------------------------------|--------------------|----------------------------------|
243-
| icon | Icon | | Provide a icon to the button || |
244-
| icon | ImageIcon | | Provide a image icon to the button | ||
245-
| padding | EdgeInsets? | | Give padding to the icon |||
246-
247239
## How to use
248240

249241
Check out the **example** app in the [example](example) directory or the 'Example' tab on pub.dartlang.org for a more complete example.

example/lib/main.dart

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,9 @@ class _MailPageState extends State<MailPage> {
266266
TooltipActionButton(
267267
backgroundColor: Colors.transparent,
268268
type: TooltipDefaultActionType.previous,
269+
padding: EdgeInsets.symmetric(
270+
vertical: 4,
271+
),
269272
textStyle: TextStyle(
270273
color: Colors.white,
271274
),
@@ -332,7 +335,7 @@ class _MailPageState extends State<MailPage> {
332335
key: _lastShowcaseWidget,
333336
title: 'Compose Mail',
334337
description: 'Click here to compose mail',
335-
targetShapeBorder: const CircleBorder(),
338+
targetBorderRadius: const BorderRadius.all(Radius.circular(16)),
336339
showArrow: false,
337340
tooltipActions: [
338341
TooltipActionButton(
@@ -535,41 +538,25 @@ class MailTile extends StatelessWidget {
535538
Showcase.withWidget(
536539
key: showCaseKey!,
537540
height: 50,
538-
width: 140,
541+
width: 150,
539542
tooltipActionConfig: const TooltipActionConfig(
540-
alignment: MainAxisAlignment.center,
543+
alignment: MainAxisAlignment.spaceBetween,
541544
crossAxisAlignment: CrossAxisAlignment.center,
542545
actionGap: 16,
543546
),
544-
tooltipActions: [
545-
const TooltipActionButton(
546-
backgroundColor: Colors.transparent,
547+
tooltipActions: const [
548+
TooltipActionButton(
547549
type: TooltipDefaultActionType.previous,
548-
padding: EdgeInsets.zero,
550+
name: 'Back',
549551
textStyle: TextStyle(
550552
color: Colors.white,
551553
),
552554
),
553-
TooltipActionButton.custom(
554-
button: InkWell(
555-
onTap: () => ShowCaseWidget.of(context).next(),
556-
child: Container(
557-
decoration: BoxDecoration(
558-
color: Colors.pink,
559-
borderRadius: BorderRadius.circular(16),
560-
border: Border.all(
561-
color: Colors.white,
562-
width: 2,
563-
),
564-
),
565-
padding: const EdgeInsets.all(8),
566-
child: const Text(
567-
'Next',
568-
style: TextStyle(
569-
color: Colors.white,
570-
),
571-
),
572-
),
555+
TooltipActionButton(
556+
type: TooltipDefaultActionType.skip,
557+
name: 'Close',
558+
textStyle: TextStyle(
559+
color: Colors.white,
573560
),
574561
),
575562
],
@@ -585,7 +572,7 @@ class MailTile extends StatelessWidget {
585572
Radius.circular(15),
586573
),
587574
),
588-
width: 140,
575+
width: 150,
589576
child: Column(
590577
crossAxisAlignment: CrossAxisAlignment.start,
591578
children: <Widget>[

preview/showcaseview.gif

604 KB
Loading

0 commit comments

Comments
 (0)