Add documentation for the secondary button (#164555)
<!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> In this PR, I've added extra comments about what the Secondary Button is, and in what cases it can be activated. Issue https://github.com/flutter/flutter/issues/123049 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Darien Romero <darien.romero@pucp.edu.pe>
This commit is contained in:
committed by
GitHub
parent
d0ef1c1f86
commit
d7f06363cc
@@ -365,18 +365,36 @@ class InkResponse extends StatelessWidget {
|
||||
final GestureLongPressCallback? onLongPress;
|
||||
|
||||
/// Called when the user taps this part of the material with a secondary button.
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [kSecondaryButton], the button this callback responds to.
|
||||
final GestureTapCallback? onSecondaryTap;
|
||||
|
||||
/// Called when the user taps down on this part of the material with a
|
||||
/// secondary button.
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [kSecondaryButton], the button this callback responds to.
|
||||
final GestureTapDownCallback? onSecondaryTapDown;
|
||||
|
||||
/// Called when the user releases a secondary button tap that was started on
|
||||
/// this part of the material. [onSecondaryTap] is called immediately after.
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [onSecondaryTap], a handler triggered right after this one that doesn't
|
||||
/// pass any details about the tap.
|
||||
/// * [kSecondaryButton], the button this callback responds to.
|
||||
final GestureTapUpCallback? onSecondaryTapUp;
|
||||
|
||||
/// Called when the user cancels a secondary button tap that was started on
|
||||
/// this part of the material.
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [kSecondaryButton], the button this callback responds to.
|
||||
final GestureTapCallback? onSecondaryTapCancel;
|
||||
|
||||
/// Called when this part of the material either becomes highlighted or stops
|
||||
|
||||
Reference in New Issue
Block a user