-
Notifications
You must be signed in to change notification settings - Fork 456
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: 🐛 Fixed ToolTip Slide Transition #369
Conversation
lib/src/tooltip_widget.dart
Outdated
@@ -589,3 +590,18 @@ class _Arrow extends CustomPainter { | |||
oldDelegate.strokeWidth != strokeWidth; | |||
} | |||
} | |||
|
|||
class ToolTipSlideTransition extends AnimatedWidget { |
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 is getting very big now, can you please saparate code in multiple files.
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.
Done
92e21f5
to
06b81e4
Compare
lib/src/tooltip_widget.dart
Outdated
: const Offset(0.0, 0.100), | ||
begin: const Offset(0.0, 0.0), | ||
end: Offset( | ||
0.0, widget.movingEndDistance * contentOffsetMultiplier), |
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.
Add comma
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.
Done
lib/src/tooltip_widget.dart
Outdated
top: paddingTop, | ||
), | ||
padding: | ||
EdgeInsets.only(top: paddingTop, bottom: paddingBottom), |
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.
^^
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.
Done
06b81e4
to
668338a
Compare
lib/src/tooltip_widget.dart
Outdated
end: const Offset(0.0, 0.100), | ||
begin: const Offset(0.0, 0.0), | ||
end: Offset( | ||
0.0, widget.movingEndDistance * contentOffsetMultiplier), |
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.
Please reformat this for better readability
64f8423
to
4ef1d97
Compare
lib/src/showcase.dart
Outdated
@@ -247,6 +247,13 @@ class Showcase extends StatefulWidget { | |||
/// Disables barrier interaction for a particular showCase. | |||
final bool disableBarrierInteraction; | |||
|
|||
/// Define End distance of tooltip position when tooltip is moving. |
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.
Please improve wording.
lib/src/showcase.dart
Outdated
@@ -247,6 +247,13 @@ class Showcase extends StatefulWidget { | |||
/// Disables barrier interaction for a particular showCase. | |||
final bool disableBarrierInteraction; | |||
|
|||
/// Define End distance of tooltip position when tooltip is moving. | |||
/// | |||
/// Which is from 0 to movingEndDistance (positive) |
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.
Please mention it as the motion range for tooltip slide animation.
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.
Also, since it is mentioned positive here, please check with negative value and add assertion of the polarity if positive value is absolutely required.
lib/src/showcase.dart
Outdated
@@ -292,6 +299,7 @@ class Showcase extends StatefulWidget { | |||
this.descriptionTextDirection, | |||
this.onBarrierClick, | |||
this.disableBarrierInteraction = false, | |||
this.toolTipSlideEndDistance = 7.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.
You can omit the .0
.
lib/src/tooltip_widget.dart
Outdated
end: !widget.showArrow && !isArrowUp | ||
? const Offset(0.0, 0.0) | ||
: const Offset(0.0, 0.100), | ||
begin: const Offset(0.0, 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.
You can use Offset.zero
here.
|
||
@override | ||
Widget build(BuildContext context) => | ||
Transform.translate(offset: _progress.value, child: child); |
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.
Please improve format for better readability.
|
||
final Widget child; | ||
|
||
Animation<Offset> get _progress => listenable as Animation<Offset>; |
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.
Since this variable is only used in the build method, you can create it there only instead of this getter.
e76f490
to
abdcd00
Compare
abdcd00
to
9cc8ebe
Compare
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.
Lgtm
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.
LGTM!
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.
LGTM
- Added `toolTipSlideEndDistance` to define motion range for tooltip slide animation. - Added `ToolTipSlideTransition` widget and removed `SlideTransition` to fix sliding range issue because before sliding range is increasing as child's size increase
9cc8ebe
to
ca27e7f
Compare
Description
Fixed ToolTip Slide Transition
toolTipSlideEndDistance
to define motion range for tooltip slide animation.ToolTipSlideTransition
widget and removedSlideTransition
to fix the sliding range issue because before sliding range increased as child's size increasedChecklist
fix:
,feat:
,docs:
etc).docs
and added dartdoc comments with///
.examples
ordocs
.Breaking Change?
Related Issues