esysberlin / esys-flutter-share

A Flutter plugin for sharing files & text with other applications.
Apache License 2.0
130 stars 147 forks source link

dev(ios): fix constraints for iPad #58

Open tianhaoz95 opened 4 years ago

tianhaoz95 commented 4 years ago

iPad, unlike the iPhone, will not use the width of the screen as the width of the popover window for sharing.

Instead, it requires the user to provide a location for its popover to originate.

The plugin currently doesn't supply an iPad with any constraint which will cause it to fail silently on some devices and crash on others.

This change allows the user to pass in an optional Rect object from Flutter to specify where the popover should locate.

DiaconescuCosta commented 3 years ago

Thank you, confirming that fix constraint for iPad pull request work on my iPad simulator and real device. The only issue on Ipad simulator i'm getting the PopoverLocation in the right down corner, on a real device(Ipad) i get it on top left corner.