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

feat: Add support for onTapDown and onTapUp #534

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

tilucasoli
Copy link
Collaborator

@tilucasoli tilucasoli commented Nov 28, 2024

Related issue

#533

Description

This pull request introduces support for styling widgets during the Tap Down and Tap Up events by incorporating these concepts as variants.

Style(
  $box.height(100),
  $box.width(100),
  $box.color.red(),
  $on.tap(
    (OnTapEvent event) => switch (event) {
      OnTapEvent.down => Style($box.color.blue()),
      OnTapEvent.up => Style($box.color.green()),
    },
  ),
)

Changes

The main components of these changes are the PressEvent (enum) and the PressEventMixWidgetState (inherited widget). The enum value is held by PressEventMixWidgetState and is updated each time an onTap event occurs.

Review Checklist

  • Testing: Have you tested your changes, including unit tests and integration tests for affected code?
  • Breaking Changes: Does this change introduce breaking changes affecting existing code or users?
  • Documentation Updates: Are all relevant documentation files (e.g. README, API docs) updated to reflect the changes in this PR?
  • Website Updates: Is the website containing the updates you make on documentation?

Additional Information (optional)

  • A unit test needed revision, as now an active longPress indicates that press is also active.

Copy link

vercel bot commented Nov 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
mix-docs ⬜️ Ignored (Inspect) Visit Preview Dec 3, 2024 3:11pm

@github-actions github-actions bot added the mix label Nov 28, 2024
@tilucasoli tilucasoli changed the title WIP: Add support for onTapDown and onTapUp feat: Add support for onTapDown and onTapUp Dec 2, 2024
@tilucasoli tilucasoli marked this pull request as ready for review December 3, 2024 15:15
@tilucasoli tilucasoli linked an issue Dec 3, 2024 that may be closed by this pull request
6 tasks
@tilucasoli tilucasoli requested a review from leoafarias December 3, 2024 16:16
@github-actions github-actions bot added documentation Improvements or additions to documentation repo labels Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation mix repo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Support for onTapDown
1 participant