-
Notifications
You must be signed in to change notification settings - Fork 310
ui: Include a tooltip
with all our IconButton
s
#98
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -373,8 +373,15 @@ class _PasswordLoginPageState extends State<PasswordLoginPage> { | |
decoration: InputDecoration( | ||
labelText: 'Password', | ||
helperText: kLayoutPinningHelperText, | ||
suffixIcon: Semantics(label: 'Hide password', toggled: _obscurePassword, | ||
// TODO(material-3): Simplify away `Semantics` by using IconButton's | ||
// M3-only params `isSelected` / `selectedIcon`, after fixing | ||
// https://github.com/flutter/flutter/issues/127145 . (Also, the | ||
// `Semantics` seen here would misbehave in M3 for reasons | ||
// involving a `Semantics` with `container: true` in an underlying | ||
// [ButtonStyleButton].) | ||
Comment on lines
+378
to
+381
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there an issue to link to for this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good thought, but no, I don't think so. The change in behavior with M3 surprised me, but I haven't yet decided what upstream bug, if any, causes this Here are some observations about what happens if I set
If I copy this chunk of code (the one beginning with |
||
suffixIcon: Semantics(toggled: _obscurePassword, | ||
child: IconButton( | ||
tooltip: 'Hide password', | ||
onPressed: _handlePasswordVisibilityPress, | ||
icon: _obscurePassword | ||
? const Icon(Icons.visibility_off) | ||
|
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.
Cool, good to have reported this. Looks like that issue was assigned just today, so hopefully will get fixed soon.