效果:
Summons the platform’s share sheet to share text.
非常簡單,但也僅限於文本。
1、導入及引用
share: ^0.6.1+1
import 'package:share/share.dart';
2、調用
Share.share( '【玩安卓Flutter版】\n https://github.com/yechaoa/wanandroid_flutter');
ok,就這麼簡單,但要注意的是需要重啓之後才能正確調用,不然會有異常:
MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/share)
關閉重新打開項目即可。