calculateSize function

Size calculateSize({
  1. required BuildContext context,
})

Calculates the box constraints of the toast's container based on the enclosing BuildContext provided to the toast.

Implementation

Size calculateSize({
  required BuildContext context,
}) {
  final RenderBox renderBox = context.findRenderObject() as RenderBox;
  return renderBox.size;
}