{"id":10686,"date":"2021-10-15T10:00:00","date_gmt":"2021-10-15T01:00:00","guid":{"rendered":"https:\/\/www.gigas-jp.com\/appnews\/?p=10686"},"modified":"2021-10-15T10:18:22","modified_gmt":"2021-10-15T01:18:22","slug":"flutter-turtle","status":"publish","type":"post","link":"https:\/\/www.gigas-jp.com\/appnews\/archives\/10686","title":{"rendered":"Flutter &#8211; Turtle"},"content":{"rendered":"\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\/10\/Screenshot_1634200070-2.png\" alt=\"\" class=\"wp-image-10689\" width=\"257\" height=\"541\" \/><\/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\/10\/Screenshot_1634201767.png\" alt=\"\" class=\"wp-image-10691\" width=\"257\" height=\"542\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>What is flutter turtle? This is a simple presentation of turtle graphics for flutter. It can simply apply to draw graphics with a custom painter like a logo language.<\/p>\n\n\n\n<p>Flutter turtle is two classes, named with <strong>TurtleView<\/strong> and <strong>AnimatedTurtleView<\/strong>. To create a turtleView, both of classes require <strong>commands<\/strong> parameter. If you want your logo to repeat 5 times and forward 100 , right 200. You can use like this using commands parameter.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;\n  Repeat((_) =&gt; 5, &#091;\n    Forward((_) =&gt; 100),\n    Right((_) =&gt; 200),\n  ]),\n];<\/code><\/pre>\n\n\n\n<p>With more information about flutter turtle, check on flutter <strong><a href=\"https:\/\/pub.dev\/\" data-type=\"URL\" data-id=\"https:\/\/pub.dev\/\">pub.dev<\/a><\/strong>.<\/p>\n\n\n\n<p>Example code :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Widget build(BuildContext context) {\n  return Scaffold(\n    appBar: AppBar(\n      title: const Text('TurtleView'),\n      centerTitle: true,\n      elevation: 0,\n    ),\n    body: TurtleView(\n      child: Container(),\n      commands: &#091;\n        PenDown(),\n        SetColor((_) =&gt; const Color(0xFF006EFF)),\n        SetStrokeWidth((_) =&gt; 2),\n        Repeat((_) =&gt; 20, &#091;\n          Repeat((_) =&gt; 180, &#091;\n            Forward((_) =&gt; 25.0),\n            Right((_) =&gt; 20),\n          ]),\n          Right((_) =&gt; 18),\n        ]),\n        PenUp(),\n      ],\n    ),\n  );\n}<\/code><\/pre>\n\n\n\n<p>Hop you enjoyed this article!<\/p>\n\n\n\n<p>By Ami<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<p> <\/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\/10686\" ><\/g:plusone><\/div>\n            <div class=\"wsbl_hatena_button\"><a href=\"\/\/b.hatena.ne.jp\/entry\/https:\/\/www.gigas-jp.com\/appnews\/archives\/10686\" class=\"hatena-bookmark-button\" data-hatena-bookmark-title=\"Flutter &#8211; Turtle\" 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\/10686\" data-text=\"Flutter &#8211; Turtle\" 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\/10686\" 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\/10686\" colorscheme=\"light\" ><\/fb:send><\/div>\n    <\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>What is flutter turtle? This is a simple presentation of turtle graphics for flutter. It can simply apply to d [&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\/10686"}],"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=10686"}],"version-history":[{"count":5,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/10686\/revisions"}],"predecessor-version":[{"id":10703,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/10686\/revisions\/10703"}],"wp:attachment":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/media?parent=10686"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/categories?post=10686"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/tags?post=10686"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}