Open fwmd7 opened 4 years ago
Same here
I think I resolved my issue by providing Rect: WidgetPosition shareButtonPosition = WidgetPosition.fromContext(shareButtonKey.currentContext);
Widget position class from https://www.didierboelens.com/2018/09/reactive-button/
I tried to use flutter_reactive_button but I am seeing this error because I am using bloc 2.0.0
Because flutter_reactive_button >=1.1.0 depends on rxdart ^0.21.0 and bloc 2.0.0 depends on rxdart ^0.22.0, flutter_reactive_button >=1.1.0 is incompatible with bloc 2.0.0.
And because no versions of bloc match >2.0.0 <3.0.0, flutter_reactive_button >=1.1.0 is incompatible with bloc ^2.0.0.
So, because min_support depends on both bloc ^2.0.0 and flutter_reactive_button ^1.1.0, version solving failed.
That wasnt what ive suggested
On Fri, 28 Feb 2020 at 4:36 PM, kennedykok notifications@github.com wrote:
I tried to use flutter_reactive_button but I am seeing this error because I am using bloc 2.0.0
Because flutter_reactive_button >=1.1.0 depends on rxdart ^0.21.0 and bloc 2.0.0 depends on rxdart ^0.22.0, flutter_reactive_button >=1.1.0 is incompatible with bloc 2.0.0.
And because no versions of bloc match >2.0.0 <3.0.0, flutter_reactive_button >=1.1.0 is incompatible with bloc ^2.0.0.
So, because min_support depends on both bloc ^2.0.0 and flutter_reactive_button ^1.1.0, version solving failed.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/zhouteng0217/ShareExtend/issues/24?email_source=notifications&email_token=AL73D4IDQTJ2ZPUSBKMKVDTRFCBFBA5CNFSM4K4UUMM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENG3UEA#issuecomment-592296464, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL73D4NMHKJDOBG2V7NTY2TRFCBFBANCNFSM4K4UUMMQ .
Here is how I got around it, based on @rdev-software's suggestion. Provide it a rect for sharePositionOrigin.
ShareExtend.share(backup.path, "file", sharePositionOrigin: Rect.fromCenter(center: Offset.fromDirection(100), width: 200, height: 200), sharePanelTitle: AppLocalizations.of(context).translate("backup"));
Except @kennedykok that is incorrect. As you should provide origin from your "button" or label or any widget. So I said that you can use that tutorial.
So in essence you will provide GlobalKey to your widget -> then pass its context to class -> get Rect -> provide rect to ShareExtend plugin
So what is the final solution to this?
@rignaneseleo You can add sharePositionOrigin param to work on the ipad. Just like below
ShareExtend.share(path, "image",
sharePositionOrigin: Rect.fromLTWH(0, 0, 100, 100));
And I had set a default popover point on the new version 1.1.7. You can try the new version and don't need sharePositionOrigin param.
@rignaneseleo You can add sharePositionOrigin param to work on the ipad. Just like below
ShareExtend.share(path, "image", sharePositionOrigin: Rect.fromLTWH(0, 0, 100, 100));
And I had set a default popover point on the new version 1.1.7. You can try the new version and don't need sharePositionOrigin param.
share_extend ^1.1.7 which doesn't match any versions, version solving failed.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. ( "<NSLayoutConstraint:0x600000fefed0 LPLinkView:0x7fa278633570.leading == UILayoutGuide:0x6000015bbb80'UIViewLayoutMarginsGuide'.leading (active)>", "<NSLayoutConstraint:0x600000fee440 H:[LPLinkView:0x7fa278633570]-(59)-| (active, names: '|':_UIActivityContentTitleView:0x7fa278447c90 )>", "<NSLayoutConstraint:0x600000f832f0 H:|-(0)-[_UIActivityContentTitleView:0x7fa278447c90] (active, names: '|':_UINavigationBarContentView:0x7fa2785611b0 )>", "<NSLayoutConstraint:0x600000f81b30 _UIActivityContentTitleView:0x7fa278447c90.trailing == _UINavigationBarContentView:0x7fa2785611b0.trailing (active)>", "<NSLayoutConstraint:0x600000feac60 'UIView-Encapsulated-Layout-Width' _UINavigationBarContentView:0x7fa2785611b0.width == 6 (active)>", "<NSLayoutConstraint:0x600000fefde0 'UIView-leftMargin-guide-constraint' H:|-(16)-UILayoutGuide:0x6000015bbb80'UIViewLayoutMarginsGuide' (active, names: '|':_UIActivityContentTitleView:0x7fa278447c90 )>" )
Will attempt to recover by breaking constraint <NSLayoutConstraint:0x600000fefed0 LPLinkView:0x7fa278633570.leading == UILayoutGuide:0x6000015bbb80'UIViewLayoutMarginsGuide'.leading (active)>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.