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

Backspace onLongPress callback added #178

Merged

Conversation

vedasjad
Copy link
Contributor

@vedasjad vedasjad commented Dec 15, 2023

Summary

This pull request introduces an improvement to the behavior of the backspace button. The original implementation required multiple taps to delete multiple characters at a time, and this update ensures continuous deletion when the user presses and holds the backspace button. Also deletes word by word after 3 seconds have passed since backspace is pressed.

Changes Made

  1. GestureDetector Update: Wrapped the IconButton in GestureDetector and added a timer. Now, continuous backspace deletion occurs while the user's finger is on the backspace button.

Testing

  • Verified that the backspace button triggers continuous deletion when the user presses and holds the button.
  • Ensured that deletion stops when the user lifts their finger from the backspace button.
  • The UI is exactly similar as before.

Here's the example video :
https://github.com/Fintasys/emoji_picker_flutter/assets/96325125/c5177e47-e47e-4ef5-82a7-29d149b144a3

@Fintasys
Copy link
Owner

@vedasjad Thank you for your great contribution! The implementation overall looks good IMO. The CI is still failing due to

info • The line length exceeds the 80-character limit • lib/src/default_emoji_picker_view.dart:231:81 • lines_longer_than_80_chars

If you could fix this issue I'm think we can merge it 👍

@vedasjad
Copy link
Contributor Author

I've reduced the line length as instructed.
Please, see if now it passes all the tests.

@Fintasys Fintasys merged commit b505861 into Fintasys:master Jan 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants