@@ -35,6 +35,7 @@ import 'shape_clipper.dart';
3535import 'showcase_widget.dart' ;
3636import 'tooltip_action_button_widget.dart' ;
3737import 'tooltip_widget.dart' ;
38+ import 'widget/floating_action_widget.dart' ;
3839
3940class Showcase extends StatefulWidget {
4041 /// A key that is unique across the entire app.
@@ -96,8 +97,9 @@ class Showcase extends StatefulWidget {
9697 /// Custom tooltip widget when [Showcase.withWidget] is used.
9798 final Widget ? container;
9899
99- /// Custom static tooltip widget when [Showcase.withWidget] is used.
100- final Widget ? staticContainer;
100+ /// Custom static floating action widget to show a static widget anywhere
101+ /// on the screen
102+ final FloatingActionWidget ? floatingActionWidget;
101103
102104 /// Defines background color for tooltip widget.
103105 ///
@@ -418,10 +420,10 @@ class Showcase extends StatefulWidget {
418420 this .tooltipActionConfig,
419421 this .scrollAlignment = 0.5 ,
420422 this .enableAutoScroll,
423+ this .floatingActionWidget,
421424 }) : height = null ,
422425 width = null ,
423426 container = null ,
424- staticContainer = null ,
425427 assert (overlayOpacity >= 0.0 && overlayOpacity <= 1.0 ,
426428 "overlay opacity must be between 0 and 1." ),
427429 assert (onTargetClick == null || disposeOnTap != null ,
@@ -471,6 +473,7 @@ class Showcase extends StatefulWidget {
471473 /// - `toolTipSlideEndDistance` : The distance the tooltip slides in from the edge of the screen (defaults to 7dp).
472474 /// - `tooltipActions` : A list of custom actions (widgets) to display within the tooltip.
473475 /// - `tooltipActionConfig` : Configuration options for custom tooltip actions.
476+ /// - `floatingActionWidget` : Custom static floating action widget to show a static widget anywhere
474477 ///
475478 /// **Differences from default constructor:**
476479 ///
@@ -488,7 +491,7 @@ class Showcase extends StatefulWidget {
488491 required this .width,
489492 required this .container,
490493 required this .child,
491- this .staticContainer ,
494+ this .floatingActionWidget ,
492495 this .targetShapeBorder = const RoundedRectangleBorder (
493496 borderRadius: BorderRadius .all (
494497 Radius .circular (8 ),
@@ -791,7 +794,8 @@ class _ShowcaseState extends State<Showcase> {
791794 titleTextStyle: widget.titleTextStyle,
792795 descTextStyle: widget.descTextStyle,
793796 container: widget.container,
794- staticContainer: widget.staticContainer,
797+ floatingActionWidget: widget.floatingActionWidget ??
798+ showCaseWidgetState.widget.globalFloatingActionWidget,
795799 tooltipBackgroundColor: widget.tooltipBackgroundColor,
796800 textColor: widget.textColor,
797801 showArrow: widget.showArrow,
0 commit comments