Flutter - Awesome Paint App Using Custom Paint | Flutter Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 พ.ย. 2024

ความคิดเห็น • 73

  • @RetroPortalStudio
    @RetroPortalStudio  4 ปีที่แล้ว +5

    If you find this video useful, consider Following me on:
    Twitter: twitter.com/theretroportal
    Instagram: instagram.com/retroportalstudio
    Happy Coding! ✌️😁

    • @dilshansandhu2627
      @dilshansandhu2627 3 ปีที่แล้ว

      Sir can you please fix the stability issue(lagginess) as mentioned by other usere

    • @Mark-mo4bo
      @Mark-mo4bo 3 ปีที่แล้ว

      @@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.

    • @deepondas5001
      @deepondas5001 2 ปีที่แล้ว

      In onPanEnd ,in the setState points.add() is not taking null value ,please tell me what to do.

  • @tylerfink9243
    @tylerfink9243 3 ปีที่แล้ว +4

    Super helpful! Been trying to figure out the best way to do something like this for a while, so appreciate you putting this together!

  • @brandm5176
    @brandm5176 4 ปีที่แล้ว +4

    You are a gem to the flutter society!

    • @RetroPortalStudio
      @RetroPortalStudio  4 ปีที่แล้ว

      Such a huge complement! Thank you ✌👨‍💻😁

  • @surajberad1590
    @surajberad1590 4 ปีที่แล้ว +6

    we are waiting for part 2.....!!!! Please come up with it as early as possible....! thank you

  • @mehmetedex
    @mehmetedex 2 ปีที่แล้ว +1

    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

  • @aravindc6946
    @aravindc6946 4 ปีที่แล้ว +2

    Awesome tutorial and clear explanation totally loved it!

  • @Lordofgamer
    @Lordofgamer 4 ปีที่แล้ว +3

    Hi, thanks for this video. But i even don't find anything about how to use Pen. Just Pen touch?

  • @rakharuan
    @rakharuan 4 ปีที่แล้ว +2

    THANK YOU THANK YOU THANK YOU VERY MUCH. YOU MADE MY DAY

  • @kunalkumbhare8778
    @kunalkumbhare8778 3 ปีที่แล้ว +1

    Great work and thanks for the tutorial.

  • @janammaharjan2699
    @janammaharjan2699 3 ปีที่แล้ว +1

    This is a Great Video .Thanking you

  • @Android-jass
    @Android-jass 2 ปีที่แล้ว +1

    The drawing only shows when I press one of the buttons. how I can fix it?

  • @GameDevForLife
    @GameDevForLife 4 ปีที่แล้ว +1

    Excellent tutorial thanks

  • @user-mz4kk7ry2v
    @user-mz4kk7ry2v 4 ปีที่แล้ว +3

    Thank you very much
    main()..color what the douple points mean? Why two .. and not one piont .

    • @RetroPortalStudio
      @RetroPortalStudio  4 ปีที่แล้ว +1

      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!

    • @pol12ris
      @pol12ris 4 ปีที่แล้ว

      @@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?

  • @SOULANIMEWORLD
    @SOULANIMEWORLD 4 ปีที่แล้ว +1

    Dude, Amazing tutorial easy and in depth explanation. Subscribing need more videos

  • @vaishnavisood9699
    @vaishnavisood9699 3 ปีที่แล้ว +2

    I am building an app that would also be used in tablets, so my duoubt is ....does customPainter works efficiently with pen too?

  • @lessanotlisa
    @lessanotlisa 2 ปีที่แล้ว +1

    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
      @shivamrao7964 2 ปีที่แล้ว

      I also faced the same issue but don't think no one can help 🙂 searched StackOverflow GitHub but didn't get any help

    • @svenpittelkow255
      @svenpittelkow255 2 ปีที่แล้ว +1

      @@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);

  • @JJ-fq3dh
    @JJ-fq3dh 2 ปีที่แล้ว

    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.

  • @hectorprx
    @hectorprx 4 ปีที่แล้ว +1

    Very nice Thanks

  • @kifayatUllah712
    @kifayatUllah712 2 ปีที่แล้ว

    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.

  • @Teknoborneo
    @Teknoborneo 3 ปีที่แล้ว

    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

  • @ЄвгенійЗахарченко-м5ц
    @ЄвгенійЗахарченко-м5ц 3 ปีที่แล้ว +1

    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.

    • @ЄвгенійЗахарченко-м5ц
      @ЄвгенійЗахарченко-м5ц 3 ปีที่แล้ว

      OK, I missed the widget "ClipRRect" above CustomPaint in my code

    • @vaishnavisood9699
      @vaishnavisood9699 3 ปีที่แล้ว

      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!!

  • @ayomideolopha6330
    @ayomideolopha6330 4 ปีที่แล้ว +1

    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??

    • @RetroPortalStudio
      @RetroPortalStudio  4 ปีที่แล้ว +1

      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

    • @ayomideolopha6330
      @ayomideolopha6330 4 ปีที่แล้ว +1

      RetroPortal Studio thanks a lot, I really appreciate what you do 😁

  • @janammaharjan2699
    @janammaharjan2699 3 ปีที่แล้ว

    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

    • @janammaharjan2699
      @janammaharjan2699 3 ปีที่แล้ว

      Got the answer have to make a custom widget Single Touch Recognizer . Thank you

  • @hoaile2289
    @hoaile2289 3 ปีที่แล้ว

    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.

  • @bodyhanger7137
    @bodyhanger7137 4 ปีที่แล้ว +4

    Could you do a tutorial on saving the canvas. Thanks...⭐️

    • @RetroPortalStudio
      @RetroPortalStudio  4 ปีที่แล้ว +4

      Will be uploading a part 2 for this one ✌👨‍💻

    • @bodyhanger7137
      @bodyhanger7137 4 ปีที่แล้ว

      RetroPortal Studio. Great news, you always take care of your subscribers. Thanks bro...⭐️

    • @kristiyankamenov
      @kristiyankamenov 3 ปีที่แล้ว +1

      @@RetroPortalStudio still no part 2 for saving the drawing :(

  • @hasan8267
    @hasan8267 4 ปีที่แล้ว +1

    Thank you

  • @klvnco
    @klvnco 4 ปีที่แล้ว +1

    hi just want to check if your code will restrict the drawing only in the container.. because mine is drawing outside the container

  • @andy-ip6eu
    @andy-ip6eu 4 ปีที่แล้ว

    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.

  • @saifullahsaeed1990
    @saifullahsaeed1990 3 ปีที่แล้ว

    sir how to save this canvas in an image

  • @Winner4ever
    @Winner4ever 4 ปีที่แล้ว +1

    Nice app, but how do I save the drawing locally or to firebase

    • @RetroPortalStudio
      @RetroPortalStudio  4 ปีที่แล้ว

      Will be uploading a part 2 to this one ✌👨‍💻

  • @premingiet
    @premingiet 4 ปีที่แล้ว

    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.

  • @sachinmittal65
    @sachinmittal65 4 ปีที่แล้ว +1

    how to add text functionality like adding text on the image?

    • @RetroPortalStudio
      @RetroPortalStudio  4 ปีที่แล้ว

      You can use drawParagraph functions from Canvas ✌😁

  • @bashiruibrahim8443
    @bashiruibrahim8443 4 ปีที่แล้ว +1

    Awesome

  • @pol12ris
    @pol12ris 4 ปีที่แล้ว +1

    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.

  • @4naught456
    @4naught456 2 ปีที่แล้ว

    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 🙌

  • @PlusPassie
    @PlusPassie 4 ปีที่แล้ว +3

    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!

    • @RetroPortalStudio
      @RetroPortalStudio  4 ปีที่แล้ว +1

      I have been asked this many times 😅 It's just cz of my frequest work with ReactJS. ✌😁Muscle Memory.. Nothing Else

    • @PlusPassie
      @PlusPassie 4 ปีที่แล้ว +1

      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?

    • @RetroPortalStudio
      @RetroPortalStudio  4 ปีที่แล้ว

      Yes you can. Its quite easy , just do a bit of messing around with code and you will do it in no time ✌😁

  • @goncaloribeiro808
    @goncaloribeiro808 4 ปีที่แล้ว +1

    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.

    • @RetroPortalStudio
      @RetroPortalStudio  4 ปีที่แล้ว

      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 ✌😁

  • @信者の男
    @信者の男 4 ปีที่แล้ว

    this code works on Web Flutter?

    • @RetroPortalStudio
      @RetroPortalStudio  4 ปีที่แล้ว

      Not tested for Web Yet! Feel free to try it out! Will check it myself too! ✌😁

    • @信者の男
      @信者の男 4 ปีที่แล้ว

      Web Flutter: in the release version the line is not fluid, the curves are geometrized

  • @santoshpathak5898
    @santoshpathak5898 4 ปีที่แล้ว +2

    Make video on how to use paytm payment gateway with flutter

    • @RetroPortalStudio
      @RetroPortalStudio  4 ปีที่แล้ว +1

      Nice Suggestion! Will be creating the tutorial soon :)

  • @ritscs116yogendrabhammarka8
    @ritscs116yogendrabhammarka8 3 ปีที่แล้ว

    Bro too many error after flutter 2.20