If you find this video useful, consider Following me on: Twitter: twitter.com/theretroportal Instagram: instagram.com/retroportalstudio Happy Coding! ✌️😁
@@dilshansandhu2627 You may want to investigate RepaintBoundary widget to wrap parts of your paint depending on what situation you're using custom paint in and what other things are happening on the screen.
changing DrawingArea's "point" type to list to store all points for a single draw reduces allocated memory significantly even better use 2 dimentional list to store both values list is faster than endless class instances
Wee, this double dot syntax is new to dart! Basically you can call several methods, on same object and you dont have to write the same thing again and again. Like... List names = [ ]; names..add("Max")..add("James"); and so on... insted of writing names.add() again and again!
@@RetroPortalStudio I get the point. But here in this example we are just calling color() once. then it should work with both single dot and double dot. isn't it? I tried using single dot but it does not seem to work. Would you know why?
Hi~ thank you so much for this tutorial 💗 However, in the onPadEnd, I have this error "The argument type 'Null' can't be assigned to the parameter type 'Offset'. Can someone help me to fix this?
@@shivamrao7964 This is "null safety" in new Version of Dart, you can solve this with a ? in the list "List? points;" and points?.add(details.localPosition);
very good video , only issue is flutter and dart have made so many updates since the code was written , a lot of it will not work as is , V1 to V2 embedding, deprecated items , null safety , etc etc.
Hi! Can you tell me how I can make very smooth lines? Something that does line smoothing? Because little shifts cause the lines to become distorted at the sides.
bro, my canvas doesn't refresh after draw something with my finger. I try to add one button, and set method setState there, it will be works. So, how to solve it bro? thanks
Thank you so much, your video is very useful! I have a problem: for some reason, the line is drawing outside the boundaries of the container. It`s started drawing only inside, but then the line can go all over the whole screen. Help me, please.
Thanks alot for this, i have been thinking though is it possible to change the color of an object using flutter, something for interior decorators, take a picture, change the color of this or that.... is this possible??
Thank you for your support! ✌😁 Yes your idea is completely possible but it does require a great deal of experience in using ML Kit and Graphic Manipulation from what i understand. With some research and dedication , you can achieve what you are looking for
are there any effective ways to transfer the canvas data via the network in realtime? I am thinking about converting the canvas to base64 then save it to firebase real-time database, the destination side will re-draw if DB has changed. But performance seems not good.
Thanks for this. I was wondering if it's possible to write text on the canvas or overlay ? I've seen some apps, e.g note apps that can accept text from keyboard as well as let user draw on it.
I tried this, but with more and more lines, the drawing takes lot of time and eventually i get like 2 or 3 fps. i even tried with drawPath. But still not much improvement. Can you suggest some idea so that i can get decent draw speed with more added lines or paths.
Thanks for this RetroPortal... Very nice tutorial... I just want to understand if instead of using canvas.drawRect, can we use canvas.drawRRect? And do away with wrapping the widget with clipRRect later.
Really loved this tutorial. Clear explanation, good to follow, good voice. I subscribed. I just have one question: why do you use this.setstate instead of setstate? I am curious why you did this. Thanks!
RetroPortal Studio ok. Thanks! I know only Flutter! Was doubting if I missed something. I want to make an app I can draw circles in a circle. Can I use PaintCanvas for that also?
Very Nice Tutorial. Thanks. I wrote the code until minute 22:45 and my performance is a bit different from yours. If I move the mouse too fast (and to this I mean slower than you do in the video) I see a collection of dots and not a line. To see a line I have to drag the mouse too slowly. Is there a reason that you might presume for this? I thank you again.
I think i got the point but that shouldnt be the case, if there is such a problem it can be cause of the some mistake in Paint function. You must be only drawing points and not a line. ! Send your code so i could review that ✌😁
If you find this video useful, consider Following me on:
Twitter: twitter.com/theretroportal
Instagram: instagram.com/retroportalstudio
Happy Coding! ✌️😁
Sir can you please fix the stability issue(lagginess) as mentioned by other usere
@@dilshansandhu2627 You may want to investigate RepaintBoundary widget to wrap parts of your paint depending on what situation you're using custom paint in and what other things are happening on the screen.
In onPanEnd ,in the setState points.add() is not taking null value ,please tell me what to do.
Super helpful! Been trying to figure out the best way to do something like this for a while, so appreciate you putting this together!
You are a gem to the flutter society!
Such a huge complement! Thank you ✌👨💻😁
we are waiting for part 2.....!!!! Please come up with it as early as possible....! thank you
changing DrawingArea's "point" type to list to store all points for a single draw reduces allocated memory significantly
even better use 2 dimentional list to store both values
list is faster than endless class instances
Awesome tutorial and clear explanation totally loved it!
Hi, thanks for this video. But i even don't find anything about how to use Pen. Just Pen touch?
THANK YOU THANK YOU THANK YOU VERY MUCH. YOU MADE MY DAY
Great work and thanks for the tutorial.
This is a Great Video .Thanking you
The drawing only shows when I press one of the buttons. how I can fix it?
Excellent tutorial thanks
Thank you very much
main()..color what the douple points mean? Why two .. and not one piont .
Wee, this double dot syntax is new to dart! Basically you can call several methods, on same object and you dont have to write the same thing again and again. Like...
List names = [ ];
names..add("Max")..add("James"); and so on... insted of writing names.add() again and again!
@@RetroPortalStudio I get the point. But here in this example we are just calling color() once. then it should work with both single dot and double dot. isn't it? I tried using single dot but it does not seem to work. Would you know why?
Dude, Amazing tutorial easy and in depth explanation. Subscribing need more videos
I am building an app that would also be used in tablets, so my duoubt is ....does customPainter works efficiently with pen too?
Hi~ thank you so much for this tutorial 💗
However, in the onPadEnd, I have this error "The argument type 'Null' can't be assigned to the parameter type 'Offset'. Can someone help me to fix this?
I also faced the same issue but don't think no one can help 🙂 searched StackOverflow GitHub but didn't get any help
@@shivamrao7964 This is "null safety" in new Version of Dart, you can solve this with a ? in the list "List? points;" and points?.add(details.localPosition);
very good video , only issue is flutter and dart have made so many updates since the code was written , a lot of it will not work as is , V1 to V2 embedding, deprecated items , null safety , etc etc.
Very nice Thanks
Hi! Can you tell me how I can make very smooth lines? Something that does line smoothing? Because little shifts cause the lines to
become distorted at the sides.
bro, my canvas doesn't refresh after draw something with my finger. I try to add one button, and set method setState there, it will be works. So, how to solve it bro? thanks
Thank you so much, your video is very useful!
I have a problem: for some reason, the line is drawing outside the boundaries of the container. It`s started drawing only inside, but then the line can go all over the whole screen. Help me, please.
OK, I missed the widget "ClipRRect" above CustomPaint in my code
I was having the same problem for hours...ohh, but I saw your comment now, and I am thinking what a silly mistake that was... Thanks btw!!
Thanks alot for this, i have been thinking though is it possible to change the color of an object using flutter, something for interior decorators, take a picture, change the color of this or that.... is this possible??
Thank you for your support! ✌😁 Yes your idea is completely possible but it does require a great deal of experience in using ML Kit and Graphic Manipulation from what i understand. With some research and dedication , you can achieve what you are looking for
RetroPortal Studio thanks a lot, I really appreciate what you do 😁
Hello ... Can you tell me how can i disable multitouch on canvas ? It is giving with lines when two fingers are used in Canvas ? Thank you
Got the answer have to make a custom widget Single Touch Recognizer . Thank you
are there any effective ways to transfer the canvas data via the network in realtime? I am thinking about converting the canvas to base64 then save it to firebase real-time database, the destination side will re-draw if DB has changed. But performance seems not good.
Could you do a tutorial on saving the canvas. Thanks...⭐️
Will be uploading a part 2 for this one ✌👨💻
RetroPortal Studio. Great news, you always take care of your subscribers. Thanks bro...⭐️
@@RetroPortalStudio still no part 2 for saving the drawing :(
Thank you
hi just want to check if your code will restrict the drawing only in the container.. because mine is drawing outside the container
It does restrict ✌😁
@@RetroPortalStudio, what line or code restricts it? I have the same problem
I missed the widget "ClipRRect" above CustomPaint in my code. It helped me to solve the problem.
Thanks for this. I was wondering if it's possible to write text on the canvas or overlay ? I've seen some apps, e.g note apps that can accept text from keyboard as well as let user draw on it.
sir how to save this canvas in an image
Nice app, but how do I save the drawing locally or to firebase
Will be uploading a part 2 to this one ✌👨💻
I tried this, but with more and more lines, the drawing takes lot of time and eventually i get like 2 or 3 fps. i even tried with drawPath. But still not much improvement. Can you suggest some idea so that i can get decent draw speed with more added lines or paths.
how to add text functionality like adding text on the image?
You can use drawParagraph functions from Canvas ✌😁
Awesome
Thanks for this RetroPortal... Very nice tutorial... I just want to understand if instead of using canvas.drawRect, can we use canvas.drawRRect? And do away with wrapping the widget with clipRRect later.
Sure you can 😁
I'm facing a error which says that:
The argument type 'Null' can't be assigned to the parameter type 'Offset'.
Please help me anyone 🙌
Really loved this tutorial. Clear explanation, good to follow, good voice. I subscribed. I just have one question:
why do you use this.setstate instead of setstate? I am curious why you did this. Thanks!
I have been asked this many times 😅 It's just cz of my frequest work with ReactJS. ✌😁Muscle Memory.. Nothing Else
RetroPortal Studio ok. Thanks! I know only Flutter! Was doubting if I missed something. I want to make an app I can draw circles in a circle. Can I use PaintCanvas for that also?
Yes you can. Its quite easy , just do a bit of messing around with code and you will do it in no time ✌😁
Very Nice Tutorial. Thanks. I wrote the code until minute 22:45 and my performance is a bit different from yours. If I move the mouse too fast (and to this I mean slower than you do in the video) I see a collection of dots and not a line. To see a line I have to drag the mouse too slowly. Is there a reason that you might presume for this? I thank you again.
I think i got the point but that shouldnt be the case, if there is such a problem it can be cause of the some mistake in Paint function. You must be only drawing points and not a line. ! Send your code so i could review that ✌😁
this code works on Web Flutter?
Not tested for Web Yet! Feel free to try it out! Will check it myself too! ✌😁
Web Flutter: in the release version the line is not fluid, the curves are geometrized
Make video on how to use paytm payment gateway with flutter
Nice Suggestion! Will be creating the tutorial soon :)
Bro too many error after flutter 2.20