Fintasys / emoji_picker_flutter

A Flutter package that provides an Emoji picker widget with 1500+ emojis in 8 categories.
MIT License
154 stars 114 forks source link

Backspace onLongPress callback added #178

Closed vedasjad closed 5 months ago

vedasjad commented 6 months ago

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

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

Fintasys commented 6 months ago

@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 commented 5 months ago

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