Custom painting in Flutter - Flutter In Focus

Поділитися
Вставка
  • Опубліковано 22 лип 2024
  • Are you looking to create an advanced UI using Flutter’s CustomPaint and CustomPainter widgets? Well, you're in luck! In this episode of Flutter in Focus, Matt gives you an overview of how to use the CustomPaint widget, create a custom painter, and properly size widgets to create a polished design. Subscribe to the newly launched Flutter UA-cam channel :) → bit.ly/flutterdev
    Learn more about these widgets → bit.ly/2U6rxnv
    This video is also subtitled in Chinese, Indonesian, Italian, French, German, Japanese, Korean, Portuguese, and Spanish.
    Get started with Flutter → flutter.dev
    Try a Flutter codelab → goo.gl/d3fHPo
    Join the conversation → goo.gl/68oUnb

КОМЕНТАРІ • 70

  • @pedromassango
    @pedromassango 5 років тому +164

    We need more videos about custom painter

    • @HamedHamedi
      @HamedHamedi 4 роки тому +2

      Take a look at my channel please

    • @mohammedhardi7891
      @mohammedhardi7891 2 роки тому +1

      Hey Pedro Massango.... It's interesting I just read your article on flutter state restoration today. I'm happy to say thank you

  • @DevGlup3
    @DevGlup3 5 років тому +6

    Thank your for the video and nice explanation!
    very detailed description btw :P

  • @WikiPeoples
    @WikiPeoples 4 роки тому +7

    Huge shout out to the Flutter guys. Flutter absolutely blows React Native away. I've used BOTH in professional settings now and hands down, Flutter is the winner. You'd be a fool to build your app in React Native now that Flutter is available.

    • @krokeman
      @krokeman 2 роки тому +2

      Except there's Qt, which is far better...

  • @randikavishman3971
    @randikavishman3971 4 роки тому +7

    Coolio!!! I was watching this while my car was being washed, and it was really worth the time! Thanks 🙏🏼

  • @ritikharchani5175
    @ritikharchani5175 4 роки тому

    Man! The guy looks super cool while explaining stuff.

  • @frankzheng7925
    @frankzheng7925 5 років тому +34

    Hi Matt, could you provide the source code related so that we can learn your tutorial much more quickly. Thank you so much for your great tutorials!

  • @deeplearningteam2180
    @deeplearningteam2180 5 років тому +3

    So next level. Please do more!!!!

  • @raveeshdotme
    @raveeshdotme 5 років тому +4

    Hey Matt can you please also specify how to take a normal widget like maybe a button and put it on the canavas?

  • @mohamedelsayed159
    @mohamedelsayed159 5 років тому +1

    How to decrease the cache or the resolution of an image that will be loaded to be previewed??

  • @Mosis42
    @Mosis42 4 роки тому +3

    Me: Drawing outside the boundaries of the size given to the paint function
    Flutter: This ain't gonna be good Mitchell!!

  • @yoapps137
    @yoapps137 3 роки тому +2

    And what should be used if you wana draw on another widget.. Like button? Text field???

  • @gabrielzimenspitz7803
    @gabrielzimenspitz7803 3 роки тому +3

    How can I get the Image from Future to use it in FacePainter?

  • @atenplay6405
    @atenplay6405 5 років тому

    I got crash when the user try to draw on custom paint canvaz. is that any problem with it?

  • @moyadark
    @moyadark 5 років тому +3

    could you provide the source code? Thanks!

  • @outmaniabdelhamid
    @outmaniabdelhamid 5 років тому +10

    please videos about dealing with data (futures & stream its complicated)

  • @muhammadidrees9683
    @muhammadidrees9683 5 років тому +1

    Where is the link of Face Detection?

  • @TomasRoggero
    @TomasRoggero 4 роки тому

    Is there a way to use a custom painter with LUT or Cube data?

  • @danvilela
    @danvilela 5 років тому +3

    Very good! Just should have explained better why we have to use fitted box and just sizedbox wont work.

  • @geekalif8106
    @geekalif8106 4 роки тому +1

    How to zoom the canvas?

  • @Team-qj2hq
    @Team-qj2hq 2 роки тому +1

    How would you use this from main()?

  • @mohammedektelat1489
    @mohammedektelat1489 4 роки тому

    Is there a full example?

  • @truongsinhtran-nguyen7129
    @truongsinhtran-nguyen7129 5 років тому +2

    Published on 27th of March 2019, at 5:18, did you mean flutter.dev instead?

  • @PlusPassie
    @PlusPassie 4 роки тому

    I wish more CodeLabs!

  • @desmond3191
    @desmond3191 4 роки тому +12

    Familiar ads beginning -"Hey you. Yes you." lol.

  • @dmitriyobidin6049
    @dmitriyobidin6049 5 років тому

    Please share more information about canvas.save and canvas.restore methods!

  • @CodeWithAndrea
    @CodeWithAndrea 5 років тому +1

    Great video & example!

    • @WillDeJs
      @WillDeJs 4 роки тому +1

      Your videos are great too. Thanks for sharing!

  • @RobertWildling
    @RobertWildling 5 років тому +3

    You mention a companion video to be found in the description, but I fail to find one. Any chance you could update the description?

    • @phanirithvij
      @phanirithvij 4 роки тому +1

      ua-cam.com/video/ymyYUCrJnxU/v-deo.html

  • @jesselima_dev
    @jesselima_dev 4 роки тому +1

    Me?
    Already shared the content.
    Already subscribed.
    Watching the other cool videos.

  • @ravilakhtariya
    @ravilakhtariya 3 роки тому +1

    Hi I understood that think...
    But I have svg string code of image.... inside svg code....I have some the text ...which I want to change runtime...how it's possible
    I had already changed text inside the svg code.....by passing value...but I want to change 64 base string of image inside svg string code with my svg string code???

  • @mat.pulpan
    @mat.pulpan Рік тому

    Hello, is it possible to blur the background behind CustomPainter

  • @HuuTran-rk9hk
    @HuuTran-rk9hk 5 років тому +1

    nice!! But i need more more videos ^^

  • @azulamazigh2789
    @azulamazigh2789 5 років тому +1

    yup this is good.

  • @jakeperez456
    @jakeperez456 3 роки тому +1

    i have tried this in Java Applet. did not know it also exists in flutter

  • @florentakpro8799
    @florentakpro8799 7 місяців тому

    well explained

  • @heshansandeepa9471
    @heshansandeepa9471 2 роки тому

    Very nice

  • @jiexu3551
    @jiexu3551 5 років тому

    At 4:29, is it supposed to be FittedBox( SizedBox(...)) ? Or should it be FittedBox( child: SizedBox(...)) ?

    • @lgprasad
      @lgprasad 5 років тому

      for me, it worked this way
      FittedBox(
      child: SizedBox(
      height: image.height.toDouble(),
      width: image.width.toDouble(),
      child: _buildImage()
      )
      )

  • @AnatolyKosorukov
    @AnatolyKosorukov 3 роки тому +9

    3:12 rects variable name in shouldRepaint method should be renamed with faces like this
    @override
    bool shouldRepaint(covariant FacePainter oldDelegate) {
    return image != oldDelegate.image ||
    faces != oldDelegate.faces;
    }

  • @ShivamJha00
    @ShivamJha00 3 роки тому +3

    Check out flutter shape maker. It's really awesome tool. You just have to draw and it'll generate the custom painter class for you.

  • @arondantas3779
    @arondantas3779 2 роки тому

    macam mana nak buat?

  • @mehmetedex
    @mehmetedex 5 років тому

    All good but I'm still mad about the lack of good debugging environment.
    *for example:*
    make simple syntax error or a simple assigning mistake for the life of Merlin compiler *says*
    *hey an error occured I'm not sure what it is but here is the widget tree when this happened good luck figuring out :D*
    Also auto suggestion stops working when the project got complicated.
    I can't write that tool I don't have time for that I'm hoping that somebody do have.

  • @frankzheng7925
    @frankzheng7925 5 років тому

    At 3:01, why are "image" and "faces" set to be final instead of var. Anybody can help me?

    • @NehalHasnayeen
      @NehalHasnayeen 4 роки тому +1

      I know it's late but still answering, because those value will not change after assigning that's why they are final

    • @marflage
      @marflage 3 роки тому

      When a variable's value will not change after getting assigned it's initial value (initialization), final is used. You can still use var but it is a bad practice.

  • @armagangokk
    @armagangokk 10 місяців тому

    Unfortunately FittedBox is not a good idea if we paint or draw over an image

  • @ehsanhasin8092
    @ehsanhasin8092 Рік тому

    great

  • @sachindeveloperko8424
    @sachindeveloperko8424 3 роки тому +1

    We need more tutorial serie for custom painter 😭😭

  • @segundojaramilloromero9909
    @segundojaramilloromero9909 4 роки тому +1

    Is it possible to zoom?

    • @marflage
      @marflage 3 роки тому

      You can use interactive viewer widget

  • @monadstack
    @monadstack 9 місяців тому

    Yo guys, is there any other low level Widget other than CustomPainter? let me know, the one with Skia's-like API, moveTo, lineTo, etc.

  • @lesptitsoiseaux
    @lesptitsoiseaux 10 місяців тому

    Reminds me of the bad old days of GDI

  • @RIMJANESSOHMALOOG
    @RIMJANESSOHMALOOG 4 роки тому +11

    1:43 thiccness: 10

  • @danvilela
    @danvilela 4 роки тому

    Github?

  • @GianMarcoDiFrancesco
    @GianMarcoDiFrancesco 5 років тому

    I implemented this custom painter with ML Kit: github.com/giandifra/Flutter-Smile-Face-Detection

  • @AnatolyKosorukov
    @AnatolyKosorukov 3 роки тому +4

    3:18 the constructor name invocation MyPainter class should start with a capital letter.
    final facePaint = FacePaint(
    painter: MyPainter(),
    );

    • @christianmartinez2179
      @christianmartinez2179 3 роки тому

      I think it's referencing a variable, it's more likely missing a line before "final facePaint"
      FacePainter myPainter = new FacePainter()

  • @aziziyad4034
    @aziziyad4034 3 роки тому +1

    yeah, that's not for me

  • @zawadi563
    @zawadi563 5 років тому

    good explanations...and in the next boring show can you guys enlight us why the website has changed from flutter.io to .dev

    • @baggern
      @baggern 5 років тому +2

      because Google owns the .dev tld apparently and they are pushing it hard

    • @HumanoidTyphoon91
      @HumanoidTyphoon91 5 років тому

      which episode was that? I'm a bit behind on the boring show, but would like to check the reasoning behind the .dev change

  • @deniszaika9534
    @deniszaika9534 2 роки тому +1

    Slightly complicated in comparison to HTML canvas.

  • @AnatolyKosorukov
    @AnatolyKosorukov 3 роки тому +3

    0:52 myPainter() constructor should start with a capital letter.
    final customPaint = CustomPaint(
    painter: MyPainter(),
    child, SomeWidget(),
    );

  • @user-tf5tq6oi8s
    @user-tf5tq6oi8s 2 роки тому

    「内容を明確にする必要があります」、

  • @magacaygamaxamuud7253
    @magacaygamaxamuud7253 2 роки тому

    DrawAtlas