Questions tagged [flutter-custompainter]
95 questions
0
votes
0 answers
CustomPainter only takes up visible screen
I have a map in the form of an Image which is scrollable horizontally, and custom Painter which seems to only take the space of the screen currently being displayed and scrolls across the image instead of staying in it's place.
As it can be seen…

Laith Alfar
- 21
- 5
0
votes
0 answers
Flutter: Convert a straight line of arbitrary length and direction into a wiggly line
I recently started playing around with Flutter. I am also a complete beginner in terms object-oriented programming, so my question is probably quite basic, but I couldn't figure it out the whole weekend.
I am using customPain to draw freely and/or…

Thomas
- 11
- 3
0
votes
0 answers
How to add bevel and emboss effect in Flutter Custom Paint?
How to add the bevel and emboss effect to a Rectangle in Flutter Custom Paint?
Expected something like this:

kinha
- 3
- 3
0
votes
1 answer
Flutter - Center a CustomPaint Shape
I am building a CustomPaint heart shape that has animation on the size. An optimal state is the cirle GIF below. However, what i have been able to achieve so far is the heart GIF below.
Here is the code for my CustomPaint:
class MyPainter extends…

iampapagray
- 53
- 1
- 6
0
votes
0 answers
when hovering on FAB, I wanna not to rebuild CustomPaint widget
I thought that when I am hovering on FAB, only the FAB would change and everything else would stay the same, but when I just hovering on, the CustomPaint widget is being repainted. I'm wondering why this is happening, as I thought CustomPaint was…

max.back
- 1
- 1
0
votes
0 answers
Drawflow drawing without using custom paint
I try to create word matching game as a small part of my app. My web team-mate already do this feature using Drawflow package. On flutter i didnot found any package similar this.
I already do this using custom paint but its not even better solution…

S23
- 1
- 1
0
votes
0 answers
In the custompainter of the fluter, I want to draw two images overlaping
I want to implement a CustomPainter that draws a clock given images of hour, minute, and second hands, as well as an image of an empty clock face.
To account for the possibility of the image being too large or small, I used drawImageRect to resize…

hyeongrae-kim
- 1
- 1
0
votes
2 answers
Create spiral in flutter
I want to create a spiral in flutter which will have a dynamic fill, something like shown below. One way to create is by using multiple semi-circles, but is there a better way to achieve this?
The dynamic fill is orange in color and will depend on a…

Vipin Verma
- 5,330
- 11
- 50
- 92
0
votes
0 answers
How to resize custom painter to take just a part of the background and wrap just the first 2 element of 3 column
i am new to flutter and to custom painter.
This is my custom painter class
class ShapesPainter extends CustomPainter {
double _kCurveHeight = 35;
@override
void paint(Canvas canvas, Size size) {
final p = Path();
p.lineTo(0,…

Stefano Mancuso
- 1
- 1
0
votes
0 answers
How I will create game level map with level pointers with flutter?
I am trying to make a game level map UI with flutter. I am trying to do this with Custompainter. I can draw path line but don't know how to get this level pointers and add buttons/image widget to those points. I didn't find good solution in web.
My…

Noban Hasan
- 593
- 1
- 7
- 21
0
votes
0 answers
Why Flutter AnimationController becomes very laggy after repeating itself for 3 times
I have an AnimationController, and I want to repeat it every time the animation completes.
Let's say I want it to repeat for 4 times as is shown below:
// ......
// _sets is initialised as 4
_controller = AnimationController(
duration:…

Fever
- 157
- 2
- 9
0
votes
0 answers
How to paint a location icon in flutter?
I am trying to paint a icon with green color. I am using custom painter class.
Sample code:
import 'dart:ui';
import 'package:flutter/material.dart';
class HomePage extends StatefulWidget {
const HomePage({super.key});
@override
…

Yuva
- 121
- 9
0
votes
0 answers
How to make Custom shape Like this with Container in Flutter?
How to create this shape in flutter?
I tried custom paint but didn't achieve this result

Anas Ayub
- 13
- 1
- 4
0
votes
0 answers
How to add text to flutter Analog Clock using canvas CustomPainter?
I just learned about making Analog Clock with flutter CustomPainter, and I know to make every hour mark with canvas.drawline(p1, p2, dashBrush).
this is my Analog clock hour mark code :
var outerCircleRadius = radius;
var innerCircleRadius = radius…

DVCone
- 109
- 2
- 12
0
votes
0 answers
How to use both Shadow and Border in CustomPainter Flutter
is there any way I could add a border to this shadowed paint instance below?
I tried to add a stroke with color but it can't paint both of them at the same time!
Code:
class MyPainter extends CustomPainter {
final Shadow shadow;
final…

devmuaz
- 519
- 7
- 18