Questions tagged [custom-painting]
147 questions
1
vote
1 answer
Flutter custom image collage
I would like to be able to build collages and for that I tried using CustomPaint to draw the shape and then filling that shape with an image. This is what I tried:
Container(
height: 300,
width: 300,
decoration: BoxDecoration(
…

Chris
- 1,828
- 6
- 40
- 108
1
vote
0 answers
How to make cubic like shape in flutter Slide
I want to make a Custom shape in the slider Shape of cubic in a flutter.
For Rotation, I used the Rotated Box Widget to Change the rotation. and then quarter to 7.
I tried to make the widget but the UI is not according to as I desire. I want to make…

Shahryar Rafique
- 1,211
- 15
- 35
1
vote
0 answers
How to dynamically draw rectangles on an image in Flutter?
I want to allow the user draw rectangles on the image he receives in a certain way and get the coordinates of the drawn rectangle. One of the ways I was thinking about is allowing him to tap on the image four times to draw a rectangle from these…

DCodes
- 789
- 1
- 11
- 27
1
vote
3 answers
How to make Below Shape in Image flutter
I want This Similar Shape using Custom Shape.

Mehedi Hasan
- 31
- 3
1
vote
0 answers
How to repaint canvas in Flutter?
Is there a way to simply reload or repaint canvas in Flutter app?
Something like setState((){}) in stateful widgets.

Tracy Applepie
- 31
- 4
1
vote
0 answers
How to change color when tapped using touchable custom paint in flutter?
I make sleep data chart that has touchable bar charts. This is made by using touchable custom painter.
Here is sample code, image. Tooltip that has sleep amount message is shown when you long pressed the bar.
So, I want to add effect that change bar…

MaNDOOoo
- 1,347
- 1
- 5
- 19
1
vote
1 answer
GestureDetector on painted triangles in circle
I'm trying to handle taps for three painted "quartercirlces" using the CustomPaint widget. I've tried adding GestureDetectors around the QuarterCirclePainter class. Even tried using using a GestureRecognizer for the TextSpan without any success.…

Leobd
- 29
- 6
1
vote
2 answers
CustomPaint drawLine cannot apply transparency on lines drawn
I was trying to use alpha channel to apply transparency on line colors with CustomPaint's Canvas.drawLine().
Problem
However, the color tweaks on alpha channel takes no effect on the results, for example, the following code still gives me 100%…

kakyo
- 10,460
- 14
- 76
- 140
1
vote
3 answers
How to create a custom container with rounded edges in flutter?
I am trying to create a custom container with round edges but not able to make the corners round.
I just want to make the corners of green container round.
class MyPainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size)…

ARAB KUMAR
- 86
- 1
- 8
1
vote
1 answer
android rotate animation reduce calculations and make animation smooth
I'm trying to draw a custom rotating animation. This is the output of my code.
Basically every circle has small sub circles. Only issue is, sometimes animation skip some frames and animation looks broken. My guess is since this calculation is time…

while true
- 816
- 1
- 11
- 26
1
vote
2 answers
How to add an eraser in custom paint?
I'm currently building a painting app with custom paint and every works great, I have a button to clear everything has been painted on the screen, but I'm looking for a normal eraser that can clear any specific line have been drawn not all of them…

s a
- 177
- 2
- 9
1
vote
1 answer
How to make the stroke width 1px in flutter's customPainter
I am building a Flutter app that allows you to draw pixel art on a canvas using CustomPainter. My Paint() method looks like so:
final paint = Paint()
..color = Colors.deepPurple
..style = PaintingStyle.fill
..isAntiAlias = false
…

Zach Russell
- 1,060
- 2
- 13
- 27
1
vote
1 answer
flutter: Placing regular widgets on top of CustomPaint canvas
My app is mainly made up of CustomPainted pages. But I'd love to place one or two buttons such as PopupMenuButton or IconButton on top of the canvas.
Is this possible? If yes, how?

kakyo
- 10,460
- 14
- 76
- 140
1
vote
0 answers
How to achieve Custom Gradient Shapes/Patterns in Flutter
Out of the box we get LinearGradient, RadialGradient and SweepGradient. What I would like to do is something similar to the shown image below. Let's say we draw a custom shape with CustomPainter. When this customShapeGradient is applied on it, the…

aytunch
- 1,326
- 1
- 16
- 31
1
vote
0 answers
JOptionPane.showMessageDialog does not dissapear after clicking away
This code visualises the A* algorithm. When it reaches the end of the algorithm, it pops with an alerts saying the path is found using
JOptionPane.showMessageDialog(null, "Path Found")
After clicking away the windows disappears but then gets…

Alekasndr Kataev
- 50
- 1
- 6