DescribedFeatureOverlay constructor

const DescribedFeatureOverlay({
  1. Key? key,
  2. required String featureId,
  3. required Widget tapTarget,
  4. Color? backgroundColor,
  5. Color targetColor = Colors.white,
  6. Color textColor = Colors.white,
  7. Widget? title,
  8. Widget? description,
  9. required Widget child,
  10. Future<bool> onOpen()?,
  11. Future<bool> onComplete()?,
  12. Future<bool> onDismiss()?,
  13. ContentLocation contentLocation = ContentLocation.trivial,
  14. bool enablePulsingAnimation = true,
  15. bool allowShowingDuplicate = false,
  16. OverflowMode overflowMode = OverflowMode.ignore,
  17. double backgroundOpacity = kDefaultBackgroundOpacity,
  18. Duration openDuration = const Duration(milliseconds: 250),
  19. Duration pulseDuration = const Duration(milliseconds: 1000),
  20. Duration completeDuration = const Duration(milliseconds: 250),
  21. Duration dismissDuration = const Duration(milliseconds: 250),
  22. bool barrierDismissible = true,
  23. bool backgroundDismissible = false,
  24. Future<bool> onBackgroundTap()?,
})

Implementation

const DescribedFeatureOverlay({
  Key? key,
  required this.featureId,
  required this.tapTarget,
  this.backgroundColor,
  this.targetColor = Colors.white,
  this.textColor = Colors.white,
  this.title,
  this.description,
  required this.child,
  this.onOpen,
  this.onComplete,
  this.onDismiss,
  this.contentLocation = ContentLocation.trivial,
  this.enablePulsingAnimation = true,
  this.allowShowingDuplicate = false,
  this.overflowMode = OverflowMode.ignore,
  this.backgroundOpacity = kDefaultBackgroundOpacity,
  this.openDuration = const Duration(milliseconds: 250),
  this.pulseDuration = const Duration(milliseconds: 1000),
  this.completeDuration = const Duration(milliseconds: 250),
  this.dismissDuration = const Duration(milliseconds: 250),
  this.barrierDismissible = true,
  this.backgroundDismissible = false,
  this.onBackgroundTap,
})  : assert(
        barrierDismissible == true || onDismiss == null,
        'Cannot provide both a barrierDismissible and onDismiss function\n'
        'The onDismiss function will never get executed when barrierDismissible is set to false.',
      ),
      super(key: key);