Flutter Custompainter canvas drawimage not working

Posted by Andre Scott | Updated on

Flutter Custompainter canvas drawimage not working. Your image needs to be available before the canvas is drawn. By moving the loading code outside of the painter, the painter now works as intended :

Note that you can easily draw an image using Image.asset instead of a CustomPainter :


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers