Skip to content

Add toggleable attribute to Radio #53846

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 2, 2020

Conversation

gspencergoog
Copy link
Contributor

@gspencergoog gspencergoog commented Apr 2, 2020

Description

This adds a new toggleable attribute to the Radio widget. This allows a radio group to be set back to an indeterminate state if the selected radio button is selected again.

Related Issues

Tests

  • Added test of the new functionality,

Examples

  • Added a new dartpad example showing the behavior.

Breaking Change

  • No, this is not a breaking change.

@gspencergoog gspencergoog added the framework flutter/packages/flutter repository. See also f: labels. label Apr 2, 2020
@gspencergoog gspencergoog requested a review from HansMuller April 2, 2020 18:51
@fluttergithubbot fluttergithubbot added the f: material design flutter/packages/flutter/material repository. label Apr 2, 2020
Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

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

LGTM

/// The default is false.
///
/// {@tool dartpad --template=stateful_widget_scaffold}
/// This example shows how a radio button can be allowed to be toggled off by
Copy link
Contributor

Choose a reason for hiding this comment

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

shows how to enable deselecting a radio button by setting the...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

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

Still LGTM :-)

@gspencergoog gspencergoog merged commit a8b3d1b into flutter:master Apr 2, 2020
@gspencergoog gspencergoog deleted the toggleable_radio branch April 2, 2020 22:40
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support tri-state radio buttons
4 participants