Skip to content

[material_ui] Migrate Dialog, AlertDialog, and SimpleDialog API doc snippets to {@example} (batch 12) - #13721

Merged
auto-submit[bot] merged 2 commits into
flutter:mainfrom
dkwingsmt:snippet_material_dialog
Nov 23, 2026
Merged

auto-submit[bot] merged 2 commits into
flutter:mainfrom
dkwingsmt:snippet_material_dialog

Conversation

@dkwingsmt

Copy link
Copy Markdown
Contributor

This PR addresses batch 12 of the migration detailed in flutter/flutter#188530 (comment).

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Nov 19, 2026
@github-actions github-actions Bot added p: material_ui triage-design Should be looked at in design triage labels Nov 19, 2026

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

Copy link
Copy Markdown
Contributor

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 new example files and corresponding tests for the AlertDialog, Dialog, SimpleDialog, and SimpleDialogOption components. It also updates the documentation in packages/material_ui/lib/src/dialog.dart to use the {@example} macro for these snippets. Feedback indicates that the file paths in the {@example} tags should be relative to the package root without a leading slash, and suggests adding a mounted check in the SimpleDialog example to ensure safe handling of asynchronous gaps.

/// )
/// ```
///
/// {@example /example/lib/dialog/alert_dialog.snippet.1.dart#body indent=strip}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The path in the {@example} macro should be relative to the package root and should not start with a leading slash. A leading slash can cause the snippet tool to fail to resolve the file path correctly.

  /// {@example example/lib/dialog/alert_dialog.snippet.1.dart#body indent=strip}

/// child: const Text('Treasury department'),
/// )
/// ```
/// {@example /example/lib/dialog/simple_dialog_option.snippet.0.dart#body indent=strip}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The path in the {@example} macro should be relative to the package root and should not start with a leading slash. A leading slash can cause the snippet tool to fail to resolve the file path correctly.

/// {@example example/lib/dialog/simple_dialog_option.snippet.0.dart#body indent=strip}

@QuncCccccc QuncCccccc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@QuncCccccc QuncCccccc added override: no versioning needed Override the check requiring version bumps for most changes override: no changelog needed Override the check requiring CHANGELOG updates for most changes labels Nov 23, 2026
@dkwingsmt dkwingsmt added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 23, 2026
@auto-submit
auto-submit Bot merged commit 0c85585 into flutter:main Nov 23, 2026
13 checks passed
harryterkelsen pushed a commit to harryterkelsen/flutter that referenced this pull request Nov 24, 2026
…r#197316)

flutter/packages@5b93485...f455dfa

2026-11-24 [email protected] [material_ui]
Add Material 3 Expressive `FilledButton` and Filled Tonal button
(`FilledButton.tonal`) (flutter/packages#13702)
2026-11-24 [email protected] Roll Flutter from
685f4cf to 98744d3 (8 revisions) (flutter/packages#13768)
2026-11-23 [email protected] [material_ui] Migrate Chip
and ChipTheme API doc snippets to {@example} (batch 11)
(flutter/packages#13720)
2026-11-23 [email protected] [material_ui] Migrate
Dialog, AlertDialog, and SimpleDialog API doc snippets to {@example}
(batch 12) (flutter/packages#13721)
2026-11-23 [email protected] [vector_graphics_compiler] Scale
the initial stroke width (flutter/packages#13577)
2026-11-23 [email protected] [in_app_purchase_storekit] Suppress
StoreKit 1 deprecations in imported headers (flutter/packages#13745)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD override: no changelog needed Override the check requiring CHANGELOG updates for most changes override: no versioning needed Override the check requiring version bumps for most changes p: material_ui triage-design Should be looked at in design triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants