aarajput / wc_flutter_share

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

it took so much time to open share bottom sheet #1

Closed karansingla007 closed 5 years ago

aarajput commented 5 years ago

Are you talking about android or ios?

karansingla007 commented 5 years ago

android

aarajput commented 5 years ago

Which device are you using?

karansingla007 commented 5 years ago

one plus 7

aarajput commented 5 years ago

Can you share your code here which you are using to share stuff?

karansingla007 commented 5 years ago

GestureDetector( child: IconShare(), onTap: () { print('click share profile'); WcFlutterShare.share( sharePopupTitle: 'Share', text: profileUrl, mimeType: 'text/plain'); }, ),

aarajput commented 5 years ago

Have you tried this on emulator? Because it could be your device issue. Try it on emulator or try restarting your device. This plugin just calls Share intent on android. After that, this intent handles by android O.S.

karansingla007 commented 5 years ago

i tried other device also samsung A20 infinity one plus 6t

aarajput commented 5 years ago

Try to replace your code with this one. And let know the value you see in console for time diff

GestureDetector( child: IconShare(), onTap: () async { print('click share profile'); final startTime = DateTime.now(); print('start time: $startTime'); await WcFlutterShare.share( sharePopupTitle: 'Share', text: profileUrl, mimeType: 'text/plain'); final endTime = DateTime.now(); print('end time: $startTime'); print( 'time diff: ${endTime.millisecond - startTime.millisecond}'); }, ),

karansingla007 commented 5 years ago

i used your code but it is also taking time time diff: 3

aarajput commented 5 years ago

It's taking only 3 milliseconds.

I believe there is an issue with your code. Try cloning this repository and run example on your device and let me know if you are facing same issue. I am trying to figure it out if this issue is related to this plugin or your code.

karansingla007 commented 5 years ago

@aarajput
i cloned but it takes too much time to open

aarajput commented 5 years ago

Please run flutter doctor and share its output with me.

Katekko commented 5 years ago

Here is completely normal..