Flutter – share option button
- 2021年9月17日
- 技術情報
This week I would like to share you about how to add share option button in flutter. Let’s get started!


First thing we need to do is to add this share pub in your pubspec.yaml file.
dependencies:
share: ^2.0.4
We can simply apply the share pub in the code.
return Scaffold(
appBar: AppBar(
title : const Text('Share option '),
actions: [
Padding(padding: const EdgeInsets.all(10),
child: IconButton(
icon : const Icon(Icons.share_outlined),
onPressed: () {
Share.share("https://dummy~~~~~~~.com");
},
)
)
],
),
);
Hope you enjoyed this article!
By Ami
asahi at 2021年09月17日 10:00:00