@@ -25,6 +25,7 @@ import 'dart:async';
2525import 'package:flutter/foundation.dart' ;
2626import 'package:flutter/material.dart' ;
2727
28+ import '../constants.dart' ;
2829import '../enum.dart' ;
2930import '../get_position.dart' ;
3031import '../models/linked_showcase_data.dart' ;
@@ -66,6 +67,11 @@ class Showcase extends StatefulWidget {
6667 final ShapeBorder targetShapeBorder;
6768
6869 /// Radius of rectangle box while target widget is being showcased.
70+ ///
71+ /// Default value is:
72+ /// ```dart
73+ /// const Radius.circular(3.0),
74+ /// ```
6975 final BorderRadius ? targetBorderRadius;
7076
7177 /// TextStyle for default tooltip title
@@ -425,7 +431,7 @@ class Showcase extends StatefulWidget {
425431 showcaseKey = key,
426432 assert (
427433 overlayOpacity >= 0.0 && overlayOpacity <= 1.0 ,
428- " overlay opacity must be between 0 and 1." ,
434+ ' overlay opacity must be between 0 and 1.' ,
429435 ),
430436 assert (
431437 onTargetClick == null || disposeOnTap != null ,
@@ -499,20 +505,14 @@ class Showcase extends StatefulWidget {
499505 required this .container,
500506 required this .child,
501507 this .floatingActionWidget,
502- this .targetShapeBorder = const RoundedRectangleBorder (
503- borderRadius: BorderRadius .all (
504- Radius .circular (8 ),
505- ),
506- ),
508+ this .targetShapeBorder = Constants .defaultTargetShapeBorder,
507509 this .overlayColor = Colors .black45,
508510 this .targetBorderRadius,
509511 this .overlayOpacity = 0.75 ,
510- this .scrollLoadingWidget = const CircularProgressIndicator (
511- valueColor: AlwaysStoppedAnimation (Colors .white),
512- ),
512+ this .scrollLoadingWidget = Constants .defaultProgressIndicator,
513513 this .onTargetClick,
514514 this .disposeOnTap,
515- this .movingAnimationDuration = const Duration (milliseconds : 2000 ) ,
515+ this .movingAnimationDuration = Constants .defaultAnimationDuration ,
516516 this .disableMovingAnimation,
517517 this .targetPadding = EdgeInsets .zero,
518518 this .blurValue,
@@ -532,7 +532,7 @@ class Showcase extends StatefulWidget {
532532 scaleAnimationDuration = const Duration (milliseconds: 300 ),
533533 scaleAnimationCurve = Curves .decelerate,
534534 scaleAnimationAlignment = null ,
535- disableScaleAnimation = true ,
535+ disableScaleAnimation = null ,
536536 title = null ,
537537 description = null ,
538538 titleTextAlign = TextAlign .start,
@@ -553,7 +553,7 @@ class Showcase extends StatefulWidget {
553553 showcaseKey = key,
554554 assert (
555555 overlayOpacity >= 0.0 && overlayOpacity <= 1.0 ,
556- " overlay opacity must be between 0 and 1." ,
556+ ' overlay opacity must be between 0 and 1.' ,
557557 ),
558558 assert (
559559 onBarrierClick == null || disableBarrierInteraction == false ,
@@ -573,10 +573,6 @@ class _ShowcaseState extends State<Showcase> {
573573 late final showCaseWidgetState = ShowCaseWidget .of (context);
574574 FloatingActionWidget ? _globalFloatingActionWidget;
575575
576- /// This variable will be true if some other showcase is linked with
577- /// this showcase and starts this widget showcase
578- // bool _isLinkedShowCaseStarted = false;
579-
580576 bool get _isCircle => widget.targetShapeBorder is CircleBorder ;
581577
582578 BorderRadius ? get _targetBorderRadius => widget.targetBorderRadius;
@@ -588,7 +584,7 @@ class _ShowcaseState extends State<Showcase> {
588584 super .initState ();
589585 initRootWidget ();
590586 final connectedShowcase =
591- showCaseWidgetState.showcaseController [widget.showcaseKey];
587+ showCaseWidgetState.showcaseControllers [widget.showcaseKey];
592588 showcaseController = ShowcaseController (
593589 showcaseId: connectedShowcase? .length ?? 0 ,
594590 showcaseKey: widget.showcaseKey,
@@ -597,10 +593,10 @@ class _ShowcaseState extends State<Showcase> {
597593 )..startShowcase = startShowcase;
598594
599595 if (connectedShowcase != null ) {
600- showCaseWidgetState.showcaseController [widget.showcaseKey]
596+ showCaseWidgetState.showcaseControllers [widget.showcaseKey]
601597 ? .add (showcaseController);
602598 } else {
603- showCaseWidgetState.showcaseController [widget.showcaseKey] = [
599+ showCaseWidgetState.showcaseControllers [widget.showcaseKey] = [
604600 showcaseController,
605601 ];
606602 }
@@ -614,7 +610,7 @@ class _ShowcaseState extends State<Showcase> {
614610
615611 @override
616612 void dispose () {
617- showCaseWidgetState.showcaseController [widget.showcaseKey]
613+ showCaseWidgetState.showcaseControllers [widget.showcaseKey]
618614 ? .remove (showcaseController);
619615 super .dispose ();
620616 }
0 commit comments