i want create header in flutter. header
I don’t know how to use custonpainter in flutter, I looked about it, but I couldn’t find how to make this header.
I don’t know how to use custonpainter in flutter, I looked about it, but I couldn’t find how to make this header, or how to use custonpainter in flutter.
2
Answers
I implemented it in my code, but I am using an Android emulator as a base, and it is not responsive, the same happens if it opens on a page, it has a fixed size, in this case it would have to be responsive according to the layout.
layout
I don’t know where you checked, but there are a lot of resources to learn how to make a custom painter.
However, I’ve created a custom painter for you, but it does not have dynamic size, so the app bar won’t adjust based on different screen sizes. You must update the paths with dynamic sizes to make the CustomPainter responsive.
First create a custom AppBar
Then the next step is to create your desired CustomPainter
Finally, you can import your custom AppBar anywhere in the app.
Just a tip: you can update your paths as follows to make them responsive.
If you prefer a simpler CustomPainter, you can use the code below. However, note that the AppBar shape may not exactly match the image you provided.