{"id":10424,"date":"2021-09-03T10:00:13","date_gmt":"2021-09-03T01:00:13","guid":{"rendered":"http:\/\/www.gigas-jp.com\/appnews\/?p=10424"},"modified":"2021-09-02T19:38:10","modified_gmt":"2021-09-02T10:38:10","slug":"flutter-scrollbar","status":"publish","type":"post","link":"https:\/\/www.gigas-jp.com\/appnews\/archives\/10424","title":{"rendered":"Flutter &#8211; Scrollbar"},"content":{"rendered":"\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" src=\"\/appnews\/wp-content\/uploads\/sites\/4\/2021\/09\/Screenshot_1630571030-1-485x1024.png\" alt=\"\" class=\"wp-image-10426\" width=\"242\" height=\"511\" srcset=\"https:\/\/www.gigas-jp.com\/appnews\/wp-content\/uploads\/sites\/4\/2021\/09\/Screenshot_1630571030-1-485x1024.png 485w, https:\/\/www.gigas-jp.com\/appnews\/wp-content\/uploads\/sites\/4\/2021\/09\/Screenshot_1630571030-1.png 1080w\" sizes=\"(max-width: 242px) 100vw, 242px\" \/><\/figure>\n\n\n\n<p>This week I would like to share about scrollbar widget and how to use it. Let&#8217;s go and start code!<\/p>\n\n\n\n<p>By default scrollbar widget in flutter don&#8217;t show a scrollbar. But that&#8217;s fine in many cases but in others, you do want to display a scrollbar. Scrollbars show the users how far they&#8217;ve scrolled, and they allow things like jumping  to a particular point in the list. <\/p>\n\n\n\n<p>To show scrollbar use the widget called Scrollbar!<\/p>\n\n\n\n<p>Make sure the scrollbar widget is finite. For example, it&#8217;s a ListView.builder, make sure itemCount is defined.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>return MaterialApp(\n      home: Scaffold(\n        body: Center(\n          child: Scrollbar(\n            child: ListView.builder(\n              itemCount: 20,\n              itemBuilder: (context, index) {\n                return Card(\n                  child : ListTile(\n                    title: Text(\"Item: ${index + 1}\"),\n                  )\n                );\n              }\n            )\n          ),\n        )\n      )\n    );<\/code><\/pre>\n\n\n\n<p>Hoped 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\/10424\" ><\/g:plusone><\/div>\n            <div class=\"wsbl_hatena_button\"><a href=\"\/\/b.hatena.ne.jp\/entry\/https:\/\/www.gigas-jp.com\/appnews\/archives\/10424\" class=\"hatena-bookmark-button\" data-hatena-bookmark-title=\"Flutter &#8211; Scrollbar\" 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\/10424\" data-text=\"Flutter &#8211; Scrollbar\" 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\/10424\" 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\/10424\" 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 about scrollbar widget and how to use it. Let&#8217;s go and start code! By de [&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\/10424"}],"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=10424"}],"version-history":[{"count":2,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/10424\/revisions"}],"predecessor-version":[{"id":10431,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/10424\/revisions\/10431"}],"wp:attachment":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/media?parent=10424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/categories?post=10424"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/tags?post=10424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}