Skip to content

Fix unbalanced parens in SwiftUI devs Padding example#13600

Merged
sfshaza2 merged 1 commit into
flutter:mainfrom
meliharik:fix-swiftui-devs-padding-example
Jul 21, 2026
Merged

Fix unbalanced parens in SwiftUI devs Padding example#13600
sfshaza2 merged 1 commit into
flutter:mainfrom
meliharik:fix-swiftui-devs-padding-example

Conversation

@meliharik

Copy link
Copy Markdown
Contributor

The Padding example in the "Flutter for SwiftUI developers" page closes with three parens where the snippet only opens one:

 Padding(                         // <-- This is a Widget
   padding: EdgeInsets.all(10.0), // <-- So is this
   child: Text("Hello, World!"),  // <-- This, too
-)));
+)

EdgeInsets.all(...) and Text(...) are each self-closing on their own line, so Padding( is the only outstanding paren. The block goes from 3 open / 5 close to 3 / 3.

The snippet has no <?code-excerpt?> region, so dash_site analyze-dart doesn't cover it — which is presumably how it survived.

@meliharik
meliharik requested review from a team and sfshaza2 as code owners July 21, 2026 07:28

@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 corrects a syntax error in a Flutter code snippet within the SwiftUI developer documentation by removing extraneous closing parentheses. There are no review comments, and I have no additional feedback to provide.

@sfshaza2 sfshaza2 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.

You are exactly right about how this survived! Our Swift code isn't analyzed. Thanks for catching this!

@sfshaza2

Copy link
Copy Markdown
Contributor

/gcbrun

@flutter-website-bot

Copy link
Copy Markdown
Collaborator

Staged preview of the updated docs.flutter.dev site (updated for commit aa075b5):

https://flutter-docs-prod--docs-pr13600-fix-swiftui-devs-paddi-yryslm94.web.app

@flutter-website-bot

Copy link
Copy Markdown
Collaborator

Staged preview of the updated flutter.dev site (updated for commit aa075b5):

https://flutter-dev-230821--www-pr13600-fix-swiftui-devs-paddi-0khr5v5n.web.app

@sfshaza2
sfshaza2 merged commit 3d92679 into flutter:main Jul 21, 2026
14 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.

3 participants