extendWithPath method Null safety

void extendWithPath (
  1. Path path,
  2. Offset offset,
  3. {Float64List? matrix4}

Adds the given path to this path by extending the current segment of this path with the first segment of the given path.

If matrix4 is specified, the path will be transformed by this matrix after the matrix is translated by the given offset. The matrix is a 4x4 matrix stored in column major order.


void extendWithPath(Path path, Offset offset, {Float64List? matrix4}) {
  // ignore: unnecessary_null_comparison
  assert(path != null); // path is checked on the engine side
  if (matrix4 != null) {
    _extendWithPathAndMatrix(path, offset.dx, offset.dy, matrix4);
  } else {
    _extendWithPath(path, offset.dx, offset.dy);