feat: ✨Add staticContainer into ToolTipWidget for a custom tooltip th…#396
Conversation
|
I need to integrate a skip button and I don't want to rely on custom buttons for now if this is going to be implemented. This was opened 7 months ago. Any plan to merge this soon? |
|
@aditya-css any update? |
|
Is it possible to add it for the Showcase() constructor too ? (when container is null) |
|
any update on this PR? |
8a55dac to
f2d362e
Compare
716860e to
e612eb9
Compare
aditya-css
left a comment
There was a problem hiding this comment.
Please also consider providing an option to disable the global floating action widget for particular showcase.
There was a problem hiding this comment.
Please update for globalFloatingActionWidget as well.
| child: ElevatedButton( | ||
| style: ButtonStyle( | ||
| backgroundColor: MaterialStateProperty.all<Color>( | ||
| Theme.of(context).primaryColor), | ||
| shape: MaterialStateProperty.all< | ||
| RoundedRectangleBorder>( | ||
| RoundedRectangleBorder( | ||
| borderRadius: BorderRadius.circular(18.0), | ||
| side: BorderSide( | ||
| color: Theme.of(context).primaryColor, | ||
| width: 2.0, | ||
| ), | ||
| ), | ||
| ), | ||
| ), |
There was a problem hiding this comment.
Please keep this minimal.
| double? left; | ||
| double? right; |
There was a problem hiding this comment.
Please have default values.
bff83f1 to
1e054f1
Compare
lib/src/showcase.dart
Outdated
| descTextStyle: widget.descTextStyle, | ||
| container: widget.container, | ||
| floatingActionWidget: widget.floatingActionWidget ?? | ||
| showCaseWidgetState.globalFloatingActionWidget?.call(context), |
There was a problem hiding this comment.
Please take this as late class member as to avoid calling this function over and over again.
lib/src/showcase_widget.dart
Outdated
| /// Return a [widget.globalFloatingActionWidget] if not need to hide this for | ||
| /// current showcase | ||
| FloatingActionWidget Function(BuildContext)? get globalFloatingActionWidget => | ||
| widget.hideFloatingActionWidgetForShowcase.contains(ids![activeWidgetId!]) |
There was a problem hiding this comment.
Please avoid force null checks.
lib/src/tooltip_widget.dart
Outdated
| ), | ||
| ); | ||
|
|
||
| if (widget.floatingActionWidget != null) { |
There was a problem hiding this comment.
Please prefer positive condition.
lib/src/showcase_widget.dart
Outdated
|
|
||
| /// Return a [widget.globalFloatingActionWidget] if not need to hide this for | ||
| /// current showcase | ||
| FloatingActionWidget Function(BuildContext)? get globalFloatingActionWidget => |
e0a2d12 to
7dfee8b
Compare
example/lib/main.dart
Outdated
| child: Padding( | ||
| padding: const EdgeInsets.all(16.0), | ||
| child: ElevatedButton( | ||
| onPressed: () => ShowCaseWidget.of(showcaseContext).dismiss(), |
5db4ffd to
0ea94f5
Compare
lib/src/showcase_widget.dart
Outdated
| /// This Stores keys of showcase for which we will hide the | ||
| /// [globalFloatingActionWidget]. | ||
| late var _hideFloatingWidgetKeys = { | ||
| for (var item in widget.hideFloatingActionWidgetForShowcase) item: true |
There was a problem hiding this comment.
Please make this final.
lib/src/showcase_widget.dart
Outdated
|
|
||
| bool get isShowCaseCompleted => ids == null && activeWidgetId == null; | ||
|
|
||
| List<GlobalKey> get hideFloatingActionWidgetForShowcase => |
There was a problem hiding this comment.
Please rename this as to make it differ from the function.
lib/src/showcase_widget.dart
Outdated
| void hideFloatingActionWidgetForKeys( | ||
| List<GlobalKey> updatedList, | ||
| ) { | ||
| _hideFloatingWidgetKeys = {for (var item in updatedList) item: true}; |
There was a problem hiding this comment.
Please make this final.
da37b4e to
b55f5cf
Compare
|
Any update? Changes is already approved 😄 |
b55f5cf to
e939ff9
Compare
…at can be placed anywhere on screen and is not affected by the animation Signed-off-by: Michael Angelo Cadavillo <[email protected]>
…oatingAction Widget for the default showcase widget
e939ff9 to
a87ab7f
Compare
related: feat: ✨Add staticContainer into ToolTipWidget for a custom tooltip that can be placed anywhere on screen and is not affected by the animation SimformSolutionsPvtLtd#396 feat: ✨Add staticContainer into ToolTipWidget for a custom tooltip that can be placed anywhere on screen and is not affected by the animation MichaelCadavillo@c1eb606
feat: ✨Provided a parameter to add a static widget which can be placed anywhere on the screen and is not affected by the animation.
Description
Implemented a
FloatingActionWidgetto show static widget at any place on the screen. Primarily used for when we want to show another widget (perhaps a 'Skip Showcases' button) which is not affected by the animation that is given to the tooltip.We have also added a directional constructor for the use cases where directionality is important.
Checklist
fix:,feat:,docs:etc).docsand added dartdoc comments with///.examplesordocs.Breaking Change?
Related Issues
Closes #395
Sample implementation
Screen_recording_20241203_180104.webm