fix(location): add sharePositionOrigin for iPad share

This commit is contained in:
2026-04-21 17:59:08 +02:00
parent a400fef77d
commit d470ed470a

View File

@@ -237,7 +237,13 @@ class _LocationMapState extends ConsumerState<LocationMap>
unawaited(ref.read(sfTrackingProvider).legacyLocationShared());
Share.share(text.toString().trim());
final box = context.findRenderObject() as RenderBox?;
Share.share(
text.toString().trim(),
sharePositionOrigin: box != null
? box.localToGlobal(Offset.zero) & box.size
: Rect.zero,
);
}
Future<void> _updateFrequency(int frequency) async {