createTutorialOverlayIfNotExists function

void createTutorialOverlayIfNotExists({
  1. required String tagName,
  2. required BuildContext context,
  3. bool enableHolesAnimation = true,
  4. bool enableAnimationRepeat = true,
  5. double defaultPadding = 4,
  6. List<WidgetData> widgetsData = const [],
  7. Function? onTap,
  8. Color? bgColor,
  9. Widget? description,
  10. int highlightCount = 3,
  11. int animationMilliseconds = 150,
  12. int animationRepeatDelayMilliseconds = 3000,
  13. bool isOverlayBgTransparent = false,
})

Implementation

void createTutorialOverlayIfNotExists({
  required String tagName,
  required BuildContext context,
  bool enableHolesAnimation = true,
  bool enableAnimationRepeat = true,
  double defaultPadding = 4,
  List<WidgetData> widgetsData = const [],
  Function? onTap,
  Color? bgColor,
  Widget? description,
  int highlightCount = 3,
  int animationMilliseconds = 150,
  int animationRepeatDelayMilliseconds = 3000,
  bool isOverlayBgTransparent = false,
}) {
  if (!_overlays.containsKey(tagName)) {
    createTutorialOverlay(
      context: context,
      tagName: tagName,
      enableHolesAnimation: enableHolesAnimation,
      enableAnimationRepeat: enableAnimationRepeat,
      defaultPadding: defaultPadding,
      widgetsData: widgetsData,
      onTap: onTap,
      bgColor: bgColor,
      description: description,
      highlightCount: highlightCount,
      animationMilliseconds: animationMilliseconds,
      animationRepeatDelayMilliseconds: animationRepeatDelayMilliseconds,
      isOverlayBgTransparent: isOverlayBgTransparent,
    );
  }
}