plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

[share_plus] How to handle device rotation? (iPad)

Open saibotma opened this issue 4 years ago • 12 comments

Currently, the share sheet keeps its origin where it was set using the sharePositionOrigin parameter, when the device gets rotated. However, this position is wrong in most cases after a rotation, as it often is the position of a button on screen, which will have a different position when rotated.

Is there a way to update the position after rotation?

saibotma avatar Dec 01 '21 19:12 saibotma

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

github-actions[bot] avatar May 31 '22 15:05 github-actions[bot]

This is not stale.

saibotma avatar May 31 '22 18:05 saibotma

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

github-actions[bot] avatar Aug 30 '22 00:08 github-actions[bot]

This is not stale and also not completed.

saibotma avatar Oct 26 '22 06:10 saibotma

Is there a way to update the position after rotation?

How is this that handled natively on Swift/Objective-C?

miquelbeltran avatar Oct 26 '22 08:10 miquelbeltran

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

github-actions[bot] avatar Jan 26 '23 00:01 github-actions[bot]

Will take a look at this and comment on this issue. The issue ist not stale.

saibotma avatar May 27 '23 13:05 saibotma

On native iOS, the share sheet gets closed and then reopened at the new position after rotation.

https://github.com/fluttercommunity/plus_plugins/assets/26022902/84bf18ee-37c7-40d2-889f-00aa11ef41e5

However, I still have not figured out whether this gets done automatically or if developer have to do this on their own. One could replicate the behaviour using share_plus if share_plus would allow to dismiss/close an already opened share sheet.

Please reopen the issue.

saibotma avatar May 22 '24 08:05 saibotma

I am reopening it and properly tagging it as an enhancement request, not as question (which get closed if stale). Just to keep expectations clear, doesn't mean we will ever work on this, but we are open to review a PR improving this.

miquelbeltran avatar May 22 '24 09:05 miquelbeltran

Note There are multiple options to set the anchor point. As stated here, those are:

  • Using a sourceItem: This might provide the autorotation functionality (did not test), however can not be used with Flutter, obviously.
  • Using a combination of sourceView and sourceRect: Currently used for share plus.

saibotma avatar May 23 '24 14:05 saibotma

Hi, I’m currently experiencing the same issue and noticed that this been open for quite a while without any recent updates. Just checking in to see if there’s been any progress on this?

@saibotma were you able to find any workarounds? 😅 Thanks

ivannatividad avatar Apr 14 '25 01:04 ivannatividad

@ivannatividad Have no workaround.

saibotma avatar Apr 14 '25 16:04 saibotma