Questions tagged [custom-painter]

53 questions
1
vote
1 answer

Get the height of a widget in a List

I'm working on a CustomPainter widget that receives a List as an argument. I would like to know the size of each of my Widget so I can adjust my paint. The List will be a user-selected List so I can't use GlobalKeys here. I watched…
BLKKKBVSIK
  • 3,128
  • 2
  • 13
  • 33
1
vote
0 answers

Custom navigation drawer flutter

I am trying to create custom navigation drawer just like bottom navigation but in navigation drawer.I am not able to achieve the view we want.I tried using custom painter but i am not expert in it.Suggest some websites where i can learn custom…
siva
  • 149
  • 1
  • 1
  • 11
1
vote
0 answers

Flutter CustomPainter Resize

So I've been trying to resize a CustomPainter and keep the look as if it was pixel art, but I haven't been able to make it. // for example, I have this widget, that sets an specific size to a CustomPainter, // in this case width and height are 16 …
1
vote
0 answers

Flutter CustomPainter: Keep path although repaint should't be done

I have a CustomPainter like the one in the example. Where I don't always need to repaint, but I need to keep the previously drawn path because it is used in hitTest. It is also not a solution to create the path in the constructor because the Size…
1
vote
0 answers

How to make a Flutter painter APP with layers

I want to make a painter APP with layers like PhotoShop, and I choose Flutter as the language. The problem is that I don't know how to make the layers with high performance, because I have tried CustomPainter following online tutorials and open…
wey
  • 21
  • 2
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

Independent Effect of Custom Paint widget in flutter

When I click on List view item it changes. I want when index changes custom paint effect of previous image save and want to move this paint part only to next widget if user selects apply changes to "yes". When I change by clicking paint and eraser…
0
votes
1 answer

How can I change the color of a drawn object using CustomPainter in Flutter?

Currently I have a CustomPainter that is using the touchable flutter package class MapPainter extends CustomPainter { final BuildContext context; MapPainter(this.context); @override void paint(Canvas canvas, Size size) { var myCanvas =…
0
votes
1 answer

How to create a bottom navigation bar with Custom Painter in Flutter?

How can I create a bottom navigation bar with a CustomPainter like this? Especially the FloatingActionButton notch / edges. Update: I did it using custom FloatingActionButtonLocation class CustomFABLocation extends FloatingActionButtonLocation { …
Aljan
  • 13
  • 4
0
votes
1 answer

Prevent background rebuidling when calling emit()

I have a background that is drawn using Flutter custom painter and it uses the Random() function to draw shapes at random positions (ex.: stars), also I have a widget that has a timer, this timer ticks every second and every second I use emit()…
Saif
  • 46
  • 4
0
votes
2 answers

How can i call variables in my custompainter class and used it in my main

I have 2 variables ( midX and midY which are the middle point position of the x and y axis) in the custom painter class that i want to call from my main program to do something with the variables value(e.g. printing the values) Methods that I have…
Tan K
  • 19
  • 5
0
votes
0 answers

Flutter Canvas Set Frame Rate

I have a custom painter that I'm using to build a small game engine for fun. I have the following code that is supposed to call the draw function of my custom painter 60 times per second: SceneRenderChangeNotifier repaintNotifer =…
0
votes
0 answers

I try to make custom progress indicator with Custom painter but painter is not updating the value

I try to make custom progress indicator with Custom painter but painter is not updating the value help: can you help me to use custom painter? also can we change circle pointer to square box with arrow pointing to progress class MyCsPaint extends…
0
votes
1 answer

manage state for small part of screen

I have screen which contains two main parts the upper part is dynamic and the lower part is static so my question is I want to rebuild only the upper part every second using BLoC, here's the code of my upper part: Expanded( flex:…
0
votes
1 answer

How to make attached image using Custom Painter in flutter

I'm trying to make custom shape same as attached image. How can i make this custom shape using custom Painter