drawVertices method Null safety

void drawVertices(
  1. Vertices vertices,
  2. BlendMode blendMode,
  3. Paint paint
)

Draws the set of Vertices onto the canvas.

All parameters must not be null.

See also:

  • new Vertices, which creates a set of vertices to draw on the canvas.
  • Vertices.raw, which creates the vertices using typed data lists rather than unencoded lists.

Implementation

void drawVertices(Vertices vertices, BlendMode blendMode, Paint paint) {

  assert(vertices != null); // vertices is checked on the engine side
  assert(paint != null);
  assert(blendMode != null);
  _drawVertices(vertices, blendMode.index, paint._objects, paint._data);
}