Skip to content

Be consistent about callback parameter names for tapping/pressing something #17407

@alanrussian

Description

@alanrussian

Some widgets use onPressed and others use onTap. I find two issues here:

  • The name is inconsistent.
  • The tense is inconsistent.

This makes it (very slightly) more difficult to use these widgets.

Is there a preferred naming convention for these callbacks?

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: qualityA truly polished experiencec: API breakBackwards-incompatible API changesframeworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions