Skip to content
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

Add documentation for the secondary button #164555

Merged

Conversation

DarienRomero
Copy link
Contributor

In this PR, I've added extra comments about what the Secondary Button is, and in what cases it can be activated. Issue #123049

Pre-launch Checklist

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Mar 4, 2025
@DarienRomero
Copy link
Contributor Author

@TahaTesser can you please check the pr u.u I would love to make more improvements if needed.

@TahaTesser TahaTesser requested review from bleroux and TahaTesser March 6, 2025 22:18
Comment on lines 369 to 370
/// The secondary button is typically accessed using the right mouse
/// button on desktop platforms such as Windows, macOS, and Linux.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/// The secondary button is typically accessed using the right mouse
/// button on desktop platforms such as Windows, macOS, and Linux.
/// The secondary button is typically accessed using the right mouse
/// button on desktop platforms such as Windows, macOS, and Linux.

If it's a mouse button, it does't necessarily only for Windows, macOS, and Linux. You can connect mouse to other devices.

According to some Google search, the secondary button is the right mouse button for right-handed users and left mouse button for the left-handed users.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for suggestion! I'm sending changes

Comment on lines 368 to 372
///
/// The secondary button is a mouse button that can be configured
/// based on the user's system settings. By default, it is the
/// right button for right-handed users and the left button for
/// left-handed users.
Copy link
Contributor

Choose a reason for hiding this comment

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

The secondary button is an abstraction not specific to mouse.
See https://api.flutter.dev/flutter/gestures/kSecondaryButton-constant.html which explains how it maps to stylus and mouse.

Copy link
Contributor Author

@DarienRomero DarienRomero Mar 17, 2025

Choose a reason for hiding this comment

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

Thanks for suggestion. To avoid own reinterpretation of the secondary button, I'm sending new documentation that references kSecondaryButton in a similar way to how the GestureDetector docs do.

Copy link
Contributor

@bleroux bleroux left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@TahaTesser TahaTesser left a comment

Choose a reason for hiding this comment

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

LGTM

@TahaTesser TahaTesser added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 18, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Mar 18, 2025
Merged via the queue into flutter:master with commit d7f0636 Mar 18, 2025
74 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 18, 2025
@DarienRomero DarienRomero deleted the 123049_add-extra-info-secondary-button branch March 18, 2025 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

3 participants