Showcase class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- Showcase
Constructors
-
Showcase.new({required GlobalKey<
State< key, required String? description, required Widget child, String? title, TextAlign titleTextAlign = TextAlign.start, TextAlign descriptionTextAlign = TextAlign.start, AlignmentGeometry titleAlignment = Alignment.center, AlignmentGeometry descriptionAlignment = Alignment.center, ShapeBorder targetShapeBorder = const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(8))), Color overlayColor = Colors.black45, double overlayOpacity = 0.75, TextStyle? titleTextStyle, TextStyle? descTextStyle, Color tooltipBackgroundColor = Colors.white, Color textColor = Colors.black, Widget scrollLoadingWidget = const CircularProgressIndicator(valueColor: AlwaysStoppedAnimation(Colors.white)), bool showArrow = true, VoidCallback? onTargetClick, bool? disposeOnTap, Duration movingAnimationDuration = const Duration(milliseconds: 2000), bool? disableMovingAnimation, bool? disableScaleAnimation, EdgeInsets tooltipPadding = const EdgeInsets.symmetric(vertical: 8, horizontal: 8), VoidCallback? onToolTipClick, EdgeInsets targetPadding = EdgeInsets.zero, double? blurValue, BorderRadius? targetBorderRadius, VoidCallback? onTargetLongPress, VoidCallback? onTargetDoubleTap, BorderRadius? tooltipBorderRadius, bool disableDefaultTargetGestures = false, Duration scaleAnimationDuration = const Duration(milliseconds: 300), Curve scaleAnimationCurve = Curves.easeIn, Alignment? scaleAnimationAlignment, TooltipPosition? tooltipPosition, EdgeInsets? titlePadding, EdgeInsets? descriptionPadding, TextDirection? titleTextDirection, TextDirection? descriptionTextDirection, VoidCallback? onBarrierClick, bool disableBarrierInteraction = false, double toolTipSlideEndDistance = 7, double toolTipMargin = 14, List<StatefulWidget> >TooltipActionButton> ? tooltipActions, TooltipActionConfig? tooltipActionConfig, double scrollAlignment = 0.5, bool? enableAutoScroll, FloatingActionWidget? floatingActionWidget}) -
Highlights a specific widget on the screen with an informative tooltip.
const
-
Showcase.withWidget({required GlobalKey<
State< key, required double? height, required double? width, required Widget? container, required Widget child, FloatingActionWidget? floatingActionWidget, ShapeBorder targetShapeBorder = const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(8))), Color overlayColor = Colors.black45, BorderRadius? targetBorderRadius, double overlayOpacity = 0.75, Widget scrollLoadingWidget = const CircularProgressIndicator(valueColor: AlwaysStoppedAnimation(Colors.white)), VoidCallback? onTargetClick, bool? disposeOnTap, Duration movingAnimationDuration = const Duration(milliseconds: 2000), bool? disableMovingAnimation, EdgeInsets targetPadding = EdgeInsets.zero, double? blurValue, VoidCallback? onTargetLongPress, VoidCallback? onTargetDoubleTap, bool disableDefaultTargetGestures = false, TooltipPosition? tooltipPosition, VoidCallback? onBarrierClick, bool disableBarrierInteraction = false, double toolTipSlideEndDistance = 7, List<StatefulWidget> >TooltipActionButton> ? tooltipActions, TooltipActionConfig? tooltipActionConfig, double scrollAlignment = 0.5, bool? enableAutoScroll}) -
Creates a Showcase widget with a custom tooltip widget.
const
Properties
- blurValue → double?
-
Defines blur value.
This will blur the background while displaying showcase.
final
- child → Widget
-
Target widget that will be showcased or highlighted
final
- container → Widget?
-
Custom tooltip widget when Showcase.withWidget is used.
final
- description → String?
-
Represents summary description of target widget
final
- descriptionAlignment → AlignmentGeometry
-
Description widget alignment within tooltip widget
final
- descriptionPadding → EdgeInsets?
-
Provides padding around the description. Default padding is zero.
final
- descriptionTextAlign → TextAlign
-
Description text alignment with in tooltip widget
final
- descriptionTextDirection → TextDirection?
-
Provides text direction of tooltip description.
final
- descTextStyle → TextStyle?
-
TextStyle for default tooltip description
final
- disableBarrierInteraction → bool
-
Disables barrier interaction for a particular showCase.
final
- disableDefaultTargetGestures → bool
-
if
disableDefaultTargetGestures
parameter is true onTargetClick, onTargetDoubleTap, onTargetLongPress and disposeOnTap parameter will not workfinal - disableMovingAnimation → bool?
-
Whether tooltip should have bouncing animation while showcasing
final
- disableScaleAnimation → bool?
-
Whether disabling initial scale animation for default tooltip when
showcase is started and completed
final
- disposeOnTap → bool?
-
Will dispose all showcases if tapped on target widget or tooltip
final
- enableAutoScroll → bool?
-
While target widget is out viewport then
whether enabling auto scroll so as to make the target widget visible.
This is used to override the ShowCaseWidget.enableAutoScroll behaviour
for this showcase.
final
- floatingActionWidget → FloatingActionWidget?
-
Custom static floating action widget to show a static widget anywhere
on the screen
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Height of container
final
-
key
→ GlobalKey<
State< StatefulWidget> > -
A key that is unique across the entire app.
final
- movingAnimationDuration → Duration
-
The duration of time the bouncing animation of tooltip should last.
final
- onBarrierClick → VoidCallback?
-
Provides a callback when barrier has been clicked.
final
- onTargetClick → VoidCallback?
-
Triggered when showcased target widget is tapped
final
- onTargetDoubleTap → VoidCallback?
-
Triggered when target has been double tapped
final
- onTargetLongPress → VoidCallback?
-
Triggered when target has been long pressed.
final
- onToolTipClick → VoidCallback?
-
Triggered when default tooltip is tapped
final
- overlayColor → Color
-
Background color of overlay during showcase.
final
- overlayOpacity → double
-
Opacity apply on overlayColor (which ranges from 0.0 to 1.0)
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scaleAnimationAlignment → Alignment?
-
An alignment to origin of initial tooltip animation.
final
- scaleAnimationCurve → Curve
-
The curve to be used for initial animation of tooltip.
final
- scaleAnimationDuration → Duration
-
A duration for animation which is going to played when
tooltip comes first time in the view.
final
- scrollAlignment → double
-
Defines the alignment for the auto scroll function.
final
- scrollLoadingWidget → Widget
-
If enableAutoScroll is sets to
true
, this widget will be shown above the overlay until the target widget is visible in the viewport.final - showArrow → bool
-
Whether the default tooltip will have arrow to point out the target widget.
final
- targetBorderRadius → BorderRadius?
-
Radius of rectangle box while target widget is being showcased.
final
- targetPadding → EdgeInsets
-
Padding around target widget
final
- targetShapeBorder → ShapeBorder
-
ShapeBorder of the highlighted box when target widget will be showcased.
final
- textColor → Color
-
Defines text color of default tooltip when titleTextStyle and
descTextStyle is not provided.
final
- title → String?
-
Represents subject line of target widget
final
- titleAlignment → AlignmentGeometry
-
Title widget alignment within tooltip widget
final
- titlePadding → EdgeInsets?
-
Provides padding around the title. Default padding is zero.
final
- titleTextAlign → TextAlign
-
Title text alignment with in tooltip widget
final
- titleTextDirection → TextDirection?
-
Provides text direction of tooltip title.
final
- titleTextStyle → TextStyle?
-
TextStyle for default tooltip title
final
- tooltipActionConfig → TooltipActionConfig?
-
Provide a configuration for tooltip action widget like alignment,
position, gap, etc...
final
-
tooltipActions
→ List<
TooltipActionButton> ? -
Provides toolTip action widgets at bottom in tooltip.
final
- tooltipBackgroundColor → Color
-
Defines background color for tooltip widget.
final
- tooltipBorderRadius → BorderRadius?
-
Border Radius of default tooltip
final
- toolTipMargin → double
-
Defines the margin for the tooltip.
Which is from 0 to toolTipSlideEndDistance.
final
- tooltipPadding → EdgeInsets
-
Empty space around tooltip content.
final
- tooltipPosition → TooltipPosition?
-
Defines vertical position of tooltip respective to Target widget
final
- toolTipSlideEndDistance → double
-
Defines motion range for tooltip slide animation.
Which is from 0 to toolTipSlideEndDistance.
final
- width → double?
-
Width of container
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< Showcase> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited