Skip to content

[Request]: share_plus refactor #3403

Closed

Description

@miquelbeltran

Plugin

share_plus

Use case

Currently, the SharePlus class entry point has three major problems:

  • Functionality to share content is divided in three methods, this difficult implementing new features and leads to code duplication across these three.
  • Share functions have parameter creep, as functionality grows and more optional/named parameters are added. It is not clear what are all parameters doing (e.g. subject)
  • The SharePlus class exposes static methods, and it is not instantiable, this makes mocking/faking more difficult.

Proposal

  1. Unify the three methods into one.
  2. Create a ShareParams class with multiple share parameters (this class should be serializable so it can be passed to the native layer as well), and document those parameters.
  3. Make SharePlus instantiable and expose a singleton instance, so devs can choose how to use it.
  4. Expose old static methods with @deprecated annotation, so public API remains the same.

Related issues

Activity

  1. locked as resolved and limited conversation to collaborators on Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

allenhancementNew feature or requestshare_plusFeature, Enhancement, Bug Fixes for Share Plus Plugin

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions