Skip to content

Conversation

@little-alei
Copy link
Contributor

@little-alei little-alei commented Jun 23, 2025

Description

Sometimes, when the text is long or the content is particularly important, a Showcase may want a longer default display time than the autoPlayDelay provided by the ShowcaseWidget. Therefore, an autoPlayDelay feature has been added to Showcase.

Checklist

  • The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

Copy link
Collaborator

@aditya-css aditya-css left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for creating this PR.
Can you please address the comments I added and also include this PR link in the changelog?

Comment on lines 3 to 5
formatter:
page_width: 80

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this. This won't work for the lowest flutter version supported by the package.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, because I set the default width of dart formatting to be 100, I didn't want to break your original formatting when saving the file, so I added this rule. Now I have undone it.

_cancelTimer();
_timer = Timer(autoPlayDelay, () => next(force: true));
// Showcase is first.
final config = _getCurrentActiveControllers[_activeWidgetId!];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list returned by _getCurrentActiveControllers is different from the _ids list so _activeWidgetId can't be used to index it.

Here, you can use the first controller from the list.

Suggested change
final config = _getCurrentActiveControllers[_activeWidgetId!];
final config = _getCurrentActiveControllers.firstOrNull;

PS: The list is to support multiple showcase at the same time and in such case, the package takes config of the first widget.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your guidance. I have finished processing it.

@little-alei little-alei requested a review from aditya-css June 25, 2025 04:03
@little-alei little-alei reopened this Jun 25, 2025
@aditya-css aditya-css merged commit 9757786 into SimformSolutionsPvtLtd:master Jun 25, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants