Skip to content

Conversation

@autorejecttop
Copy link
Contributor

Description of what this PR is changing or adding, and why:
groupValue and onChanged parameter in Radio widget is deprecated after v3.32.0-0.0.pre

Issues fixed by this PR (if any):
None

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

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.

`groupValue` and `onChanged` parameter in `Radio` is deprecated after v3.32.0-0.0.pre
@autorejecttop autorejecttop requested review from a team and sfshaza2 as code owners November 13, 2025 07:04
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @autorejecttop, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request updates the implementation of radio buttons in a user input example to align with recent Flutter API changes. It migrates the radio button group management from individual Radio widgets to the dedicated RadioGroup widget, which is now the recommended approach due to deprecations. This change ensures the code remains up-to-date and follows best practices for handling user input with radio buttons.

Highlights

  • API Deprecation Handling: The pull request addresses the deprecation of groupValue and onChanged parameters directly within the Radio widget, which occurred after v3.32.0-0.0.pre.
  • Refactor to RadioGroup: The existing Radio widgets have been refactored to be enclosed within a RadioGroup widget, centralizing the groupValue and onChanged logic for a set of radio buttons.
  • Simplified Radio Widget Usage: Individual Radio widgets now only require their value property, as the group management is handled by the parent RadioGroup.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

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 correctly refactors the radio button example to use the new RadioGroup widget, aligning with recent API changes in Flutter. The implementation is clear and effectively demonstrates the current best practice for creating groups of radio buttons. I've added one minor stylistic suggestion to improve code formatting consistency.

@sfshaza2
Copy link
Contributor

/gcbrun

@flutter-website-bot
Copy link
Collaborator

flutter-website-bot commented Nov 13, 2025

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

https://flutter-docs-prod--pr12679-patch-3-6igzigw9.web.app

Copy link
Member

@parlough parlough 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 working on updating this!

The code change looks good to me, but the introduction text needs at least a few updates to match.

Here's some minimal suggestions to update it:

@parlough parlough assigned autorejecttop and unassigned parlough Nov 16, 2025
autorejecttop and others added 2 commits November 17, 2025 06:31
- Fixing documentation text to include `RadioGroup`

Co-authored-by: Parker Lougheed <parlough@gmail.com>
- Forgot to include this one in the previous commit
- Fixed documentation text to include `RadioGroup`
@parlough
Copy link
Member

/gcbrun

Copy link
Member

@parlough parlough 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 making those adjustments and for the thoughtful rewording. Looks good to me!

@parlough parlough merged commit e6d5bce into flutter:main Nov 17, 2025
9 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.

4 participants