-
Notifications
You must be signed in to change notification settings - Fork 28.7k
🌟 [Proposal][ListTile]: Add WidgetStatesController for interactive state management 🌟 #166651
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
base: master
Are you sure you want to change the base?
🌟 [Proposal][ListTile]: Add WidgetStatesController for interactive state management 🌟 #166651
Conversation
/// {@template flutter.material.inkwell.statesController} | ||
/// Represents the interactive "state" of this widget in terms of | ||
/// a set of [WidgetState]s, like [WidgetState.pressed] and | ||
/// [WidgetState.focused]. | ||
/// | ||
/// Classes based on this one can provide their own | ||
/// [WidgetStatesController] to which they've added listeners. | ||
/// They can also update the controller's [WidgetStatesController.value] | ||
/// however, this may only be done when it's safe to call | ||
/// [State.setState], like in an event handler. | ||
/// {@endtemplate} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To copy that documentation, you'd just have to do this
/// {@template flutter.material.inkwell.statesController} | |
/// Represents the interactive "state" of this widget in terms of | |
/// a set of [WidgetState]s, like [WidgetState.pressed] and | |
/// [WidgetState.focused]. | |
/// | |
/// Classes based on this one can provide their own | |
/// [WidgetStatesController] to which they've added listeners. | |
/// They can also update the controller's [WidgetStatesController.value] | |
/// however, this may only be done when it's safe to call | |
/// [State.setState], like in an event handler. | |
/// {@endtemplate} | |
/// {@macro flutter.material.inkwell.statesController} |
This contribution requires additional scrutiny, see #161506 (comment). |
This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
Greetings from stale PR triage! 👋 |
This PR adds support for WidgetStatesController in ListTile, enabling developers to track and respond to the widget's interactive states through an external controller.
resolves issue: #166611