Flutter – share option button

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



アプリ関連ニュース

お問い合わせはこちら

お問い合わせ・ご相談はお電話、またはお問い合わせフォームよりお受け付けいたしております。

tel. 06-6454-8833(平日 10:00~17:00)

お問い合わせフォーム