safeRects property

List<Rect> safeRects
latefinal

Rectangles safe at catalog endpoints, not necessarily during transitions. After mid-morph retargeting, only the destination is certified safe. Intersecting endpoint rectangles is safe; interpolating/unioning is not.

Implementation

late final List<Rect> safeRects = List.unmodifiable({
  if (from == null)
    ..._translatedRects(
      to,
      _morph?.toPath(1).getBounds().center ??
          to.polygon.toPath().getBounds().center,
    )
  else
    ..._centeredIntersections(
      _translatedRects(from!, _morph!.toPath(0).getBounds().center),
      _translatedRects(to, _morph.toPath(1).getBounds().center),
    ),
});