{"id":10543,"date":"2021-09-17T10:00:00","date_gmt":"2021-09-17T01:00:00","guid":{"rendered":"https:\/\/www.gigas-jp.com\/appnews\/?p=10543"},"modified":"2021-09-16T18:50:19","modified_gmt":"2021-09-16T09:50:19","slug":"flutter-share-option-button","status":"publish","type":"post","link":"https:\/\/www.gigas-jp.com\/appnews\/archives\/10543","title":{"rendered":"Flutter &#8211; share option button"},"content":{"rendered":"\n<p>This week I would like to share you about how to add share option button in flutter. Let&#8217;s get started!<\/p>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\">\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" src=\"https:\/\/www.gigas-jp.com\/appnews\/wp-content\/uploads\/sites\/4\/2021\/09\/Screenshot_1631778297.png\" alt=\"\" class=\"wp-image-10544\" width=\"271\" height=\"572\"\/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" src=\"https:\/\/www.gigas-jp.com\/appnews\/wp-content\/uploads\/sites\/4\/2021\/09\/Screenshot_1631778203.png\" alt=\"\" class=\"wp-image-10545\" width=\"272\" height=\"572\"\/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>First thing we need to do is to add this <strong>share<\/strong> pub in your pubspec.yaml file. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dependencies:\n  share: ^2.0.4<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>We can simply apply the <strong>share<\/strong> pub in the code.<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>return Scaffold(\n      appBar: AppBar(\n        title : const Text('Share option '),\n        actions: &#91;\n          Padding(padding: const EdgeInsets.all(10),\n            child: IconButton(\n              icon : const Icon(Icons.share_outlined),\n              onPressed: () {\n                Share.share(\"https:\/\/dummy~~~~~~~.com\");\n\n              },\n            )\n          )\n        ],\n      ),\n    );<\/code><\/pre>\n\n\n\n<p>Hope you enjoyed this article!<\/p>\n\n\n\n<p>By Ami<\/p>\n<div class='wp_social_bookmarking_light'>\n            <div class=\"wsbl_google_plus_one\"><g:plusone size=\"medium\" annotation=\"none\" href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/10543\" ><\/g:plusone><\/div>\n            <div class=\"wsbl_hatena_button\"><a href=\"\/\/b.hatena.ne.jp\/entry\/https:\/\/www.gigas-jp.com\/appnews\/archives\/10543\" class=\"hatena-bookmark-button\" data-hatena-bookmark-title=\"Flutter &#8211; share option button\" data-hatena-bookmark-layout=\"standard\" title=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\"> <img src=\"\/\/b.hatena.ne.jp\/images\/entry-button\/button-only@2x.png\" alt=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\" width=\"20\" height=\"20\" style=\"border: none;\" \/><\/a><script type=\"text\/javascript\" src=\"\/\/b.hatena.ne.jp\/js\/bookmark_button.js\" charset=\"utf-8\" async=\"async\"><\/script><\/div>\n            <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/10543\" data-text=\"Flutter &#8211; share option button\" data-via=\"GIGASJAPAN_APPS\" data-lang=\"ja\">Tweet<\/a><\/div>\n            <div class=\"wsbl_facebook_like\"><div id=\"fb-root\"><\/div><fb:like href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/10543\" layout=\"button_count\" action=\"like\" width=\"100\" share=\"false\" show_faces=\"false\" ><\/fb:like><\/div>\n            <div class=\"wsbl_facebook_send\"><div id=\"fb-root\"><\/div><fb:send href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/10543\" colorscheme=\"light\" ><\/fb:send><\/div>\n    <\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>This week I would like to share you about how to add share option button in flutter. Let&#8217;s get started!  [&hellip;]<\/p>\n","protected":false},"author":19,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[100],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/10543"}],"collection":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/comments?post=10543"}],"version-history":[{"count":6,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/10543\/revisions"}],"predecessor-version":[{"id":10556,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/10543\/revisions\/10556"}],"wp:attachment":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/media?parent=10543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/categories?post=10543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/tags?post=10543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}