<p>ææ¸ããå®ç¾ãããã®ã«<a href="https://pub.dev/packages/signature" target="_blank" rel="noreferrer noopener">Signature</a>ã¯ã¨ã¦ã便å©ã§ããæ¬å½ã«æè¬ï¼</p>



<p>ãããtoImage()ã¡ã½ããã§ç»åã«å¤æããã¨è¦ãç®ã¨ä½ç½®ãå¤ãã£ã¦ãã¾ãã¾ãã</p>



<pre class="wp-block-code"><code>SignatureController contoller = SignatureController();
var image = controller.toImage();</code></pre>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large has-custom-border"><img data-id="4609" src="https://tico-jpn.com/wp/wp-content/uploads/2024/02/toImage1.png" alt="" class="wp-image-4609" style="border-width:1px"/><figcaption class="wp-element-caption">ææ¸ã</figcaption></figure>



<figure class="wp-block-image size-large has-custom-border"><img data-id="4610" src="https://tico-jpn.com/wp/wp-content/uploads/2024/02/toImage2.png" alt="" class="wp-image-4610" style="border-width:1px"/><figcaption class="wp-element-caption">ç»åã«å¤æ</figcaption></figure>
</figure>



<p>ãµã¤ãºãæå®ãã¦ãä¸ç·ã§ãã</p>



<pre class="wp-block-code"><code>var image = controller.toImage(width: 300, height: 300);</code></pre>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large has-custom-border"><img data-id="4611" src="https://tico-jpn.com/wp/wp-content/uploads/2024/02/toImage3.png" alt="" class="wp-image-4611" style="border-width:1px"/><figcaption class="wp-element-caption">ææ¸ã</figcaption></figure>



<figure class="wp-block-image size-large has-custom-border"><img data-id="4612" src="https://tico-jpn.com/wp/wp-content/uploads/2024/02/toImage4.png" alt="" class="wp-image-4612" style="border-width:1px"/><figcaption class="wp-element-caption">ç»åã«å¤æ</figcaption></figure>
</figure>



<p>åå ã¯toImage()ãææ¸ãé¨åã®æå°ç©å½¢ã§ç»ååããããã ããã§ãããµã¤ãºãæå®ãã¦ãææ¸ããç»ååãã¦ããæå®ã®ãµã¤ãºã®ç»åã«å ¥ãè¾¼ãã¨ãã使¥ãããã®ã§ã䏿ããããªããããã§ãã</p>



<p>ãªã®ã§ä»¥ä¸ã®ããã«çå§0ã®ç¹ã4é ã«ä½ã£ã¦toImage()ãããã¨è¦ãç®éãã®ç»åã«ãªãã¾ããã</p>



<pre class="wp-block-code"><code>double width = 300;
double height = 300;
controller.addPoint(Point(const Offset(0, 0), PointType.tap, 0)); 
controller.addPoint(Point(Offset(0, height), PointType.tap, 0)); 
controller.addPoint(Point(Offset(width, 0), PointType.tap, 0)); 
controller.addPoint(Point(Offset(width, height), PointType.tap, 0)); 
var image = controller.toImage();</code></pre>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-3 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large has-custom-border"><img data-id="4614" src="https://tico-jpn.com/wp/wp-content/uploads/2024/02/toImage6.png" alt="" class="wp-image-4614" style="border-width:1px"/><figcaption class="wp-element-caption">ææ¸ã</figcaption></figure>



<figure class="wp-block-image size-large has-custom-border"><img data-id="4613" src="https://tico-jpn.com/wp/wp-content/uploads/2024/02/toImage5.png" alt="" class="wp-image-4613" style="border-width:1px"/><figcaption class="wp-element-caption">ç»åã«å¤æ</figcaption></figure>
</figure>



<p>ãã®ããæ¹ãè¯ãã®ãæªãã®ãåããã¾ããããåºæ¥ãç»åãè¦ãç®éããªã®ã§åé¡ãªãã¨æã£ã¦ãã¾ãã</p>

【Flutter】SignatureのtoImage()について
