Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 🩹 Updated README.md and example app #488

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A Flutter package allows you to Showcase/Highlight your widgets step by step.

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

## Migration guide for release 4.0.0
## Migration guide for release 4.0.0 (unreleased)

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

## Properties of `ActionButtonIcon` and `ActionButtonIcon.withImageIcon`:

| Name | Type | Default Behaviour | Description | `ActionButtonIcon` | `ActionButtonIcon.withImageIcon` |
|---------|-------------|-------------------|------------------------------------|--------------------|----------------------------------|
| icon | Icon | | Provide a icon to the button | ✅ | |
| icon | ImageIcon | | Provide a image icon to the button | | ✅ |
| padding | EdgeInsets? | | Give padding to the icon | ✅ | ✅ |

## How to use

Check out the **example** app in the [example](example) directory or the 'Example' tab on pub.dartlang.org for a more complete example.
Expand Down
43 changes: 15 additions & 28 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ class _MailPageState extends State<MailPage> {
TooltipActionButton(
backgroundColor: Colors.transparent,
type: TooltipDefaultActionType.previous,
padding: EdgeInsets.symmetric(
vertical: 4,
),
textStyle: TextStyle(
color: Colors.white,
),
Expand Down Expand Up @@ -332,7 +335,7 @@ class _MailPageState extends State<MailPage> {
key: _lastShowcaseWidget,
title: 'Compose Mail',
description: 'Click here to compose mail',
targetShapeBorder: const CircleBorder(),
targetBorderRadius: const BorderRadius.all(Radius.circular(16)),
showArrow: false,
tooltipActions: [
TooltipActionButton(
Expand Down Expand Up @@ -535,41 +538,25 @@ class MailTile extends StatelessWidget {
Showcase.withWidget(
key: showCaseKey!,
height: 50,
width: 140,
width: 150,
tooltipActionConfig: const TooltipActionConfig(
alignment: MainAxisAlignment.center,
alignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
actionGap: 16,
),
tooltipActions: [
const TooltipActionButton(
backgroundColor: Colors.transparent,
tooltipActions: const [
TooltipActionButton(
type: TooltipDefaultActionType.previous,
padding: EdgeInsets.zero,
name: 'Back',
textStyle: TextStyle(
color: Colors.white,
),
),
TooltipActionButton.custom(
button: InkWell(
onTap: () => ShowCaseWidget.of(context).next(),
child: Container(
decoration: BoxDecoration(
color: Colors.pink,
borderRadius: BorderRadius.circular(16),
border: Border.all(
color: Colors.white,
width: 2,
),
),
padding: const EdgeInsets.all(8),
child: const Text(
'Next',
style: TextStyle(
color: Colors.white,
),
),
),
TooltipActionButton(
type: TooltipDefaultActionType.skip,
name: 'Close',
textStyle: TextStyle(
color: Colors.white,
),
),
],
Expand All @@ -585,7 +572,7 @@ class MailTile extends StatelessWidget {
Radius.circular(15),
),
),
width: 140,
width: 150,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Expand Down
Binary file modified preview/showcaseview.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.