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
We need more videos about custom painter
Take a look at my channel please
Hey Pedro Massango.... It's interesting I just read your article on flutter state restoration today. I'm happy to say thank you
Thank your for the video and nice explanation!
very detailed description btw :P
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.
Except there's Qt, which is far better...
Coolio!!! I was watching this while my car was being washed, and it was really worth the time! Thanks 🙏🏼
Man! The guy looks super cool while explaining stuff.
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!
So next level. Please do more!!!!
Hey Matt can you please also specify how to take a normal widget like maybe a button and put it on the canavas?
How to decrease the cache or the resolution of an image that will be loaded to be previewed??
Me: Drawing outside the boundaries of the size given to the paint function
Flutter: This ain't gonna be good Mitchell!!
And what should be used if you wana draw on another widget.. Like button? Text field???
How can I get the Image from Future to use it in FacePainter?
I got crash when the user try to draw on custom paint canvaz. is that any problem with it?
could you provide the source code? Thanks!
please videos about dealing with data (futures & stream its complicated)
Where is the link of Face Detection?
Is there a way to use a custom painter with LUT or Cube data?
Very good! Just should have explained better why we have to use fitted box and just sizedbox wont work.
How to zoom the canvas?
How would you use this from main()?
Is there a full example?
Published on 27th of March 2019, at 5:18, did you mean flutter.dev instead?
I wish more CodeLabs!
Familiar ads beginning -"Hey you. Yes you." lol.
Very familiar
Please share more information about canvas.save and canvas.restore methods!
Great video & example!
Your videos are great too. Thanks for sharing!
You mention a companion video to be found in the description, but I fail to find one. Any chance you could update the description?
ua-cam.com/video/ymyYUCrJnxU/v-deo.html
Me?
Already shared the content.
Already subscribed.
Watching the other cool videos.
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???
Hello, is it possible to blur the background behind CustomPainter
nice!! But i need more more videos ^^
yup this is good.
i have tried this in Java Applet. did not know it also exists in flutter
well explained
Very nice
At 4:29, is it supposed to be FittedBox( SizedBox(...)) ? Or should it be FittedBox( child: SizedBox(...)) ?
for me, it worked this way
FittedBox(
child: SizedBox(
height: image.height.toDouble(),
width: image.width.toDouble(),
child: _buildImage()
)
)
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;
}
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.
macam mana nak buat?
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.
At 3:01, why are "image" and "faces" set to be final instead of var. Anybody can help me?
I know it's late but still answering, because those value will not change after assigning that's why they are final
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.
Unfortunately FittedBox is not a good idea if we paint or draw over an image
great
We need more tutorial serie for custom painter 😭😭
Is it possible to zoom?
You can use interactive viewer widget
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.
Reminds me of the bad old days of GDI
1:43 thiccness: 10
Github?
I implemented this custom painter with ML Kit: github.com/giandifra/Flutter-Smile-Face-Detection
3:18 the constructor name invocation MyPainter class should start with a capital letter.
final facePaint = FacePaint(
painter: MyPainter(),
);
I think it's referencing a variable, it's more likely missing a line before "final facePaint"
FacePainter myPainter = new FacePainter()
yeah, that's not for me
good explanations...and in the next boring show can you guys enlight us why the website has changed from flutter.io to .dev
because Google owns the .dev tld apparently and they are pushing it hard
which episode was that? I'm a bit behind on the boring show, but would like to check the reasoning behind the .dev change
Slightly complicated in comparison to HTML canvas.
0:52 myPainter() constructor should start with a capital letter.
final customPaint = CustomPaint(
painter: MyPainter(),
child, SomeWidget(),
);
「内容を明確にする必要があります」、
DrawAtlas