Reputation: 49
I want to draw a yellow arrow over the 9 blue squares as shown in the picture below.
But I don't know which widget to use to draw arrows freely on each rectangle. I want to draw an arrow like a screen lock pattern. I would like to know the different ways in which this arrow can be implemented.
Upvotes: 0
Views: 1775
Reputation: 373
You can put the whole Containers inside a Stack
widget and then paint the line by using the CustomPaint
widget shown in this question Draw lines with flutter.
Stack(
children: [
Arrow(child: Container()),
ContainerWidgets(),
],
)
And for the painter:
class Arrow extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
// Add your paint logic here
}
}
Upvotes: 1