OpenFlutter / flutter_share_me

Flutter Plugin for sharing contents to social media. You can use it share to Facebook , WhatsApp , Twitter And System Share UI. Support Url and Text.
https://github.com/lizhuoyuan
Apache License 2.0
151 stars 145 forks source link

share to whatsapp not working #36

Closed armandojimenez closed 3 years ago

armandojimenez commented 3 years ago

getting this error on ios

VERBOSE-2:ui_dart_state.cc(186)] Unhandled Exception: type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'Map<String, Object>' in type cast

0 FlutterShareMe.shareToWhatsApp

package:flutter_share_me/flutter_share_me.dart:37

1 _SharePageState._shareToWhatsapp.

package:believe/…/pages/share_page.dart:424

armandojimenez commented 3 years ago

Anyone know how to fix this?

lizhuoyuan commented 3 years ago

package:believe/…/pages/share_page.dart:424 Maybe there is a problem with the type of data received here, try using var?

armandojimenez commented 3 years ago

Even if I pass nothing, so it uses the default empty value, it crash at the first line when trying to cast final Map<String, Object> arguments = Map<String, dynamic>() as Map<String, Object>;

lizhuoyuan commented 3 years ago

I’m not sure what type of result is returned. I suggest you print it first. It may be because the data types are inconsistent and cannot be forced.