Closed Dhruv80576 closed 3 weeks ago
This PR fixes an issue with deleting symbols between text by implementing a new deletion handling mechanism in the InlineImageProvider class. The implementation adds cursor management and text manipulation functionality, along with keyboard event handling for backspace operations.
sequenceDiagram
actor User
participant HomeScreen
participant InlineImageProvider
User->>HomeScreen: Press backspace
HomeScreen->>InlineImageProvider: handleDelete()
InlineImageProvider->>InlineImageProvider: Determine start and end
alt Deleting a single character
InlineImageProvider->>InlineImageProvider: Check for placeholder
InlineImageProvider->>InlineImageProvider: deleteInlineImage(start-1, start)
end
InlineImageProvider->>HomeScreen: Update text field
classDiagram
class InlineImageProvider {
+void moveCursorToEnd()
+void deleteInlineImage(int start, int end)
+void handleDelete()
}
note for InlineImageProvider "New methods added for cursor management and deletion handling"
Change | Details | Files |
---|---|---|
Added new text manipulation and cursor management methods to handle symbol deletion |
|
lib/providers/imageprovider.dart |
Enhanced text input field with keyboard event handling |
|
lib/view/homescreen.dart |
Issue | Objective | Addressed | Explanation |
---|---|---|---|
#1068 | Fix the ability to delete symbols from the EditText on homepage | ✅ |
fix #1068 Deleting symbols from between issue resolved now we can delete symbols from between the text also. Please find the video below to verify
https://github.com/user-attachments/assets/ba08ad22-f9d3-4cc2-bc36-1a71a7ba0f18
Summary by Sourcery
Fix the issue with deleting symbols from between text in the inline image provider and enhance the functionality by adding a method to move the cursor to the end of the text.
Bug Fixes:
Enhancements: