PainterDrawable constructor

PainterDrawable(
  1. void painter(
    1. Canvas canvas,
    2. Size size
    ), {
  2. required int width,
  3. required int height,
})

Creates a drawable that paints with painter; width and height are its intrinsic size in pixels.

Implementation

PainterDrawable(this.painter, {required int width, required int height}) : _width = width, _height = height;