Skip to content

Add sharing functionality for text, markdown, and PDF formats - #59

Merged
adeeteya merged 2 commits into
masterfrom
share
Apr 13, 2026
Merged

adeeteya merged 2 commits into
masterfrom
share

Conversation

@adeeteya

Copy link
Copy Markdown
Owner

This pull request adds a new "Share" feature to the application, allowing users to share their document as plain text, Markdown, or PDF. It introduces the share_plus package for cross-platform sharing, updates the UI to include a "Share" menu item, and adds the necessary localization strings. The implementation also refactors PDF generation for better code reuse and updates platform plugin registrants to support sharing on desktop platforms.

New Feature: Share Functionality

  • Added a "Share" menu item to the UI, allowing users to share their document as plain text, Markdown, or PDF, with a dialog to select the format. [1] [2] [3]
  • Implemented the _share method in _HomeState, handling format selection, file creation, and invoking share_plus for sharing.

Dependency and Platform Integration

  • Added share_plus and path_provider as dependencies in pubspec.yaml and imported them where necessary. [1] [2]
  • Registered share_plus plugins for macOS and Windows in their respective generated files to enable desktop sharing. [1] [2] [3]

Localization

  • Added localization strings for the new sharing feature, including menu labels and dialog options, to app_en.arb.

Code Refactoring

  • Refactored PDF generation into a separate _generatePdfBytes method to enable reuse for both printing and sharing. [1] [2] [3]

Fixes #37

@adeeteya adeeteya self-assigned this Apr 13, 2026
@adeeteya
adeeteya merged commit e4fb26d into master Apr 13, 2026
1 check passed
@adeeteya
adeeteya deleted the share branch April 13, 2026 12:40
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.

Feature Request: Share Button

1 participant