Skip to content

Conversation

@flutteractionsbot
Copy link

@flutteractionsbot flutteractionsbot commented Nov 4, 2025

This pull request is created by automatic cherry pick workflow
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

Issue Link:

What is the link to the issue this cherry-pick is addressing?

#177948

Changelog Description:

Explain this cherry pick in one line that is accessible to most Flutter developers. See best practices for examples

Add additional analytics for flutter widget-preview start

Impact Description:

What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)

Analytics collected for flutter widget-preview start won't give an accurate representation of usage as IDE plugins will start launching the widget previewer by default. This will result in widget-preview analytics effectively tracking the number of IDE users rather than actual usage of the widget previewer.

Workaround:

Is there a workaround for this issue?

No

Risk:

What is the risk level of this cherry-pick?

  • Low
  • Medium
  • High

Test Coverage:

Are you confident that your fix is well-tested by automated tests?

  • Yes
  • No

Validation Steps:

What are the steps to validate that this fix works?

N/A

…wer is opened (flutter#177949)

With the addition of IDE support, the widget previewer is often started
by default by IDE plugins, even if users don't open the previewer. This
change adds an additional analytics event which is reported once the
widget preview application is loaded and connects to the DTD instance.

Fixes flutter#177948
@flutteractionsbot flutteractionsbot added the cp: review Cherry-picks in the review queue label Nov 4, 2025
@flutter-dashboard
Copy link

This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter.

Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed.

@flutteractionsbot
Copy link
Author

@bkonyi please fill out the PR description above, afterwards the release team will review this request.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Nov 4, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds an analytics event that is reported when the widget previewer is opened. This is achieved by having the widget preview scaffold send a DTD event upon connection, which the Flutter tool listens for and then reports to the analytics service. The changes involve passing the analytics handler to the DTD service, adding the new event logic, and updating tests to accommodate these changes. My review includes a suggestion for adding documentation to new public constants to adhere to the style guide and a comment on refactoring duplicated code in tests to improve maintainability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cp: review Cherry-picks in the review queue tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants