Skip to content

Fix and improve code samples#13312

Open
alexandersandberg wants to merge 1 commit intoflutter:mainfrom
alexandersandberg:patch-1
Open

Fix and improve code samples#13312
alexandersandberg wants to merge 1 commit intoflutter:mainfrom
alexandersandberg:patch-1

Conversation

@alexandersandberg
Copy link
Copy Markdown

@alexandersandberg alexandersandberg commented Apr 27, 2026

Description of what this PR is changing or adding, and why:

  • Fixed "Styling buttons" SwiftUI code sample
  • Fixed inconsistent indentation in code samples

Issues fixed by this PR (if any):

PRs or commits this PR depends on (if any):

Presubmit checklist

  • If you are unwilling, or unable, to sign the CLA, even for a tiny, one-word PR, please file an issue instead of a PR.
  • If this PR is not meant to land until a future stable release, mark it as draft with an explanation.
  • This PR follows the Google Developer Documentation Style Guidelines—for example, it doesn't use i.e. or e.g., and it avoids I and we (first-person pronouns).
  • This PR uses semantic line breaks
    of 80 characters or fewer.

@alexandersandberg alexandersandberg requested review from a team and sfshaza2 as code owners April 27, 2026 16:29
Copy link
Copy Markdown
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 standardizes the indentation of SwiftUI code snippets in the documentation to a 2-space format and corrects a syntax error in a button example. A review comment suggests adding a .padding() modifier to the button styling example to ensure parity with the corresponding Flutter example and recommends indenting view modifiers for consistency with other sections.

Comment thread src/content/flutter-for/swiftui-devs.md
@sfshaza2 sfshaza2 requested a review from redbrogdon April 28, 2026 03:49
@sfshaza2
Copy link
Copy Markdown
Contributor

/gcbrun

@flutter-website-bot
Copy link
Copy Markdown
Collaborator

Visit the preview URL for this PR (updated for commit beb2cb2):

https://flutter-docs-prod--pr13312-patch-1-h1lm5hoo.web.app

Copy link
Copy Markdown
Contributor

@redbrogdon redbrogdon left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for tidying it up.

The bit about padding is weird. I'd argue that rather than adding it to the Swift code we should remove it from the Flutter example, since AFAICT it's not part of the point they're making about colors.

Either way, it's nothing this PR needs to address.

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.

4 participants