randomPoint abstract method

Vector2 randomPoint({
  1. Random? random,
  2. bool within = true,
})

Returns a random point within the shape if within is true (default) and otherwise a point along the edges of the shape. Do note that within=true also includes the edges.

If isClosed is false, the within value does not make a difference.

Implementation

Vector2 randomPoint({Random? random, bool within = true});