getDescendantOffset method

Offset getDescendantOffset({
  1. required RenderBox descendant,
  2. Offset offset = Offset.zero,
})

Implementation

Offset getDescendantOffset({
  required RenderBox descendant,
  Offset offset = Offset.zero,
}) {
  final shimmerBox = context.findRenderObject()! as RenderBox;
  return descendant.localToGlobal(offset, ancestor: shimmerBox);
}