Share not working on iPAD
Share is working on iphone but not on ipad. I don't see a specific configuration that needs to be added to the iPad build so does the plugin not support ipad?
Hi my friend!
It must be positioned via the "sharePositionOrigin" parameter.
Example:
sharePositionOrigin: Rect.fromLTWH(10, 10, 10, 10),
static shareLink(BuildContext context, String url,
{String? message, String? subject}) async {
final RenderBox? box = context.findRenderObject() as RenderBox?;
await Share.share(message!,
sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size);
}
I am also facing this problem I have this code and it is not working in iPad
Finally I fixed it
static shareLink(BuildContext context, {String? message}) async {
Size size = MediaQuery.of(context).size;
Share.share(
message!,
sharePositionOrigin: Rect.fromLTWH(0, 0, size.width, size.height / 2),
);
}
From this reference for ipad issue https://github.com/flutter/flutter/issues/47220#issuecomment-608453383
Наконец-то я это исправил
static shareLink(BuildContext context, {String? message}) async { Size size = MediaQuery.of(context).size; Share.share( message!, sharePositionOrigin: Rect.fromLTWH(0, 0, size.width, size.height / 2), ); }Из этой ссылки для ipad выпуск flutter/flutter#47220 (комментарий)
Right It worked for me when explicitly specifying the location of the element.

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
documentation has been updated: https://github.com/fluttercommunity/plus_plugins/pull/898
I'm faced same issue with layout - Xcode console, says that this is Constraints bug, so I've fixed it with this code
sharePositionOrigin: Rect.fromLTWH(
box.size.width.toDouble(),
box.size.height.toDouble() / 1.6,
10,
10,
),
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