Skip to content

Conversation

mutumbakato
Copy link
Collaborator

@mutumbakato mutumbakato commented Aug 20, 2025

This pull request introduces a new feature that allows conditional hiding of the delete button for PDF annotations based on custom data. The implementation covers both Android and iOS platforms, and a new Flutter example demonstrates how to use this feature. The changes include UI logic, platform-specific implementations, and an example for users.

Feature: Hide Delete Button on Annotations

Android Implementation:

  • Added logic in FlutterPdfUiFragment to check annotation custom data for a hideDelete property and hide the delete button in the contextual toolbar if present. [1] [2] [3]

iOS Implementation:

  • Implemented delegate methods in PspdfkitPlatformViewImpl to filter out the delete action from the annotation menu based on the hideDelete custom data property.

Flutter Example:

  • Added a new example (hide_delete_annotation_example.dart) that demonstrates adding protected (non-deletable) and editable (deletable) annotations, and shows how the delete button is conditionally displayed.
  • Registered the new example in the app's example list and navigation logic. [1] [2] [3]

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.

1 participant