Loading topic
CustomPaint is a widget that lets you draw directly with a canvas. A canvas is a two-dimensional drawing surface. You provide the drawing rules through a CustomPainter.2 min readSize contains a width and height, and that Flutter lays out widgets before it paints them.2 min readSize, and have basic familiarity with AnimationController. You will use that knowledge to separate two responsibilities:2 min readSize. It also assumes that you know the CustomPaint and CustomPainter roles from the previous chapter.2 min readSize, and the basic CustomPaint and CustomPainter APIs. This chapter focuses on how a Paint object controls the appearance of geometry after a Canvas drawing method creates it.2 min readCustomPainter, Canvas, Paint, and the Flutter Size coordinate system. This chapter focuses on combining points and curves into shapes that are more complex than circles and rectangles.2 min readSize, and the basics of AnimationController. This chapter focuses on how Flutter decides whether an existing CustomPainter needs to paint again.2 min readAnimationController. An AnimationController produces changing values over time. A CustomPainter can listen to those changes and repaint without rebuilding the surrounding widget tree.1 min readSize, and the basic Canvas drawing methods. You should also understand that a canvas uses logical pixels, with its origin at the painter's top-left corner. The x-coordinate increases to the right, and the y-coordinate increases do2 min readCustomPainter, Canvas, Paint, and Flutter's Size type. A gradient is a smooth color transition. In Flutter, a gradient creates a shader, and a shader tells Paint how to calculate the color at each pixel.2 min readSize, and basic CustomPainter. A TextPainter is a Flutter object that measures and draws text onto a Canvas. It is useful when text must appear inside custom graphics, such as chart labels, badges, diagrams, or a painted butto2 min readStatefulWidget. This chapter focuses on the boundary between painting and input. Drawing a shape does not automatically make that shape interactive. You must define which local coordinates count as a hit and then handle th2 min readCustomPaint, CustomPainter, Flutter layout constraints, and AnimationController. It focuses on reducing unnecessary painting when a screen contains custom graphics.2 min readCustomPainter. This chapter focuses on accessibility. It does not cover painting shapes or handling gestures in detail.2 min readCanvas, and Paint. You should also know how a CustomPainter draws inside its paint method.2 min read