[Request]: Allow uri + text together in ShareParams (for iOS support)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start by inspecting share_plus's ShareParams validation and its platform implementations, then trace how iOS passes activity items to UIActivityViewController. Confirm that iOS accepts both text and uri, decide how non-iOS platforms should handle the pair, and update tests or documentation to show the completed platform behavior.
Written by the indexing model from the issue text.
Description
Plugin
share_plus
Use case
Current Behavior
await SharePlus.instance.share(
ShareParams(
text: 'Check this out!'
uri: Uri.parse(
'https://example.com/page/123'
),
),
Results in
Invalid argument(s): uri and text cannot be provided at the same time
I see this restriction was added in https://github.com/fluttercommunity/plus_plugins/pull/3404#discussion_r2048771496 as a deliberate design choice. The discussion mentions being open to revisiting based on feedback :)
Feature request
I want to share a URL with a custom pre-filled message. Such that if a user clicks "iMessage" the custom text will be appended underneath the rich link preview.
iOS supports this natively - you just pass both to UIActivityViewController:
UIActivityViewController(activityItems: ["Check this out!", url], applicationActivities: nil)
Proposal
Remove the restriction so iOS and make the small native code change for iOS to work. I've tested it and it works with minimal changes.
For non-iOS functionality (e.g. Android Intent.EXTRA_TEXT only has one slot ), we could either:
- Fall back to uri-only
- Concatenate them
- Document the platform difference
- Dominant language
- Dart
- Stars
- 1.9k
- Forks
- 1.3k
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 16
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fluttercommunity/plus_plugins
-
bug triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
fluttercommunity/plus_plugins#3994 ·
Maintainers usually reply within 1 day
-
[package_info_plus]: Use Flutter's compile-time build name/number on web instead of version.jsonOpen
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
fluttercommunity/plus_plugins#3989 ·
Maintainers usually reply within 1 day
-
enhancement triage
Difficulty 4/5 3-5 days Newbie friendliness 55/100
fluttercommunity/plus_plugins#3976 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
fluttercommunity/plus_plugins#3974 · 1 reaction ·
Maintainers usually reply within 1 day
-
enhancement triage
Difficulty 5/5 Over a week Newbie friendliness 48/100
fluttercommunity/plus_plugins#3973 ·
Maintainers usually reply within 1 day
All issues in fluttercommunity/plus_plugins
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
openfoodfacts/smooth-app#7817 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
lollipopkit/flutter_server_box#1627 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
status: needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
a2ui-project/a2ui#2957 ·
Maintainers usually reply within 2 days