-
Notifications
You must be signed in to change notification settings - Fork 438
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
feat: ❇️ Provide tooltip action buttons #466
base: master
Are you sure you want to change the base?
Conversation
3507ecb
to
2408212
Compare
- Added `toolTipAction` parameter in `Showcase` which is used to get action widget configuration and defaults to `null` - Added `DefaultToolTipActionWidget` class for default tooltip action widgets
- Added `ToolTipActionButton` class for tooltip action buttons
34cb40f
to
685adf3
Compare
@@ -1,500 +0,0 @@ | |||
// !$*UTF8*$! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file should not be changed.
## [4.0.0] | ||
|
||
- Feature ✨: Added Action widget for tooltip | ||
|
||
## [3.0.1] | ||
|
||
- Feature [#475](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/475) - Add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we haven't released 3.0.1 so please add a changelog of that release in 4.0.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
example/lib/main.dart
Outdated
@@ -221,7 +236,34 @@ class _MailPageState extends State<MailPage> { | |||
"Tap to see profile which contains user's name, profile picture, mobile number and country", | |||
tooltipBackgroundColor: Theme.of(context).primaryColor, | |||
textColor: Colors.white, | |||
onTargetClick: () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove unrelated changes from this PR.
example/lib/main.dart
Outdated
backgroundColor: Colors.pink.shade50, | ||
textStyle: const TextStyle( | ||
color: Colors.pink, | ||
)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format the code.
lib/src/showcase.dart
Outdated
@@ -26,11 +26,10 @@ import 'dart:ui'; | |||
import 'package:flutter/foundation.dart'; | |||
import 'package:flutter/material.dart'; | |||
|
|||
import 'enum.dart'; | |||
import '../showcaseview.dart'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason for this import?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No particular reason for this import; it just reduces the number of other imports needed.
Removing this and adding individual file imports.
lib/src/showcase.dart
Outdated
@@ -299,12 +309,14 @@ class Showcase extends StatefulWidget { | |||
this.tooltipPosition, | |||
this.titlePadding, | |||
this.descriptionPadding, | |||
this.tooltipActions, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put action and config together in constructor
lib/src/showcase.dart
Outdated
: widget.tooltipActions ?? []; | ||
|
||
final actionWidgets = <Widget>[]; | ||
for (var action = 0; action < actionData.length; action++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should use for in loop
lib/src/showcase.dart
Outdated
), | ||
], | ||
], | ||
); | ||
} | ||
|
||
List<Widget> _getTooltipActions() { | ||
final showCaseState = ShowCaseWidget.of(context); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use context check before this
lib/src/showcase.dart
Outdated
), | ||
child: TooltipActionButtonWidget( | ||
config: actionData[action], | ||
showCaseState: ShowCaseWidget.of(context), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to pass this state? We can access it directly from the widget.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8434d67
to
3e9f6de
Compare
3e9f6de
to
f2180b7
Compare
Description
This PR allows us to provide the list of tooltip action button with configurations.
Checklist
fix:
,feat:
,docs:
etc).docs
and added dartdoc comments with///
.examples
ordocs
.Breaking Change?