drawTriangles method
(Warning: Experimental and buggy)
Draw a bunch of triangles in the Canvas, only supports solid fill or image (not a stroke). Doesn't use a Path(), but drawVertices() instead.
Returns the current Graphics instance, allowing for method chaining.
Implementation
Graphics drawTriangles(
List<double> vertices, [
List<int>? indices,
List<double>? uvtData,
List<int>? hexColors,
BlendMode? blendMode = BlendMode.src,
Culling culling = Culling.positive,
]) {
/// will only work if it has a fill.
assert(_currentDrawing != null);
assert(_currentDrawing!.fill != null);
_currentDrawing!.vertices = GraphicsVertices(
ui.VertexMode.triangles,
vertices,
indices,
uvtData,
hexColors,
blendMode,
culling,
);
return this;
}